|
@@ -49,6 +49,7 @@
|
|
|
#include <asm/debugreg.h>
|
|
|
#include <asm/kvm_para.h>
|
|
|
#include <asm/irq_remapping.h>
|
|
|
+#include <asm/microcode.h>
|
|
|
#include <asm/nospec-branch.h>
|
|
|
|
|
|
#include <asm/virtext.h>
|
|
@@ -5355,7 +5356,7 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
|
|
* being speculatively taken.
|
|
|
*/
|
|
|
if (svm->spec_ctrl)
|
|
|
- wrmsrl(MSR_IA32_SPEC_CTRL, svm->spec_ctrl);
|
|
|
+ native_wrmsrl(MSR_IA32_SPEC_CTRL, svm->spec_ctrl);
|
|
|
|
|
|
asm volatile (
|
|
|
"push %%" _ASM_BP "; \n\t"
|
|
@@ -5465,10 +5466,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
|
|
|
* save it.
|
|
|
*/
|
|
|
if (!msr_write_intercepted(vcpu, MSR_IA32_SPEC_CTRL))
|
|
|
- rdmsrl(MSR_IA32_SPEC_CTRL, svm->spec_ctrl);
|
|
|
+ svm->spec_ctrl = native_read_msr(MSR_IA32_SPEC_CTRL);
|
|
|
|
|
|
if (svm->spec_ctrl)
|
|
|
- wrmsrl(MSR_IA32_SPEC_CTRL, 0);
|
|
|
+ native_wrmsrl(MSR_IA32_SPEC_CTRL, 0);
|
|
|
|
|
|
/* Eliminate branch target predictions from guest mode */
|
|
|
vmexit_fill_RSB();
|