[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/18] hw/arm/virt: Disable LPA2 for -machine virt-6.2
From: |
Peter Maydell |
Subject: |
[PULL 18/18] hw/arm/virt: Disable LPA2 for -machine virt-6.2 |
Date: |
Mon, 7 Mar 2022 16:47:09 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
There is a Linux kernel bug present until v5.12 that prevents
booting with FEAT_LPA2 enabled. As a workaround for TCG,
disable this feature for machine versions prior to 7.0.
Cc: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/arm/virt.h | 1 +
hw/arm/virt.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index c1ea17d0def..7e76ee26198 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -132,6 +132,7 @@ struct VirtMachineClass {
bool no_secure_gpio;
/* Machines < 6.2 have no support for describing cpu topology to guest */
bool no_cpu_topology;
+ bool no_tcg_lpa2;
};
struct VirtMachineState {
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 46bf7ceddf3..46a42502bc5 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2102,6 +2102,10 @@ static void machvirt_init(MachineState *machine)
object_property_set_bool(cpuobj, "pmu", false, NULL);
}
+ if (vmc->no_tcg_lpa2 && object_property_find(cpuobj, "lpa2")) {
+ object_property_set_bool(cpuobj, "lpa2", false, NULL);
+ }
+
if (object_property_find(cpuobj, "reset-cbar")) {
object_property_set_int(cpuobj, "reset-cbar",
vms->memmap[VIRT_CPUPERIPHS].base,
@@ -3020,8 +3024,11 @@ DEFINE_VIRT_MACHINE_AS_LATEST(7, 0)
static void virt_machine_6_2_options(MachineClass *mc)
{
+ VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+
virt_machine_7_0_options(mc);
compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
+ vmc->no_tcg_lpa2 = true;
}
DEFINE_VIRT_MACHINE(6, 2)
--
2.25.1
- [PULL 09/18] target/arm/translate-neon: UNDEF if VLD1/VST1 stride bits are non-zero, (continued)
- [PULL 09/18] target/arm/translate-neon: UNDEF if VLD1/VST1 stride bits are non-zero, Peter Maydell, 2022/03/07
- [PULL 08/18] osdep: Move memalign-related functions to their own header, Peter Maydell, 2022/03/07
- [PULL 10/18] target/arm/translate-neon: Simplify align field check for VLD3, Peter Maydell, 2022/03/07
- [PULL 11/18] hw/intc/arm_gicv3_its: Add trace events for commands, Peter Maydell, 2022/03/07
- [PULL 12/18] hw/intc/arm_gicv3_its: Add trace events for table reads and writes, Peter Maydell, 2022/03/07
- [PULL 13/18] hw/intc/arm_gicv3: Specify valid and impl in MemoryRegionOps, Peter Maydell, 2022/03/07
- [PULL 14/18] hw/intc/arm_gicv3: Fix missing spaces in error log messages, Peter Maydell, 2022/03/07
- [PULL 15/18] hw/intc/arm_gicv3_cpuif: Fix register names in ICV_HPPIR read trace event, Peter Maydell, 2022/03/07
- [PULL 16/18] ui/cocoa: Use the standard about panel, Peter Maydell, 2022/03/07
- [PULL 17/18] target/arm: Provide cpu property for controling FEAT_LPA2, Peter Maydell, 2022/03/07
- [PULL 18/18] hw/arm/virt: Disable LPA2 for -machine virt-6.2,
Peter Maydell <=
- Re: [PULL 00/18] target-arm queue, Peter Maydell, 2022/03/08