diff options
author | Avi Kivity <avi@redhat.com> | 2010-06-10 10:02:16 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 03:46:35 -0400 |
commit | 2390218b6aa2eb3784b0a82fa811c19097dc793a (patch) | |
tree | facf41c6ed5c3d2eafa939e7ab9209cc1594cddb /arch/x86/kvm/mmu.c | |
parent | a83b29c6ad6d6497e569edbc29e556a384cebddd (diff) |
KVM: Fix mov cr3 #GP at wrong instruction
On Intel, we call skip_emulated_instruction() even if we injected a #GP,
resulting in the #GP pointing at the wrong address.
Fix by injecting the exception and skipping the instruction at the same place,
so we can do just one or the other.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 4706a936e36f..aa98fca03ed7 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -3203,7 +3203,7 @@ static int kvm_pv_mmu_write(struct kvm_vcpu *vcpu, | |||
3203 | 3203 | ||
3204 | static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu) | 3204 | static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu) |
3205 | { | 3205 | { |
3206 | kvm_set_cr3(vcpu, vcpu->arch.cr3); | 3206 | (void)kvm_set_cr3(vcpu, vcpu->arch.cr3); |
3207 | return 1; | 3207 | return 1; |
3208 | } | 3208 | } |
3209 | 3209 | ||