[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/5] hw/arm/virt: Extend nested and mte checks to hvf
From: |
Peter Maydell |
Subject: |
[PULL 1/5] hw/arm/virt: Extend nested and mte checks to hvf |
Date: |
Mon, 29 Nov 2021 10:39:11 +0000 |
From: Alexander Graf <agraf@csgraf.de>
The virt machine has properties to enable MTE and Nested Virtualization
support. However, its check to ensure the backing accel implementation
supports it today only looks for KVM and bails out if it finds it.
Extend the checks to HVF as well as it does not support either today.
This will cause QEMU to print a useful error message rather than
silently ignoring the attempt by the user to enable either MTE or
the Virtualization extensions.
Reported-by: saar amar <saaramar5@gmail.com>
Signed-off-by: Alexander Graf <agraf@csgraf.de>
Message-id: 20211123122859.22452-1-agraf@csgraf.de
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/virt.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 369552ad45a..30da05dfe04 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -49,6 +49,7 @@
#include "sysemu/runstate.h"
#include "sysemu/tpm.h"
#include "sysemu/kvm.h"
+#include "sysemu/hvf.h"
#include "hw/loader.h"
#include "qapi/error.h"
#include "qemu/bitops.h"
@@ -1969,15 +1970,17 @@ static void machvirt_init(MachineState *machine)
exit(1);
}
- if (vms->virt && kvm_enabled()) {
- error_report("mach-virt: KVM does not support providing "
- "Virtualization extensions to the guest CPU");
+ if (vms->virt && (kvm_enabled() || hvf_enabled())) {
+ error_report("mach-virt: %s does not support providing "
+ "Virtualization extensions to the guest CPU",
+ kvm_enabled() ? "KVM" : "HVF");
exit(1);
}
- if (vms->mte && kvm_enabled()) {
- error_report("mach-virt: KVM does not support providing "
- "MTE to the guest CPU");
+ if (vms->mte && (kvm_enabled() || hvf_enabled())) {
+ error_report("mach-virt: %s does not support providing "
+ "MTE to the guest CPU",
+ kvm_enabled() ? "KVM" : "HVF");
exit(1);
}
--
2.25.1
- [PULL 0/5] target-arm queue, Peter Maydell, 2021/11/29
- [PULL 1/5] hw/arm/virt: Extend nested and mte checks to hvf,
Peter Maydell <=
- [PULL 2/5] hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit, Peter Maydell, 2021/11/29
- [PULL 4/5] hw/intc/arm_gicv3: Add new gicv3_intid_is_special() function, Peter Maydell, 2021/11/29
- [PULL 3/5] hw/intc/arm_gicv3: Update cached state after LPI state changes, Peter Maydell, 2021/11/29
- [PULL 5/5] hw/intc/arm_gicv3: fix handling of LPIs in list registers, Peter Maydell, 2021/11/29
- Re: [PULL 0/5] target-arm queue, Richard Henderson, 2021/11/29