diff options
author | Avi Kivity <avi@redhat.com> | 2010-09-19 12:44:07 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:52:56 -0400 |
commit | f4f510508741680e423524c222f615276ca6222c (patch) | |
tree | 6c5212b82659ff7c0e7c9124b3583ea39987bc83 /arch/x86/kvm/x86.c | |
parent | 28e4639adf0c9f26f6bb56149b7ab547bf33bb95 (diff) |
KVM: Convert PIC lock from raw spinlock to ordinary spinlock
The PIC code used to be called from preempt_disable() context, which
wasn't very good for PREEMPT_RT. That is no longer the case, so move
back from raw_spinlock_t to spinlock_t.
Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0b021e16f9dd..3adf6921e88e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3011,18 +3011,18 @@ static int kvm_vm_ioctl_set_irqchip(struct kvm *kvm, struct kvm_irqchip *chip) | |||
3011 | r = 0; | 3011 | r = 0; |
3012 | switch (chip->chip_id) { | 3012 | switch (chip->chip_id) { |
3013 | case KVM_IRQCHIP_PIC_MASTER: | 3013 | case KVM_IRQCHIP_PIC_MASTER: |
3014 | raw_spin_lock(&pic_irqchip(kvm)->lock); | 3014 | spin_lock(&pic_irqchip(kvm)->lock); |
3015 | memcpy(&pic_irqchip(kvm)->pics[0], | 3015 | memcpy(&pic_irqchip(kvm)->pics[0], |
3016 | &chip->chip.pic, | 3016 | &chip->chip.pic, |
3017 | sizeof(struct kvm_pic_state)); | 3017 | sizeof(struct kvm_pic_state)); |
3018 | raw_spin_unlock(&pic_irqchip(kvm)->lock); | 3018 | spin_unlock(&pic_irqchip(kvm)->lock); |
3019 | break; | 3019 | break; |
3020 | case KVM_IRQCHIP_PIC_SLAVE: | 3020 | case KVM_IRQCHIP_PIC_SLAVE: |
3021 | raw_spin_lock(&pic_irqchip(kvm)->lock); | 3021 | spin_lock(&pic_irqchip(kvm)->lock); |
3022 | memcpy(&pic_irqchip(kvm)->pics[1], | 3022 | memcpy(&pic_irqchip(kvm)->pics[1], |
3023 | &chip->chip.pic, | 3023 | &chip->chip.pic, |
3024 | sizeof(struct kvm_pic_state)); | 3024 | sizeof(struct kvm_pic_state)); |
3025 | raw_spin_unlock(&pic_irqchip(kvm)->lock); | 3025 | spin_unlock(&pic_irqchip(kvm)->lock); |
3026 | break; | 3026 | break; |
3027 | case KVM_IRQCHIP_IOAPIC: | 3027 | case KVM_IRQCHIP_IOAPIC: |
3028 | r = kvm_set_ioapic(kvm, &chip->chip.ioapic); | 3028 | r = kvm_set_ioapic(kvm, &chip->chip.ioapic); |