aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 01f0b037092e..c91007f81660 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3888,10 +3888,8 @@ EXPORT_SYMBOL_GPL(kvm_emulate_hypercall);
3888int kvm_fix_hypercall(struct kvm_vcpu *vcpu) 3888int kvm_fix_hypercall(struct kvm_vcpu *vcpu)
3889{ 3889{
3890 char instruction[3]; 3890 char instruction[3];
3891 int ret = 0;
3892 unsigned long rip = kvm_rip_read(vcpu); 3891 unsigned long rip = kvm_rip_read(vcpu);
3893 3892
3894
3895 /* 3893 /*
3896 * Blow out the MMU to ensure that no other VCPU has an active mapping 3894 * Blow out the MMU to ensure that no other VCPU has an active mapping
3897 * to ensure that the updated hypercall appears atomically across all 3895 * to ensure that the updated hypercall appears atomically across all
@@ -3900,11 +3898,8 @@ int kvm_fix_hypercall(struct kvm_vcpu *vcpu)
3900 kvm_mmu_zap_all(vcpu->kvm); 3898 kvm_mmu_zap_all(vcpu->kvm);
3901 3899
3902 kvm_x86_ops->patch_hypercall(vcpu, instruction); 3900 kvm_x86_ops->patch_hypercall(vcpu, instruction);
3903 if (emulator_write_emulated(rip, instruction, 3, vcpu)
3904 != X86EMUL_CONTINUE)
3905 ret = -EFAULT;
3906 3901
3907 return ret; 3902 return emulator_write_emulated(rip, instruction, 3, vcpu);
3908} 3903}
3909 3904
3910static u64 mk_cr_64(u64 curr_cr, u32 new_val) 3905static u64 mk_cr_64(u64 curr_cr, u32 new_val)