xref: /kvmtool/mips/include/kvm/kvm-arch.h (revision b5a5cd6735e13d5410147137f13e4c1e9bb8c063)
1 #ifndef KVM__KVM_ARCH_H
2 #define KVM__KVM_ARCH_H
3 
4 #define KVM_MMIO_START		0x10000000
5 #define KVM_PCI_CFG_AREA	KVM_MMIO_START
6 #define KVM_PCI_MMIO_AREA	(KVM_MMIO_START + 0x1000000)
7 #define KVM_VIRTIO_MMIO_AREA	(KVM_MMIO_START + 0x2000000)
8 
9 /*
10  * Just for reference. This and the above corresponds to what's used
11  * in mipsvz_page_fault() in kvm_mipsvz.c of the host kernel.
12  */
13 #define KVM_MIPS_IOPORT_AREA	0x1e000000
14 #define KVM_MIPS_IOPORT_SIZE	0x00010000
15 #define KVM_MIPS_IRQCHIP_AREA	0x1e010000
16 #define KVM_MIPS_IRQCHIP_SIZE	0x00010000
17 
18 #define KVM_IRQ_OFFSET		1
19 
20 /*
21  * MIPS-VZ (trap and emulate is 0)
22  */
23 #define KVM_VM_TYPE		1
24 
25 #define VIRTIO_DEFAULT_TRANS(kvm)	VIRTIO_PCI
26 
27 #include <stdbool.h>
28 
29 #include "linux/types.h"
30 
31 struct kvm_arch {
32 	u64 entry_point;
33 	u64 argc;
34 	u64 argv;
35 	bool is64bit;
36 };
37 
38 #endif /* KVM__KVM_ARCH_H */
39