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 const char *kernel_cmdline; 28 const char *kernel_filename; 29 const char *vmlinux_filename; 30 const char *initrd_filename; 31 const char *firmware_filename; 32 const char *console; 33 const char *dev; 34 const char *network; 35 const char *host_ip; 36 const char *guest_ip; 37 const char *guest_mac; 38 const char *host_mac; 39 const char *script; 40 const char *guest_name; 41 const char *sandbox; 42 const char *hugetlbfs_path; 43 const char *custom_rootfs_name; 44 struct virtio_net_params *net_params; 45 bool single_step; 46 bool vnc; 47 bool sdl; 48 bool balloon; 49 bool using_rootfs; 50 bool custom_rootfs; 51 bool no_net; 52 bool no_dhcp; 53 bool ioport_debug; 54 bool mmio_debug; 55 }; 56 57 #endif 58