x86: Merge cpuid and msr policy objects
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest15 patches 12 repliesIn review
- v1 RFC9 patches 24 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | x86: Rename struct cpu_policy to struct old_cpuid_policytools/ tools/ xen/ +4 more | +14 | 0 replies | |
| 2/15 | x86: Rename {domctl,sysctl}.cpu_policy.{cpuid,msr}_policy fieldstools/ xen/ xen/ +2 more | +20 | 0 replies | |
| 3/15 | x86: Rename struct cpuid_policy to struct cpu_policytools/ tools/ tools/ +5 more | +467 | 0 replies | |
| 4/15 | x86: Merge struct msr_policy into struct cpu_policytools/ xen/ xen/ +2 more | +83 | 0 replies | |
| 5/15 | x86: Merge the system {cpuid,msr} policy objectsxen/ xen/ xen/ +7 more | +116 | 0 replies | |
| 6/15 | x86: Merge a domain's {cpuid,msr} policy objectsxen/ xen/ xen/ +7 more | +86 | 0 replies | |
| 7/15 | x86: Merge xc_cpu_policy's cpuid and msr objectstools/ tools/ tools/ | +53 | 0 replies | |
| 8/15 | x86: Drop struct old_cpu_policytools/ tools/ xen/ +2 more | +27 | 0 replies | |
| 9/15 | x86: Out-of-inline the policy<->featureset convertorstools/ xen/ xen/ +2 more | +68 | 2 replies | |
| 10/15 | x86/boot: Move MSR policy initialisation logic into cpu-policy.cxen/ xen/ xen/ +2 more | +89 | 1 reply | |
| 11/15 | x86/boot: Merge CPUID policy initialisation logic into cpu-policy.cxen/ xen/ xen/ +4 more | +764 | 4 replies | |
| 12/15 | x86/emul: Switch x86_emulate_ctxt to cpu_policytools/ tools/ tools/ +6 more | +15 | 1 reply | |
| 13/15 | tools/fuzz: Rework afl-policy-fuzzertools/ | +20 | 1 reply | |
| 14/15 | libx86: Update library API for cpu_policytools/ tools/ tools/ +6 more | +46 | 4 replies | |
| 15/15 | x86: Remove temporary {cpuid,msr}_policy definesxen/ xen/ xen/ +11 more | +26 | 1 reply |
Reviews trailers per patch
All 15 patches have a Reviewed-by or Acked-by.
| Patch | Jan Beulich |
|---|---|
| 1/15 | R-b |
| 2/15 | R-b |
| 3/15 | R-b |
| 4/15 | R-b |
| 5/15 | R-b |
| 6/15 | R-b |
| 7/15 | R-b |
| 8/15 | R-b |
| 9/15 | A-b |
| 10/15 | A-b |
| 11/15 | A-b |
| 12/15 | R-b |
| 13/15 | R-b |
| 14/15 | A-b |
| 15/15 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 00/15] x86: Merge cpuid and msr policy objects
This is in order to be able to put MSR_ARCH_CAPS in a featureset. In hindsight it was a mistake separating CPUID and read-only MSR data into separate structs.
Patches 1-8 were posted previously and have had the feedback addressed. Patches 9-15 are the result of splitting the older RFC patch 9 apart, with the discussed adjustment to aliases accounted for.
Gitlab run showing the series to be buildable at each changeset:
https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/4053607867
P.S. I'm not sure I believe the net diffstat below. I think the cpuid.c => cpu-policy.c rename is confusing it.
Andrew Cooper (15):
x86: Rename struct cpu_policy to struct old_cpuid_policy
x86: Rename {domctl,sysctl}.cpu_policy.{cpuid,msr}_policy fields
x86: Rename struct cpuid_policy to struct cpu_policy
x86: Merge struct msr_policy into struct cpu_policy
x86: Merge the system {cpuid,msr} policy objects
x86: Merge a domain's {cpuid,msr} policy objects
x86: Merge xc_cpu_policy's cpuid and msr objects
x86: Drop struct old_cpu_policy
x86: Out-of-inline the policy<->featureset convertors x86/boot: Move MSR policy initialisation logic into cpu-policy.c x86/boot: Merge CPUID policy initialisation logic into cpu-policy.c x86/emul: Switch x86_emulate_ctxt to cpu_policy tools/fuzz: Rework afl-policy-fuzzer
libx86: Update library API for cpu_policy
x86: Remove temporary {cpuid,msr}_policy defines
tools/fuzz/cpu-policy/afl-policy-fuzzer.c | 64 +-
.../fuzz/x86_instruction_emulator/fuzz-emul.c | 2 +-
tools/libs/guest/xg_cpuid_x86.c | 50 +-
tools/libs/guest/xg_private.h | 5 +-
tools/tests/cpu-policy/test-cpu-policy.c | 54 +-
tools/tests/tsx/test-tsx.c | 71 +-
tools/tests/x86_emulator/Makefile | 2 +-
tools/tests/x86_emulator/test_x86_emulator.c | 2 +-
tools/tests/x86_emulator/x86-emulate.c | 4 +-
tools/tests/x86_emulator/x86-emulate.h | 2 +-
xen/arch/x86/Makefile | 1 +
xen/arch/x86/{cpuid.c => cpu-policy.c} | 692 ++++----------
xen/arch/x86/cpu/common.c | 4 +-
xen/arch/x86/cpu/mcheck/mce_intel.c | 2 +-
xen/arch/x86/cpuid.c | 856 +-----------------
xen/arch/x86/domain.c | 17 +-
xen/arch/x86/domctl.c | 51 +-
xen/arch/x86/hvm/emulate.c | 4 +-
xen/arch/x86/hvm/hvm.c | 5 +-
xen/arch/x86/hvm/svm/svm.c | 2 +-
xen/arch/x86/hvm/vlapic.c | 2 +-
xen/arch/x86/hvm/vmx/vmx.c | 8 +-
xen/arch/x86/include/asm/cpu-policy.h | 27 +
xen/arch/x86/include/asm/cpuid.h | 21 +-
xen/arch/x86/include/asm/domain.h | 13 +-
xen/arch/x86/include/asm/msr.h | 14 +-
xen/arch/x86/mm/mem_sharing.c | 3 +-
xen/arch/x86/mm/shadow/hvm.c | 2 +-
xen/arch/x86/msr.c | 160 +---
xen/arch/x86/pv/domain.c | 3 +-
xen/arch/x86/pv/emul-priv-op.c | 6 +-
xen/arch/x86/pv/ro-page-fault.c | 2 +-
xen/arch/x86/setup.c | 5 +-
xen/arch/x86/sysctl.c | 79 +-
xen/arch/x86/traps.c | 2 +-
xen/arch/x86/x86_emulate/private.h | 4 +-
xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
xen/arch/x86/x86_emulate/x86_emulate.h | 9 +-
xen/arch/x86/xstate.c | 4 +-
xen/include/public/domctl.h | 4 +-
xen/include/public/sysctl.h | 4 +-
xen/include/xen/lib/x86/cpu-policy.h | 510 ++++++++++-
xen/include/xen/lib/x86/cpuid.h | 475 ----------
xen/include/xen/lib/x86/msr.h | 104 ---
xen/lib/x86/cpuid.c | 68 +-
xen/lib/x86/msr.c | 6 +-
xen/lib/x86/policy.c | 8 +-
47 files changed, 1005 insertions(+), 2430 deletions(-)
copy xen/arch/x86/{cpuid.c => cpu-policy.c} (52%)
create mode 100644 xen/arch/x86/include/asm/cpu-policy.h
delete mode 100644 xen/include/xen/lib/x86/cpuid.h
delete mode 100644 xen/include/xen/lib/x86/msr.hSignature · 1 line
2.30.2