xref: /kvmtool/riscv/include/kvm/kvm-config-arch.h (revision 9e9cfde59dfe291f7cb86782ba1a5eb90aecef9b)
1 #ifndef KVM__KVM_CONFIG_ARCH_H
2 #define KVM__KVM_CONFIG_ARCH_H
3 
4 #include "kvm/parse-options.h"
5 
6 struct kvm_config_arch {
7 	const char	*dump_dtb_filename;
8 	u64		custom_mvendorid;
9 	u64		custom_marchid;
10 	u64		custom_mimpid;
11 	bool		ext_disabled[KVM_RISCV_ISA_EXT_MAX];
12 };
13 
14 #define OPT_ARCH_RUN(pfx, cfg)						\
15 	pfx,								\
16 	OPT_STRING('\0', "dump-dtb", &(cfg)->dump_dtb_filename,		\
17 		   ".dtb file", "Dump generated .dtb to specified file"),\
18 	OPT_U64('\0', "custom-mvendorid",				\
19 		&(cfg)->custom_mvendorid,				\
20 		"Show custom mvendorid to Guest VCPU"),			\
21 	OPT_U64('\0', "custom-marchid",					\
22 		&(cfg)->custom_marchid,					\
23 		"Show custom marchid to Guest VCPU"),			\
24 	OPT_U64('\0', "custom-mimpid",					\
25 		&(cfg)->custom_mimpid,					\
26 		"Show custom mimpid to Guest VCPU"),			\
27 	OPT_BOOLEAN('\0', "disable-sstc",				\
28 		    &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SSTC],	\
29 		    "Disable Sstc Extension"),				\
30 	OPT_BOOLEAN('\0', "disable-svinval",				\
31 		    &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SVINVAL],	\
32 		    "Disable Svinval Extension"),			\
33 	OPT_BOOLEAN('\0', "disable-svpbmt",				\
34 		    &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_SVPBMT],	\
35 		    "Disable Svpbmt Extension"),			\
36 	OPT_BOOLEAN('\0', "disable-zicbom",				\
37 		    &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZICBOM],	\
38 		    "Disable Zicbom Extension"),			\
39 	OPT_BOOLEAN('\0', "disable-zihintpause",			\
40 		    &(cfg)->ext_disabled[KVM_RISCV_ISA_EXT_ZIHINTPAUSE],\
41 		    "Disable Zihintpause Extension"),
42 
43 #endif /* KVM__KVM_CONFIG_ARCH_H */
44