1 #ifndef KVM__KVM_ARCH_H 2 #define KVM__KVM_ARCH_H 3 4 #include "kvm/interrupt.h" 5 6 #include <stdbool.h> 7 #include <linux/types.h> 8 #include <time.h> 9 10 /* 11 * The hole includes VESA framebuffer and PCI memory. 12 */ 13 #define KVM_32BIT_MAX_MEM_SIZE (1ULL << 32) 14 #define KVM_32BIT_GAP_SIZE (768 << 20) 15 #define KVM_32BIT_GAP_START (KVM_32BIT_MAX_MEM_SIZE - KVM_32BIT_GAP_SIZE) 16 17 #define KVM_MMIO_START KVM_32BIT_GAP_START 18 19 /* This is the address that pci_get_io_space_block() starts allocating 20 * from. Note that this is a PCI bus address (though same on x86). 21 */ 22 #define KVM_IOPORT_AREA 0x0 23 #define KVM_PCI_CFG_AREA (KVM_MMIO_START + 0x1000000) 24 #define KVM_PCI_MMIO_AREA (KVM_MMIO_START + 0x2000000) 25 #define KVM_VIRTIO_MMIO_AREA (KVM_MMIO_START + 0x3000000) 26 27 #define KVM_IRQ_OFFSET 5 28 29 #define KVM_VM_TYPE 0 30 31 #define KVM_IOEVENTFD_HAS_PIO 1 32 33 #define VIRTIO_DEFAULT_TRANS(kvm) VIRTIO_PCI 34 35 struct kvm_arch { 36 u16 boot_selector; 37 u16 boot_ip; 38 u16 boot_sp; 39 40 struct interrupt_table interrupt_table; 41 }; 42 43 #endif /* KVM__KVM_ARCH_H */ 44