[PATCH] hvf: arm: fix Windows boot with kernel-irqchip=on

Mohamed Mediouni posted 1 patch 1 month ago
Failed in applying to current master (apply log)
There is a newer version of this series
target/arm/hvf/hvf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[PATCH] hvf: arm: fix Windows boot with kernel-irqchip=on
Posted by Mohamed Mediouni 1 month ago
Windows really wants at least a single counter PMU so give it even when
using the kernel-irqchip with nested virt off.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
---
 target/arm/hvf/hvf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 8aa59a1f77..883a341064 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1187,8 +1187,12 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
 
     clamp_id_aa64mmfr0_parange_to_ipa_size(&host_isar);
 
-    if (hvf_nested_virt_enabled()) {
+    /* Windows really wants at least a single counter PMU... */
+    if (hvf_irqchip_in_kernel()) {
         FIELD_DP64_IDREG(&host_isar, ID_AA64DFR0, PMUVER, 0x1);
+    }
+
+    if (hvf_nested_virt_enabled()) {
         /* SME is not implemented with nested virt on the Apple side */
         FIELD_DP64_IDREG(&host_isar, ID_AA64PFR1, SME, 0);
     }
-- 
2.50.1 (Apple Git-155)