@@ -21,7 +21,10 @@ int vcpu_affinity_parser(const struct option *opt, const char *arg, int unset);
OPT_BOOLEAN('\0', "no-pvtime", &(cfg)->no_pvtime, "Disable" \
" stolen time"), \
OPT_BOOLEAN('\0', "disable-sve", &(cfg)->disable_sve, \
- "Disable SVE"),
+ "Disable SVE"), \
+ OPT_BOOLEAN('\0', "realm", &(cfg)->is_realm, \
+ "Create VM running in a realm using Arm RME"),
+
#include "arm-common/kvm-config-arch.h"
#endif /* KVM__KVM_CONFIG_ARCH_H */
@@ -38,9 +38,8 @@ int vcpu_affinity_parser(const struct option *opt, const char *arg, int unset)
return 0;
}
-void kvm__arch_validate_cfg(struct kvm *kvm)
+static void validate_mem_cfg(struct kvm *kvm)
{
-
if (kvm->cfg.ram_addr < ARM_MEMORY_AREA) {
die("RAM address is below the I/O region ending at %luGB",
ARM_MEMORY_AREA >> 30);
@@ -52,6 +51,23 @@ void kvm__arch_validate_cfg(struct kvm *kvm)
}
}
+static void validate_realm_cfg(struct kvm *kvm)
+{
+ if (!kvm->cfg.arch.is_realm)
+ return;
+
+ if (kvm->cfg.arch.aarch32_guest)
+ die("Realms supported only for 64bit guests");
+
+ die("Realms not supported");
+}
+
+void kvm__arch_validate_cfg(struct kvm *kvm)
+{
+ validate_mem_cfg(kvm);
+ validate_realm_cfg(kvm);
+}
+
u64 kvm__arch_default_ram_address(void)
{
return ARM_MEMORY_AREA;
@@ -11,6 +11,7 @@ struct kvm_config_arch {
bool aarch32_guest;
bool has_pmuv3;
bool mte_disabled;
+ bool is_realm;
u64 kaslr_seed;
enum irqchip_type irqchip;
u64 fw_addr;