xen/arm: Emulate ID registers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest8 patches 22 repliesIn review
- v37 patches 36 repliesSuperseded
- v27 patches 23 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 7 patches | 4 replies | Superseded |
Changes in v4 from the cover letter
Add a patch to switch implementation to use READ_SYSREG instead of the 32/64 bit version of it.
Move cases for reserved register handling from macros to the code itself.
Various typos fixes.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | xen/arm: Use READ_SYSREG instead of 32/64 versionsxen/ | +25 | 2 replies | |
| 2/8 | xen/arm: Add ID registers and complete cpuinfoxen/ xen/ xen/ +1 more | +102 | 1 reply | |
| 3/8 | xen/arm: Add arm64 ID registers definitionsxen/ | +37 | 1 reply | |
| 4/8 | xen/arm: create a cpuinfo structure for guestxen/ xen/ | +53 | 1 reply | |
| 5/8 | xen/arm: Add handler for ID registers on arm64xen/ | +82 | 1 reply | |
| 6/8 | xen/arm: Add handler for cp15 ID registersxen/ | +65 | 2 replies | |
| 7/8 | xen/arm: Add CP10 exception support to handle MVFRxen/ xen/ xen/ +1 more | +44 | 1 reply | |
| 8/8 | xen/arm: Activate TID3 in HCR_EL2xen/ | +1 | 1 reply |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Stefano Stabellini | Bertrand Marquis |
|---|---|---|
| Series | R-b | |
| 1/8 | R-b | |
| 2/8 | R-b | |
| 3/8 | R-b | |
| 4/8 | R-b | |
| 5/8 | R-b | |
| 6/8 | R-b | |
| 7/8 | R-b | |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/8] xen/arm: Emulate ID registers
The goal of this serie is to emulate coprocessor ID registers so that Xen only publish to guest features that are supported by Xen and can actually be used by guests.
One practical example where this is required are SVE support which is forbidden by Xen as it is not supported, but if Linux is compiled with it, it will crash on boot. An other one is AMU which is also forbidden by Xen but one Linux compiled with it would crash if the platform supports it.
To be able to emulate the coprocessor registers defining what features are supported by the hardware, the TID3 bit of HCR must be disabled and Xen must emulated the values of those registers when an exception is catched when a guest is accessing it.
This serie is first creating a guest cpuinfo structure which will contain the values that we want to publish to the guests and then provides the proper emulationg for those registers when Xen is getting an exception due to an access to any of those registers.
This is a first simple implementation to solve the problem and the way to define the values that we provide to guests and which features are disabled will be in a future patchset enhance so that we could decide per guest what can be used or not and depending on this deduce the bits to activate in HCR and the values that we must publish on ID registers.
---
Changes in V2:
Fix First patch to properly handle DFR1 register and increase dbg32 size. Other patches have just been rebased.
Changes in V3:
Add handling of reserved registers as RAZ
Minor fixes described in each patch
Changes in V4:
Add a patch to switch implementation to use READ_SYSREG instead of the 32/64 bit version of it.
Move cases for reserved register handling from macros to the code itself.
Various typos fixes.
Bertrand Marquis (8):
xen/arm: Use READ_SYSREG instead of 32/64 versions xen/arm: Add ID registers and complete cpuinfo xen/arm: Add arm64 ID registers definitions xen/arm: create a cpuinfo structure for guest xen/arm: Add handler for ID registers on arm64 xen/arm: Add handler for cp15 ID registers xen/arm: Add CP10 exception support to handle MVFR xen/arm: Activate TID3 in HCR_EL2
xen/arch/arm/arm64/vsysreg.c | 82 ++++++++++++++++++++ xen/arch/arm/cpufeature.c | 113 ++++++++++++++++++++++------ xen/arch/arm/traps.c | 7 +- xen/arch/arm/vcpreg.c | 102 +++++++++++++++++++++++++ xen/include/asm-arm/arm64/hsr.h | 37 +++++++++ xen/include/asm-arm/arm64/sysregs.h | 28 +++++++ xen/include/asm-arm/cpregs.h | 15 ++++ xen/include/asm-arm/cpufeature.h | 58 +++++++++++--- xen/include/asm-arm/perfc_defn.h | 1 + xen/include/asm-arm/traps.h | 1 + 10 files changed, 409 insertions(+), 35 deletions(-)
Signature · 1 line
2.17.1