linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Emulate and enable UMIP feature on AMD
@ 2019-11-01 17:33 Moger, Babu
  2019-11-01 17:33 ` [PATCH 1/4] kvm: x86: Dont set UMIP feature bit unconditionally Moger, Babu
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Moger, Babu @ 2019-11-01 17:33 UTC (permalink / raw)
  To: tglx, mingo, bp, hpa, pbonzini, rkrcmar, sean.j.christopherson,
	vkuznets, wanpengli, jmattson
  Cc: x86, joro, Moger, Babu, luto, zohar, yamada.masahiro, nayna,
	linux-kernel, kvm

AMD 2nd generation EPYC processors support UMIP (User-Mode Instruction
Prevention) feature. Emulate and enable the UMIP feature if bare metal
supports it. Emulation of UMIP instructions (sgdt, sidt, sldt, smsw and
str) requires the hypervisor to read and write the guest memory. Guest
memory is encrypted on SEV guest. Hypervisor cannot successfully read or
write the guest memory. So disable emulation on SEV guest. Enable the
emulation only on non SEV guest.

Tested on EPYC/EPYC-Rome VMs and works as expected. Please review.

Babu Moger (4):
  kvm: x86: Dont set UMIP feature bit unconditionally
  kvm: svm: Enable UMIP feature on AMD
  kvm: svm: Emulate UMIP instructions on non SEV guest
  x86/Kconfig: Rename UMIP config parameter

 arch/x86/Kconfig                         |  8 +++----
 arch/x86/include/asm/disabled-features.h |  2 +-
 arch/x86/include/asm/umip.h              |  4 ++--
 arch/x86/kernel/Makefile                 |  2 +-
 arch/x86/kvm/cpuid.c                     |  2 +-
 arch/x86/kvm/svm.c                       | 30 ++++++++++++++++++++----
 6 files changed, 34 insertions(+), 14 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2019-11-04 18:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01 17:33 [PATCH 0/4] Emulate and enable UMIP feature on AMD Moger, Babu
2019-11-01 17:33 ` [PATCH 1/4] kvm: x86: Dont set UMIP feature bit unconditionally Moger, Babu
2019-11-01 18:35   ` Jim Mattson
2019-11-01 19:39     ` Moger, Babu
2019-11-01 19:42       ` Jim Mattson
2019-11-01 17:33 ` [PATCH 2/4] kvm: svm: Enable UMIP feature on AMD Moger, Babu
2019-11-01 18:24   ` Andy Lutomirski
2019-11-01 18:38     ` Moger, Babu
2019-11-01 19:09       ` Andy Lutomirski
2019-11-01 18:29   ` Jim Mattson
2019-11-01 19:20     ` Moger, Babu
2019-11-01 19:24       ` Andy Lutomirski
2019-11-01 20:04         ` Moger, Babu
2019-11-01 20:08           ` Jim Mattson
2019-11-02 19:23             ` Moger, Babu
2019-11-03 11:45               ` Borislav Petkov
2019-11-04 18:46                 ` Moger, Babu
2019-11-04 11:54   ` Paolo Bonzini
2019-11-04 18:45     ` Moger, Babu
2019-11-01 17:33 ` [PATCH 3/4] kvm: svm: Emulate UMIP instructions on non SEV guest Moger, Babu
2019-11-01 17:34 ` [PATCH 4/4] x86/Kconfig: Rename UMIP config parameter Moger, Babu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).