kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] x86: Add the feature Virtual SPEC_CTRL
@ 2021-01-15 17:21 Babu Moger
  2021-01-15 17:21 ` [PATCH v3 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature Babu Moger
  2021-01-15 17:21 ` [PATCH v3 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL Babu Moger
  0 siblings, 2 replies; 8+ messages in thread
From: Babu Moger @ 2021-01-15 17:21 UTC (permalink / raw)
  To: pbonzini, tglx, mingo, bp
  Cc: fenghua.yu, tony.luck, wanpengli, kvm, thomas.lendacky, peterz,
	seanjc, joro, x86, kyung.min.park, linux-kernel, krish.sadhukhan,
	hpa, mgross, vkuznets, kim.phillips, wei.huang2, jmattson

Newer AMD processors have a feature to virtualize the use of the
SPEC_CTRL MSR on the guest. The series adds the feature support
and enables the feature on SVM.
---
v3:
  1. Taken care of recent changes in vmcb_save_area. Needed to adjust the save
     area spec_ctrl definition.
  2. Taken care of few comments from Tom.
     a. Initialised the save area spec_ctrl in case of SEV-ES.
     b. Removed the changes in svm_get_msr/svm_set_msr.
     c. Reverted the changes to disable the msr interception to avoid compatibility
        issue.
  3. Updated the patch #1 with Acked-by from Boris.
  
v2:
  https://lore.kernel.org/kvm/160867624053.3471.7106539070175910424.stgit@bmoger-ubuntu/
  NOTE: This is not final yet. Sending out the patches to make
  sure I captured all the comments correctly.

  1. Most of the changes are related to Jim and Sean's feedback.
  2. Improved the description of patch #2.
  3. Updated the vmcb save area's guest spec_ctrl value(offset 0x2E0)
     properly. Initialized during init_vmcb and svm_set_msr and
     returned the value from save area for svm_get_msr.
  4. As Jim commented, transferred the value into the VMCB prior
     to VMRUN and out of the VMCB after #VMEXIT.
  5. Added kvm-unit-test to detect the SPEC CTRL feature.
     https://lore.kernel.org/kvm/160865324865.19910.5159218511905134908.stgit@bmoger-ubuntu/
  6. Sean mantioned of renaming MSR_AMD64_VIRT_SPEC_CTRL. But, it might
     create even more confusion, so dropped the idea for now.

v1:
https://lore.kernel.org/kvm/160738054169.28590.5171339079028237631.stgit@bmoger-ubuntu/

Babu Moger (2):
      x86/cpufeatures: Add the Virtual SPEC_CTRL feature
      KVM: SVM: Add support for Virtual SPEC_CTRL


 arch/x86/include/asm/cpufeatures.h |    1 +
 arch/x86/include/asm/svm.h         |    4 +++-
 arch/x86/kvm/svm/sev.c             |    4 ++++
 arch/x86/kvm/svm/svm.c             |   19 +++++++++++++++----
 4 files changed, 23 insertions(+), 5 deletions(-)

--

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

end of thread, other threads:[~2021-01-27  4:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 17:21 [PATCH v3 0/2] x86: Add the feature Virtual SPEC_CTRL Babu Moger
2021-01-15 17:21 ` [PATCH v3 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature Babu Moger
2021-01-15 17:21 ` [PATCH v3 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL Babu Moger
2021-01-19 18:31   ` Sean Christopherson
2021-01-19 22:29     ` Babu Moger
2021-01-19 23:45       ` Sean Christopherson
2021-01-20 22:09         ` Babu Moger
2021-01-27  0:13           ` Sean Christopherson

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).