Re: [PATCH 05/10] target/arm: Honour MDCR_EL2.HPMD in Secure EL2

2022-08-11 Thread Peter Maydell
On Thu, 11 Aug 2022 at 18:48, Richard Henderson wrote: > You can use |= for bool as well. You don't need the short-circuting of || > here. That seems like the kind of thing that -Wbool-operation is likely to warn about either now or in future, though... -- PMM

Re: [PATCH 05/10] target/arm: Honour MDCR_EL2.HPMD in Secure EL2

2022-08-11 Thread Richard Henderson
On 8/11/22 10:16, Peter Maydell wrote: The logic in pmu_counter_enabled() for handling the 'prohibit event counting' bits MDCR_EL2.HPMD and MDCR_EL3.SPME is written in a way that assumes that EL2 is never Secure. This used to be true, but the architecture now permits Secure EL2, and QEMU can emu

[PATCH 05/10] target/arm: Honour MDCR_EL2.HPMD in Secure EL2

2022-08-11 Thread Peter Maydell
The logic in pmu_counter_enabled() for handling the 'prohibit event counting' bits MDCR_EL2.HPMD and MDCR_EL3.SPME is written in a way that assumes that EL2 is never Secure. This used to be true, but the architecture now permits Secure EL2, and QEMU can emulate this. Refactor the prohibit logic s