Skip to content

x86/cpuid: Switch to using XEN_DOMCTL_set_cpumsr_policy

Andrew Cooper xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 16 repliesIn review
  2. v18 patches 22 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10x86/msr: Offer CPUID Faulting to PVH control domainsxen/arch/x86/cpu/common.c xen/arch/x86/msr.c+5 -41 reply
2/10libx86: Proactively initialise error pointerstools/tests/cpu-policy/test-cpu-policy.c xen/include/xen/lib/x86/cpuid.h xen/include/xen/lib/x86/msr.h +2 more+15 -71 reply
3/10libx86: Introduce x86_cpu_policies_are_compatible()tools/tests/cpu-policy/Makefile tools/tests/cpu-policy/test-cpu-policy.c xen/include/xen/lib/x86/cpu-policy.h +2 more+191 -32 replies
4/10x86/cpuid: Split update_domain_cpuid_info() in halfxen/arch/x86/domctl.c+99 -1460 replies
5/10x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policytools/libxc/include/xenctrl.h tools/libxc/xc_cpuid_x86.c xen/arch/x86/domctl.c +3 more+146 -52 replies
6/10tools/libxc: Pre-cleanup for xc_cpuid_{set, apply_policy}()tools/libxc/include/xenctrl.h tools/libxc/xc_cpuid_x86.c+15 -82 replies
7/10tools/libxc: Rework xc_cpuid_set() to use {get, set}_cpu_policy()tools/libxc/xc_cpuid_x86.c+84 -110 replies
8/10tools/libxc: Rework xc_cpuid_apply_policy() to use {get, set}_cpu_policy()tools/libxc/xc_cpuid_x86.c xen/include/xen/lib/x86/cpuid.h+197 -6129 replies
9/10x86/domctl: Drop XEN_DOMCTL_set_cpuidtools/flask/policy/modules/dom0.te tools/flask/policy/modules/xen.if xen/arch/x86/domctl.c +3 more+5 -1170 replies
10/10x86/cpuid: Enable CPUID Faulting for PV control domains by defaultdocs/misc/xen-command-line.pandoc xen/arch/x86/cpu/common.c xen/arch/x86/dom0_build.c +2 more+37 -142 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchJan BeulichWei Liu
1/10R-b
2/10A-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b R-b A-b A-b
9/10A-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Xen-devel] [PATCH v2 00/10] x86/cpuid: Switch to using XEN_DOMCTL_set_cpumsr_policy

This is the next part of the Xen/Toolstack CPUID/MSR work. With most of the pieces in place, implement XEN_DOMCTL_set_cpumsr_policy to obsolete the problematic XEN_DOMCTL_set_cpuid.

Key improvements:

1) The API supports configuring static MSR settings for the domain, a capbility which Xen has never had before.
2) The hypercall supports saying no when the toolstack tries to pass problematic data.
3) The domain builder no longer uses native CPUID instructions for constructing guest policies, which is and has always been erroneous behaviour.
4) Vastily reduce the number of hypercalls for typicaly guest construction, by not issuing a hypercall per CPUID leaf.

Patch 3 has been posted before, but a long time ago and it has changed substantially, so I've decided to start the version numbering from fresh.

This series can be found in git from from:
http://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/xen-cpuid

Large changes from v2:
* Split several changes out into earlier patches. Rebase around.
* Introduce dom0=no-cpuid-faulting to restore previous behaviour.

See individual patches for changes.

Andrew Cooper (10):
x86/msr: Offer CPUID Faulting to PVH control domains
libx86: Proactively initialise error pointers
libx86: Introduce x86_cpu_policies_are_compatible() x86/cpuid: Split update_domain_cpuid_info() in half x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy tools/libxc: Pre-cleanup for xc_cpuid_{set,apply_policy}() tools/libxc: Rework xc_cpuid_set() to use {get,set}_cpu_policy() tools/libxc: Rework xc_cpuid_apply_policy() to use {get,set}_cpu_policy() x86/domctl: Drop XEN_DOMCTL_set_cpuid
x86/cpuid: Enable CPUID Faulting for PV control domains by default

 docs/misc/xen-command-line.pandoc        |  19 +-
 tools/flask/policy/modules/dom0.te       |   2 +-
 tools/flask/policy/modules/xen.if        |   2 +-
 tools/libxc/include/xenctrl.h            |   7 +-
 tools/libxc/xc_cpuid_x86.c               | 928 +++++++++++--------------------
 tools/tests/cpu-policy/Makefile          |   2 +-
 tools/tests/cpu-policy/test-cpu-policy.c | 115 +++-
 xen/arch/x86/cpu/common.c                |  29 +-
 xen/arch/x86/dom0_build.c                |   2 +
 xen/arch/x86/domctl.c                    | 258 ++++-----
 xen/arch/x86/msr.c                       |   5 +-
 xen/include/asm-x86/setup.h              |   1 +
 xen/include/public/domctl.h              |  29 +-
 xen/include/xen/lib/x86/cpu-policy.h     |  26 +
 xen/include/xen/lib/x86/cpuid.h          |  17 +-
 xen/include/xen/lib/x86/msr.h            |   4 +-
 xen/lib/x86/Makefile                     |   1 +
 xen/lib/x86/cpuid.c                      |   5 +
 xen/lib/x86/msr.c                        |   3 +
 xen/lib/x86/policy.c                     |  54 ++
 xen/xsm/flask/hooks.c                    |   4 +-
 xen/xsm/flask/policy/access_vectors      |   4 +-
 22 files changed, 692 insertions(+), 825 deletions(-)
 create mode 100644 xen/lib/x86/policy.c
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel