All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] x86: CPUID and MSR policy marshalling support
@ 2018-07-03 20:55 Andrew Cooper
  2018-07-03 20:55 ` [PATCH 01/13] libx86: Introduce libx86/cpuid.h Andrew Cooper
                   ` (13 more replies)
  0 siblings, 14 replies; 67+ messages in thread
From: Andrew Cooper @ 2018-07-03 20:55 UTC (permalink / raw)
  To: Xen-devel
  Cc: Sergey Dyasli, Wei Liu, Andrew Cooper, Ian Jackson, Jan Beulich,
	Daniel De Graaf, Roger Pau Monné

This series introduces libx86, a small shared library between the hypervisor
and libxc, and hypercalls to get/set full CPUID/MSR policies.  Future work
will arrange for XEN_DOMCTL_set_cpumsr_policy to function properly, after the
auditing and comparison logic is sorted.

In the meantime, the data marshalling logic is in a suitable state for review.

Some open questions:

  * The position of libx86 in the source tree.  It probably doesn't want to
    live in its current location.
  * Naming of various files, particularly policy.c (which I don't like, but
    can't think of anything better).
  * A TOCTOU race in the final patch, caused by the copy_from_guest() ABI.
    More details in that patch.

This series is based on x86-next, and can be found in git form here:

  http://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/cpuid-marshal-v1

Andrew Cooper (5):
  libx86: Introduce libx86/cpuid.h
  libx86: Introduce libx86/msr.h and share msr_{domain,vcpu}_policy with userspace
  libx86: Introduce a helper to serialise a cpuid_policy object
  x86: Collect policies together into groups
  libx86: Introduce a helper to deserialise a cpuid_policy object

Roger Pau Monné (5):
  libx86: generate cpuid-autogen.h in the libx86 include dir
  libx86: Share struct cpuid_policy with userspace
  libx86: introduce a libx86 shared library
  libx86: Introduce a helper to serialise msr_{domain,vcpu}_policy objects
  libx86: introduce a helper to deserialize MSR policies

Sergey Dyasli (3):
  x86/sysctl: Implement XEN_SYSCTL_get_cpumsr_policy
  x86/domctl: Implement XEN_DOMCTL_get_cpumsr_policy
  x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy

 .gitignore                                  |   2 +-
 tools/include/Makefile                      |  15 ++
 tools/libxc/Makefile                        |  14 +-
 tools/libxc/include/xenctrl.h               |  15 +-
 tools/libxc/xc_cpuid_x86.c                  | 163 +++++++++++++++++---
 tools/misc/xen-cpuid.c                      | 135 +++++++++++++++-
 tools/tests/x86_emulator/x86-emulate.h      |   2 +
 xen/arch/x86/cpu/common.c                   |   2 +-
 xen/arch/x86/cpuid.c                        |  32 +---
 xen/arch/x86/domctl.c                       | 133 ++++++++++++++++
 xen/arch/x86/msr.c                          |   4 +-
 xen/arch/x86/sysctl.c                       | 101 ++++++++++++
 xen/arch/x86/x86_emulate/x86_emulate.h      |   7 +-
 xen/common/Makefile                         |   1 +
 xen/common/libx86/Makefile                  |   3 +
 xen/common/libx86/cpuid.c                   | 226 +++++++++++++++++++++++++++
 xen/common/libx86/libx86-private.h          |  74 +++++++++
 xen/common/libx86/msr.c                     | 134 ++++++++++++++++
 xen/common/libx86/policies.c                |  19 +++
 xen/include/Makefile                        |   6 +-
 xen/include/asm-x86/cpufeatures.h           |   2 +-
 xen/include/asm-x86/cpuid.h                 | 228 +---------------------------
 xen/include/asm-x86/msr.h                   |  65 ++------
 xen/include/public/arch-x86/xen.h           |  18 +++
 xen/include/public/domctl.h                 |  25 +++
 xen/include/public/sysctl.h                 |  41 +++++
 xen/include/{asm-x86 => xen/libx86}/cpuid.h | 103 +++++--------
 xen/include/xen/libx86/msr.h                |  78 ++++++++++
 xen/include/xen/libx86/policies.h           |  35 +++++
 xen/include/xen/xmalloc.h                   |   7 +
 xen/xsm/flask/hooks.c                       |   3 +
 xen/xsm/flask/policy/access_vectors         |   4 +-
 32 files changed, 1281 insertions(+), 416 deletions(-)
 create mode 100644 xen/common/libx86/Makefile
 create mode 100644 xen/common/libx86/cpuid.c
 create mode 100644 xen/common/libx86/libx86-private.h
 create mode 100644 xen/common/libx86/msr.c
 create mode 100644 xen/common/libx86/policies.c
 copy xen/include/{asm-x86 => xen/libx86}/cpuid.h (77%)
 create mode 100644 xen/include/xen/libx86/msr.h
 create mode 100644 xen/include/xen/libx86/policies.h

-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 67+ messages in thread

end of thread, other threads:[~2018-07-06 10:02 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03 20:55 [PATCH 00/13] x86: CPUID and MSR policy marshalling support Andrew Cooper
2018-07-03 20:55 ` [PATCH 01/13] libx86: Introduce libx86/cpuid.h Andrew Cooper
2018-07-04  6:54   ` Wei Liu
2018-07-04  8:21   ` Jan Beulich
2018-07-04 12:03     ` Andrew Cooper
2018-07-04 13:57       ` Jan Beulich
2018-07-06  1:35         ` Doug Goldstein
2018-07-06  8:07           ` Jan Beulich
2018-07-03 20:55 ` [PATCH 02/13] libx86: generate cpuid-autogen.h in the libx86 include dir Andrew Cooper
2018-07-04  7:03   ` Wei Liu
2018-07-04  8:33   ` Jan Beulich
2018-07-03 20:55 ` [PATCH 03/13] libx86: Share struct cpuid_policy with userspace Andrew Cooper
2018-07-04  7:08   ` Wei Liu
2018-07-04  8:36   ` Jan Beulich
2018-07-03 20:55 ` [PATCH 04/13] libx86: introduce a libx86 shared library Andrew Cooper
2018-07-04  7:20   ` Wei Liu
2018-07-04  8:42   ` Jan Beulich
2018-07-04 15:48     ` Andrew Cooper
2018-07-03 20:55 ` [PATCH 05/13] libx86: Introduce libx86/msr.h and share msr_{domain, vcpu}_policy with userspace Andrew Cooper
2018-07-04  7:21   ` Wei Liu
2018-07-04  8:43   ` Jan Beulich
2018-07-03 20:55 ` [PATCH 06/13] libx86: Introduce a helper to serialise a cpuid_policy object Andrew Cooper
2018-07-04  8:42   ` Wei Liu
2018-07-04  8:51     ` Jan Beulich
2018-07-04 16:23       ` Andrew Cooper
2018-07-05  8:09         ` Wei Liu
2018-07-05  8:40         ` Jan Beulich
2018-07-05 13:39           ` Andrew Cooper
2018-07-05 14:05             ` Jan Beulich
2018-07-04  9:01   ` Jan Beulich
2018-07-04 16:46     ` Andrew Cooper
2018-07-05  8:11       ` Wei Liu
2018-07-05 10:21         ` Andrew Cooper
2018-07-05  8:46       ` Jan Beulich
2018-07-05 13:34         ` Andrew Cooper
2018-07-03 20:55 ` [PATCH 07/13] libx86: Introduce a helper to serialise msr_{domain, vcpu}_policy objects Andrew Cooper
2018-07-04  9:16   ` Jan Beulich
2018-07-04 16:56     ` Andrew Cooper
2018-07-05  8:49       ` Jan Beulich
2018-07-03 20:55 ` [PATCH 08/13] x86: Collect policies together into groups Andrew Cooper
2018-07-04  9:22   ` Jan Beulich
2018-07-04 17:15     ` Andrew Cooper
2018-07-05  8:54       ` Jan Beulich
2018-07-03 20:55 ` [PATCH 09/13] x86/sysctl: Implement XEN_SYSCTL_get_cpumsr_policy Andrew Cooper
2018-07-04  9:43   ` Jan Beulich
2018-07-04 17:57     ` Andrew Cooper
2018-07-05  9:08       ` Jan Beulich
2018-07-05 14:08         ` Andrew Cooper
2018-07-05 14:45           ` Jan Beulich
2018-07-03 20:55 ` [PATCH 10/13] x86/domctl: Implement XEN_DOMCTL_get_cpumsr_policy Andrew Cooper
2018-07-04  9:48   ` Jan Beulich
2018-07-05 14:23   ` Sergey Dyasli
2018-07-03 20:55 ` [PATCH 11/13] libx86: Introduce a helper to deserialise a cpuid_policy object Andrew Cooper
2018-07-04  9:49   ` Jan Beulich
2018-07-03 20:55 ` [PATCH 12/13] libx86: introduce a helper to deserialize MSR policies Andrew Cooper
2018-07-03 20:55 ` [PATCH 13/13] x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy Andrew Cooper
2018-07-04 10:16   ` Jan Beulich
2018-07-04 18:47     ` Andrew Cooper
2018-07-05  9:28       ` Jan Beulich
2018-07-05 17:55         ` Andrew Cooper
2018-07-06  7:51           ` Jan Beulich
2018-07-06 10:02             ` Andrew Cooper
2018-07-04 10:18   ` Wei Liu
2018-07-04 10:33     ` Andrew Cooper
2018-07-04  8:17 ` [PATCH 00/13] x86: CPUID and MSR policy marshalling support Jan Beulich
2018-07-04 10:40   ` Andrew Cooper
2018-07-04 10:44     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.