arm: demuxed ID registers (CCSIDR_EL1)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 10 repliesIn review
- v1 RFC3 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- use a proper #define so that it is clearer why we end up with that specific array size
- rebased on top of master
- collected T-bs and R-bs (thanks!)
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | arm: handle demuxed ID registerstarget/ target/ | +33 | 4 replies | |
| 2/3 | arm: handle CCSIDR_EL1 as a demuxed registerhw/ target/ target/ +5 more | +56 | 2 replies | |
| 3/3 | arm/kvm: get demuxed ID registers from kvmtarget/ | +33 | 2 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Alireza Sanaee | Sebastian Ott |
|---|---|---|
| 1/3 | T-b | R-b |
| 2/3 | T-b | R-b |
| 3/3 | T-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] arm: demuxed ID registers (CCSIDR_EL1)
[previously posted as RFC, but given that I got T-b and R-b, I promoted it to full v2 :)]
Changes RFC->v2:
- use a proper #define so that it is clearer why we end up with that specific array size
- rebased on top of master
- collected T-bs and R-bs (thanks!)
Original cover letter follows. I'm not sure whether the questions contain any actual blockers, or whether it is easier to just go ahead and deal with it later.
--------8<---------8<--------
While trying to move to an autogenerated cpu-sysregs.h.inc (so that we may keep a common view on registers), we should first address the ID registers that are still kept outside of ARMISARegisters. Other than DCZID_EL0 (addressed by the series this one goes on top of), that's the CCSIDR_EL1 values kept in cpu->cssidr[] (indexed via CSSELR_EL1.)
My idea was to provide {GET,SET}_IDREG_DEMUX helper that work similar to {GET,SET}_IDREG and operate on a two-dimensional array. As a side effect, this also allows to get the values KVM provides for CCSIDR_EL1 (which are virtualized as well.)
RFC because there are still some open questions:
- The demux array cannot easily be autogenerated. We can get rid of the ccsidr[] array, but we now have an autogenerated entry in the non-demux array that does nothing. Both are not that nice.
- I'm not sure if we need any compat handling for KVM (on TCG, everything should stay the same.) In theory, the KVM interface allows setting values from userspace (I didn't try.)
- There's a slight disagreement between the current code (providing 16 entries for CCSIDR_EL1) and the KVM code (providing (7 cache levels) * (data/unified, instruction) = 14 entries.) With FEAT_MTE2, we might be needing 7 more entries.
Feedback appreciated.
--------8<---------8<--------
Cornelia Huck (3):
arm: handle demuxed ID registers
arm: handle CCSIDR_EL1 as a demuxed register
arm/kvm: get demuxed ID registers from kvm
hw/intc/armv7m_nvic.c | 2 +- target/arm/cpu-sysregs.h | 14 +++++++++ target/arm/cpu-sysregs.h.inc | 1 + target/arm/cpu.h | 26 ++++++++++++---- target/arm/cpu64.c | 12 ++++---- target/arm/helper.c | 2 +- target/arm/kvm.c | 33 ++++++++++++++++++++ target/arm/tcg/cpu32.c | 32 +++++++++---------- target/arm/tcg/cpu64.c | 60 ++++++++++++++++++------------------ 9 files changed, 122 insertions(+), 60 deletions(-)
Signature · 1 line
2.52.0