Add vPMU vPMU support under TCG mode
Status from this message: Applied to target-arm.next, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 3 repliesApplied
- v25 patches 8 repliesSuperseded
- v14 patches 4 repliesSuperseded
Changes in v3 from the cover letter
* Remove PMXEVCNTR_EL0 support
* Add read access support for PMXEVTYPER and change the CONSTRAINED UNPREDICTABLE behavior of PMXEVTYPER to RAZ/WI.
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | target-arm: Add support for PMU register PMSELR_EL0target/ target/ | +21 | 0 replies | |
| 2/4 | target-arm: Add support for AArch64 PMU register PMXEVTYPER_EL0target/ target/ | +25 | 0 replies | |
| 3/4 | target-arm: Add support for PMU register PMINTENSET_EL1target/ target/ | +10 | 0 replies | |
| 4/4 | target-arm: Enable vPMU support under TCG modehw/ target/ target/ | +3 | 0 replies |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Peter Maydell |
|---|---|
| 1/4 | R-b |
| 2/4 | |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-arm] [PATCH V3 0/4] Add vPMU vPMU support under TCG mode
QEMU has implemented cycle count support for guest VM under TCG mode. But this feature is not complete. In fact using perf inside a 64-bit Linux guest VM (under TCG) can cause the following kernel panic because some PMU registers are not implemented.
[ 329.445970] [<fffffe000009e600>] armv8pmu_enable_event+0x58/0x8c [ 329.446713] [<fffffe0000621e74>] armpmu_start+0x4c/0x74
This patchset solves the problem by adding support for missing vPMU registers. Basic perf test can work (both ACPI and DT) now under TCG by applying this patchset.
address@hidden ~]# perf stat ls
Performance counter stats for 'ls':
226.740256 task-clock (msec) # 0.312 CPUs utilized
76 context-switches # 0.335 K/sec
0 cpu-migrations # 0.000 K/sec
64 page-faults # 0.282 K/sec
186,031,410 cycles # 0.820 GHz (36.40%)
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
<not counted> instructions (0.00%)
<not supported> branches
<not counted> branch-misses (0.00%)V2->V3:
* Remove PMXEVCNTR_EL0 support
* Add read access support for PMXEVTYPER and change the CONSTRAINED UNPREDICTABLE behavior of PMXEVTYPER to RAZ/WI.
V1->V2:
* Change most PMU registers to 64bit and the behavior of PMXEVTYPER
* Add support for PMXEVCNTR_EL0
* Misc fixes (DT, ID_AA64DFR0_EL1, ...) under TCG mode
Thanks,
-Wei
Wei Huang (4):
target-arm: Add support for PMU register PMSELR_EL0
target-arm: Add support for AArch64 PMU register PMXEVTYPER_EL0
target-arm: Add support for PMU register PMINTENSET_EL1
target-arm: Enable vPMU support under TCG mode
hw/arm/virt.c | 2 +- target/arm/cpu.c | 2 +- target/arm/cpu.h | 4 +-- target/arm/helper.c | 72 ++++++++++++++++++++++++++++++++++++++++------------- 4 files changed, 59 insertions(+), 21 deletions(-)
Signature · 1 line
1.8.3.1