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