All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Permit fault-less access to non-emulated MSRs
@ 2021-01-07 20:34 Boris Ostrovsky
  2021-01-07 20:34 ` [PATCH 1/4] xl: Add support for ignore_msrs option Boris Ostrovsky
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Boris Ostrovsky @ 2021-01-07 20:34 UTC (permalink / raw)
  To: xen-devel
  Cc: iwj, wl, anthony.perard, jbeulich, andrew.cooper3, roger.pau,
	jun.nakajima, kevin.tian, boris.ostrvsky


Disallowing accesses to MSRs that are not explicitly handled (done by
commit 84e848fd7a16 ("x86/hvm: disallow access to unknown MSRs")) caused
regression for Solaris guests who access MSR_RAPL_POWER_UNIT assuming
it's always there.

We can add special handling for this and other RAPL registers (and that's
what should happen for pre-4.14 releases) but a more general solution is to
provide an option to allow accesses to unhandled registers to proceed.

The new option is "ignore_msrs" and it can take three values
    never:   Issue a warning to the log and #GP to the guest. This is default.
    silent:  MSR reads return 0, MSR writes are ignored. No warnings to the log.
    verbose: Similar to silent but a warning is written.


Boris Ostrovsky (4):
  xl: Add support for ignore_msrs option
  x86: Introduce MSR_UNHANDLED
  x86: Allow non-faulting accesses to non-emulated MSRs if policy
    permits this
  tools/libs: Apply MSR policy to a guest

 docs/man/xl.cfg.5.pod.in          |  20 ++++++-
 tools/include/xenctrl.h           |   2 +
 tools/libs/guest/Makefile         |   1 +
 tools/libs/guest/xg_msrs_x86.c    | 110 ++++++++++++++++++++++++++++++++++++++
 tools/libs/light/libxl_dom.c      |   5 +-
 tools/libs/light/libxl_internal.h |   2 +
 tools/libs/light/libxl_types.idl  |   7 +++
 tools/libs/light/libxl_x86.c      |   7 +++
 tools/xl/xl_parse.c               |   7 +++
 xen/arch/x86/hvm/svm/svm.c        |  10 ++--
 xen/arch/x86/hvm/vmx/vmx.c        |  10 ++--
 xen/arch/x86/msr.c                |  20 +++++++
 xen/arch/x86/pv/emul-priv-op.c    |   8 +--
 xen/include/asm-x86/msr.h         |   3 +-
 xen/include/xen/lib/x86/msr.h     |  17 +++++-
 xen/lib/x86/msr.c                 |  16 +++---
 16 files changed, 217 insertions(+), 28 deletions(-)
 create mode 100644 tools/libs/guest/xg_msrs_x86.c

-- 
1.8.3.1



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

end of thread, other threads:[~2021-01-11 16:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 20:34 [PATCH 0/4] Permit fault-less access to non-emulated MSRs Boris Ostrovsky
2021-01-07 20:34 ` [PATCH 1/4] xl: Add support for ignore_msrs option Boris Ostrovsky
2021-01-07 20:34 ` [PATCH 2/4] x86: Introduce MSR_UNHANDLED Boris Ostrovsky
2021-01-08 14:55   ` Jan Beulich
2021-01-08 20:31     ` boris.ostrovsky
2021-01-11  7:44       ` Jan Beulich
2021-01-07 20:34 ` [PATCH 3/4] x86: Allow non-faulting accesses to non-emulated MSRs if policy permits this Boris Ostrovsky
2021-01-08 15:18   ` Jan Beulich
2021-01-08 20:39     ` boris.ostrovsky
2021-01-11  7:48       ` Jan Beulich
2021-01-11 16:35         ` boris.ostrovsky
2021-01-07 20:34 ` [PATCH 4/4] tools/libs: Apply MSR policy to a guest Boris Ostrovsky
2021-01-07 20:40 ` [PATCH 0/4] Permit fault-less access to non-emulated MSRs boris.ostrovsky

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.