diff options
author | Avi Kivity <avi@qumranet.com> | 2008-12-21 15:48:32 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:48 -0500 |
commit | 3f353858c98dbe0240dac558a89870f4600f81bb (patch) | |
tree | 95cdddb90777c332f747dfff041e1caf1fe78673 /arch/x86/kvm/lapic.c | |
parent | 25e2343246fe135fce672f41abe61e9d2c38caac (diff) |
KVM: Add locking to virtual i8259 interrupt controller
While most accesses to the i8259 are with the kvm mutex taken, the call
to kvm_pic_read_irq() is not. We can't easily take the kvm mutex there
since the function is called with interrupts disabled.
Fix by adding a spinlock to the virtual interrupt controller. Since we
can't send an IPI under the spinlock (we also take the same spinlock in
an irq disabled context), we defer the IPI until the spinlock is released.
Similarly, we defer irq ack notifications until after spinlock release to
avoid lock recursion.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
0 files changed, 0 insertions, 0 deletions