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 #include <linux/sizes.h> 9 10 #define DEFAULT_KVM_DEV "/dev/kvm" 11 #define DEFAULT_CONSOLE "serial" 12 #define DEFAULT_NETWORK "user" 13 #define DEFAULT_HOST_ADDR "192.168.33.1" 14 #define DEFAULT_GUEST_ADDR "192.168.33.15" 15 #define DEFAULT_GUEST_MAC "02:15:15:15:15:15" 16 #define DEFAULT_HOST_MAC "02:01:01:01:01:01" 17 #define DEFAULT_SCRIPT "none" 18 #define DEFAULT_SANDBOX_FILENAME "guest/sandbox.sh" 19 20 #define MIN_RAM_SIZE SZ_64M 21 22 struct kvm_config { 23 struct kvm_config_arch arch; 24 struct disk_image_params disk_image[MAX_DISK_IMAGES]; 25 struct vfio_device_params *vfio_devices; 26 u64 ram_size; /* Guest memory size, in bytes */ 27 u8 num_net_devices; 28 u8 num_vfio_devices; 29 u64 vsock_cid; 30 bool virtio_rng; 31 bool nodefaults; 32 int active_console; 33 int debug_iodelay; 34 int nrcpus; 35 const char *kernel_cmdline; 36 const char *kernel_filename; 37 const char *vmlinux_filename; 38 const char *initrd_filename; 39 const char *firmware_filename; 40 const char *flash_filename; 41 const char *console; 42 const char *dev; 43 const char *network; 44 const char *host_ip; 45 const char *guest_ip; 46 const char *guest_mac; 47 const char *host_mac; 48 const char *script; 49 const char *guest_name; 50 const char *sandbox; 51 const char *hugetlbfs_path; 52 const char *custom_rootfs_name; 53 const char *real_cmdline; 54 struct virtio_net_params *net_params; 55 bool single_step; 56 bool vnc; 57 bool gtk; 58 bool sdl; 59 bool balloon; 60 bool using_rootfs; 61 bool custom_rootfs; 62 bool no_net; 63 bool no_dhcp; 64 bool ioport_debug; 65 bool mmio_debug; 66 }; 67 68 #endif 69