xref: /kvmtool/arm/include/arm-common/kvm-config-arch.h (revision 52e326fb8595f012f850bdb715ddbb13ac38c9b5)
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 	enum irqchip_type irqchip;
13 };
14 
15 int irqchip_parser(const struct option *opt, const char *arg, int unset);
16 
17 #define OPT_ARCH_RUN(pfx, cfg)							\
18 	pfx,									\
19 	ARM_OPT_ARCH_RUN(cfg)							\
20 	OPT_STRING('\0', "dump-dtb", &(cfg)->dump_dtb_filename,			\
21 		   ".dtb file", "Dump generated .dtb to specified file"),	\
22 	OPT_UINTEGER('\0', "override-bad-firmware-cntfrq", &(cfg)->force_cntfrq,\
23 		     "Specify Generic Timer frequency in guest DT to "		\
24 		     "work around buggy secure firmware *Firmware should be "	\
25 		     "updated to program CNTFRQ correctly*"),			\
26 	OPT_BOOLEAN('\0', "force-pci", &(cfg)->virtio_trans_pci,		\
27 		    "Force virtio devices to use PCI as their default "		\
28 		    "transport"),						\
29         OPT_CALLBACK('\0', "irqchip", &(cfg)->irqchip,				\
30 		     "[gicv2|gicv3]",					\
31 		     "Type of interrupt controller to emulate in the guest",	\
32 		     irqchip_parser, NULL),
33 
34 #endif /* ARM_COMMON__KVM_CONFIG_ARCH_H */
35