xref: /kvmtool/include/kvm/kvm-config.h (revision b54cb31c777ebb272ad2ed5d01a58add8b25de53)
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 	const char *kernel_cmdline;
26 	const char *kernel_filename;
27 	const char *vmlinux_filename;
28 	const char *initrd_filename;
29 	const char *firmware_filename;
30 	const char *console;
31 	const char *dev;
32 	const char *network;
33 	const char *host_ip;
34 	const char *guest_ip;
35 	const char *guest_mac;
36 	const char *host_mac;
37 	const char *script;
38 	const char *guest_name;
39 	const char *sandbox;
40 	const char *hugetlbfs_path;
41 	const char *custom_rootfs_name;
42 	struct virtio_net_params *net_params;
43 	bool single_step;
44 	bool vnc;
45 	bool sdl;
46 	bool balloon;
47 	bool using_rootfs;
48 	bool custom_rootfs;
49 	bool no_net;
50 	bool no_dhcp;
51 };
52 
53 #endif
54