xref: /kvmtool/include/kvm/kvm-config.h (revision ffa8654620b70053657adf472d505deae2adb2a5)
1 #ifndef KVM_CONFIG_H_
2 #define KVM_CONFIG_H_
3 
4 #include "kvm/disk-image.h"
5 #include "kvm/vfio.h"
6 #include "kvm/kvm-config-arch.h"
7 
8 #define DEFAULT_KVM_DEV		"/dev/kvm"
9 #define DEFAULT_CONSOLE		"serial"
10 #define DEFAULT_NETWORK		"user"
11 #define DEFAULT_HOST_ADDR	"192.168.33.1"
12 #define DEFAULT_GUEST_ADDR	"192.168.33.15"
13 #define DEFAULT_GUEST_MAC	"02:15:15:15:15:15"
14 #define DEFAULT_HOST_MAC	"02:01:01:01:01:01"
15 #define DEFAULT_SCRIPT		"none"
16 #define DEFAULT_SANDBOX_FILENAME "guest/sandbox.sh"
17 
18 #define MIN_RAM_SIZE_MB		(64ULL)
19 #define MIN_RAM_SIZE_BYTE	(MIN_RAM_SIZE_MB << MB_SHIFT)
20 
21 struct kvm_config {
22 	struct kvm_config_arch arch;
23 	struct disk_image_params disk_image[MAX_DISK_IMAGES];
24 	struct vfio_device_params *vfio_devices;
25 	u64 ram_size;
26 	u8 num_net_devices;
27 	u8 num_vfio_devices;
28 	u64 vsock_cid;
29 	bool virtio_rng;
30 	bool nodefaults;
31 	int active_console;
32 	int debug_iodelay;
33 	int nrcpus;
34 	const char *kernel_cmdline;
35 	const char *kernel_filename;
36 	const char *vmlinux_filename;
37 	const char *initrd_filename;
38 	const char *firmware_filename;
39 	const char *flash_filename;
40 	const char *console;
41 	const char *dev;
42 	const char *network;
43 	const char *host_ip;
44 	const char *guest_ip;
45 	const char *guest_mac;
46 	const char *host_mac;
47 	const char *script;
48 	const char *guest_name;
49 	const char *sandbox;
50 	const char *hugetlbfs_path;
51 	const char *custom_rootfs_name;
52 	const char *real_cmdline;
53 	struct virtio_net_params *net_params;
54 	bool single_step;
55 	bool vnc;
56 	bool gtk;
57 	bool sdl;
58 	bool balloon;
59 	bool using_rootfs;
60 	bool custom_rootfs;
61 	bool no_net;
62 	bool no_dhcp;
63 	bool ioport_debug;
64 	bool mmio_debug;
65 };
66 
67 #endif
68