|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/arm: Hide PMU feature
Hi, On 03/08/2026 01:42, Hirokazu Takahashi wrote: On ARMv8.4-A and newer platforms, booting Dom0 Linux with ACPI enabled causes the domain to probe advanced PMU feature based on system ID register ID_AA64DFR0_EL1. During this probe, Linux accesses PMMIR_EL1, which causes unhandled register traps and crashes the domain. Merely adding emulation code for PMMIR_EL1 in Xen is insufficient to fix the issue, as the guest PMU driver subsequently stalls during its initialization sequence. Fix this by explicitly masking PMU capability fields in create_domain_cpuinfo(). Additionally, preemptively mask other capability fields to prevent similar potential issues. While I agree Xen doesn't support PMU capability for every guest, I believe we are still allowing to expose the PMU in some cases (see commit dbb948110a "xen: Expose the PMU to the guests"). So we can't simply mask the features. So I think ... ... this section needs to be conditional. + + /* Hide SPE, TRBE, BRBE, and Trace Extensions */ + domain_cpuinfo.dbg64.pms_ver = 0; + domain_cpuinfo.dbg64.trace_ver = 0; + domain_cpuinfo.dbg64.trace_filt = 0; + domain_cpuinfo.dbg64.trace_buffer = 0; + domain_cpuinfo.dbg64.ext_trc_buff = 0; + domain_cpuinfo.dbg64.brbe = 0; This section should be fine to unconditionally mask. #endif+ /* Hide PMUv1,v2 support as Xen does not support it */ Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |