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