Messages in this thread Patch in this message | | | From | Joerg Roedel <> | Subject | [PATCH 5/6] kvm/x86: call kvm_lapic_sync_from_vapic with preemption disabled | Date | Thu, 5 Mar 2009 13:12:32 +0100 |
| |
The function uses kmap_atomic. Calling it with preemption enabled is racy.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> --- arch/x86/kvm/x86.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b556b6a..ff833f4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3203,6 +3203,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) kvm_guest_exit(); + kvm_lapic_sync_from_vapic(vcpu); + preempt_enable(); down_read(&vcpu->kvm->slots_lock); @@ -3218,7 +3220,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) if (vcpu->arch.exception.pending && kvm_x86_ops->exception_injected(vcpu)) vcpu->arch.exception.pending = false; - kvm_lapic_sync_from_vapic(vcpu); r = kvm_x86_ops->handle_exit(kvm_run, vcpu); out: -- 1.5.6.4
| |