From 0840ed93dd4e65ca6be5afc77a8f3fe275ae7a05 Mon Sep 17 00:00:00 2001 From: Takuya Yoshikawa Date: Mon, 1 Feb 2010 22:11:52 +0900 Subject: [PATCH] --- yaml --- r: 186047 b: refs/heads/master c: 7edcface95c6e593faa40c70e0464500515db573 h: refs/heads/master i: 186045: 9d91f2fc508341ade5a9e9261621284e43dfd24a 186043: d30089e9a3a3d72393536045b222e71868c205e7 186039: dd51ce96d62d382ebd26aecbd857470997a8a05c 186031: 5e47cec1d9d8db3303d98c07e8b029066ccf2e0e 186015: f946c08a704d1466d1be1181582ecec0679f1eef 185983: 751a915f13be1650203838a931f0b9851aae4e63 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/x86.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index b5e42bc2a3f6..21807d8c4e3a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c125c607326928001983f51109c3d0c190f0a8bb +refs/heads/master: 7edcface95c6e593faa40c70e0464500515db573 diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index 01f0b037092e..c91007f81660 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -3888,10 +3888,8 @@ EXPORT_SYMBOL_GPL(kvm_emulate_hypercall); int kvm_fix_hypercall(struct kvm_vcpu *vcpu) { char instruction[3]; - int ret = 0; unsigned long rip = kvm_rip_read(vcpu); - /* * Blow out the MMU to ensure that no other VCPU has an active mapping * to ensure that the updated hypercall appears atomically across all @@ -3900,11 +3898,8 @@ int kvm_fix_hypercall(struct kvm_vcpu *vcpu) kvm_mmu_zap_all(vcpu->kvm); kvm_x86_ops->patch_hypercall(vcpu, instruction); - if (emulator_write_emulated(rip, instruction, 3, vcpu) - != X86EMUL_CONTINUE) - ret = -EFAULT; - return ret; + return emulator_write_emulated(rip, instruction, 3, vcpu); } static u64 mk_cr_64(u64 curr_cr, u32 new_val)