lkml.org 
[lkml]   [2009]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[077/136] KVM: Protect update_cr8_intercept() when running without an apic
2.6.31-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Avi Kivity <avi@redhat.com>

(cherry picked from commit 88c808fd42b53a7e01a2ac3253ef31fef74cb5af)

update_cr8_intercept() can be triggered from userspace while there
is no apic present.

Signed-off-by: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
arch/x86/kvm/x86.c | 3 +++
1 file changed, 3 insertions(+)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3202,6 +3202,9 @@ static void update_cr8_intercept(struct
if (!kvm_x86_ops->update_cr8_intercept)
return;

+ if (!vcpu->arch.apic)
+ return;
+
if (!vcpu->arch.apic->vapic_addr)
max_irr = kvm_lapic_find_highest_irr(vcpu);
else



\
 
 \ /
  Last update: 2009-10-02 04:15    [W:0.556 / U:20.444 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site