Re: [kvm-unit-tests PATCH 1/3] x86: Add define for MSR_IA32_PRED_CMD's PRED_CMD_IBPB (bit 0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/28/2023 1:02 PM, Sean Christopherson wrote:
Add a define for PRED_CMD_IBPB and use it to replace the open coded '1' in
the nVMX library.

What does nVMX mean here?

Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
  lib/x86/msr.h | 1 +
  x86/vmexit.c  | 2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/x86/msr.h b/lib/x86/msr.h
index c9869be5..29fff553 100644
--- a/lib/x86/msr.h
+++ b/lib/x86/msr.h
@@ -34,6 +34,7 @@
  /* Intel MSRs. Some also available on other CPUs */
  #define MSR_IA32_SPEC_CTRL              0x00000048
  #define MSR_IA32_PRED_CMD               0x00000049
+#define PRED_CMD_IBPB			BIT(0)
#define MSR_IA32_PMC0 0x000004c1
  #define MSR_IA32_PERFCTR0		0x000000c1
diff --git a/x86/vmexit.c b/x86/vmexit.c
index b1eed8d1..2e8866e1 100644
--- a/x86/vmexit.c
+++ b/x86/vmexit.c
@@ -463,7 +463,7 @@ static int has_spec_ctrl(void)
static void wr_ibpb_msr(void)
  {
-	wrmsr(MSR_IA32_PRED_CMD, 1);
+	wrmsr(MSR_IA32_PRED_CMD, PRED_CMD_IBPB);
  }
static void toggle_cr0_wp(void)




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux