kvm-config-arch.h 1.35 KB
Newer Older
1
2
#ifndef ARM_COMMON__KVM_CONFIG_ARCH_H
#define ARM_COMMON__KVM_CONFIG_ARCH_H
3

4
5
#include "kvm/parse-options.h"

6
struct kvm_config_arch {
7
8
9
10
	const char	*dump_dtb_filename;
	unsigned int	force_cntfrq;
	bool		virtio_trans_pci;
	bool		aarch32_guest;
Marc Zyngier's avatar
Marc Zyngier committed
11
	bool		has_pmuv3;
12
	u64		kaslr_seed;
13
	enum irqchip_type irqchip;
Julien Thierry's avatar
Julien Thierry committed
14
	u64		fw_addr;
Dave Martin's avatar
Dave Martin committed
15
	bool		has_sve;
16
17
};

18
19
int irqchip_parser(const struct option *opt, const char *arg, int unset);

20
21
22
23
24
25
26
27
#define OPT_ARCH_RUN(pfx, cfg)							\
	pfx,									\
	ARM_OPT_ARCH_RUN(cfg)							\
	OPT_STRING('\0', "dump-dtb", &(cfg)->dump_dtb_filename,			\
		   ".dtb file", "Dump generated .dtb to specified file"),	\
	OPT_UINTEGER('\0', "override-bad-firmware-cntfrq", &(cfg)->force_cntfrq,\
		     "Specify Generic Timer frequency in guest DT to "		\
		     "work around buggy secure firmware *Firmware should be "	\
28
29
30
		     "updated to program CNTFRQ correctly*"),			\
	OPT_BOOLEAN('\0', "force-pci", &(cfg)->virtio_trans_pci,		\
		    "Force virtio devices to use PCI as their default "		\
31
32
		    "transport"),						\
        OPT_CALLBACK('\0', "irqchip", &(cfg)->irqchip,				\
Jean-Philippe Brucker's avatar
Jean-Philippe Brucker committed
33
		     "[gicv2|gicv2m|gicv3|gicv3-its]",				\
34
		     "Type of interrupt controller to emulate in the guest",	\
Julien Thierry's avatar
Julien Thierry committed
35
36
37
		     irqchip_parser, NULL),					\
	OPT_U64('\0', "firmware-address", &(cfg)->fw_addr,			\
		"Address where firmware should be loaded"),
38

39
#endif /* ARM_COMMON__KVM_CONFIG_ARCH_H */