xref: /kvmtool/arm/include/arm-common/kvm-config-arch.h (revision 9afefd6c79015480366e42eb7faa60f72d5984ae)
1 #ifndef ARM_COMMON__KVM_CONFIG_ARCH_H
2 #define ARM_COMMON__KVM_CONFIG_ARCH_H
3 
4 #include "kvm/parse-options.h"
5 
6 struct kvm_config_arch {
7 	const char	*dump_dtb_filename;
8 	unsigned int	force_cntfrq;
9 	bool		virtio_trans_pci;
10 	bool		aarch32_guest;
11 	bool		has_pmuv3;
12 	u64		kaslr_seed;
13 	enum irqchip_type irqchip;
14 	u64		fw_addr;
15 };
16 
17 int irqchip_parser(const struct option *opt, const char *arg, int unset);
18 
19 #define OPT_ARCH_RUN(pfx, cfg)							\
20 	pfx,									\
21 	ARM_OPT_ARCH_RUN(cfg)							\
22 	OPT_STRING('\0', "dump-dtb", &(cfg)->dump_dtb_filename,			\
23 		   ".dtb file", "Dump generated .dtb to specified file"),	\
24 	OPT_UINTEGER('\0', "override-bad-firmware-cntfrq", &(cfg)->force_cntfrq,\
25 		     "Specify Generic Timer frequency in guest DT to "		\
26 		     "work around buggy secure firmware *Firmware should be "	\
27 		     "updated to program CNTFRQ correctly*"),			\
28 	OPT_BOOLEAN('\0', "force-pci", &(cfg)->virtio_trans_pci,		\
29 		    "Force virtio devices to use PCI as their default "		\
30 		    "transport"),						\
31         OPT_CALLBACK('\0', "irqchip", &(cfg)->irqchip,				\
32 		     "[gicv2|gicv2m|gicv3|gicv3-its]",				\
33 		     "Type of interrupt controller to emulate in the guest",	\
34 		     irqchip_parser, NULL),					\
35 	OPT_U64('\0', "firmware-address", &(cfg)->fw_addr,			\
36 		"Address where firmware should be loaded"),
37 
38 #endif /* ARM_COMMON__KVM_CONFIG_ARCH_H */
39