On 28/7/25 15:41, Mohamed Mediouni wrote:
 From Apple documentation:

When EL2 is disabled, PMU register accesses trigger "Trapped MSR, MRS, or
System Instruction" exceptions. When this happens, hv_vcpu_run() returns, and 
the
 hv_vcpu_exit_t object contains the information about this exception.

When EL2 is enabled, the handling of PMU register accesses is determined by the 
PMUVer
field of ID_AA64DFR0_EL1 register.
If the PMUVer field value is zero or is invalid, PMU register accesses generate 
"Undefined"
exceptions, which are sent to the guest.
If the PMUVer field value is non-zero and valid, PMU register accesses are 
emulated by the framework.
The ID_AA64DFR0_EL1 register can be modified via hv_vcpu_set_sys_reg API.

Signed-off-by: Mohamed Mediouni <moha...@unpredictable.fr>
---
  target/arm/hvf/hvf.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Tested-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to