Re: [patch 4/4] KVM: switch irq injection/acking to irq_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gregory Haskins wrote:
Marcelo Tosatti wrote:
Switch irq injection/acking to irq_lock, and change PIO/MMIO paths so that the device search is protected by kvm->lock, but not the
read/write callbacks (which is responsability of the device).

Fix for http://article.gmane.org/gmane.comp.emulators.kvm.devel/32286.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: kvm/arch/x86/kvm/i8254.c
===================================================================
--- kvm.orig/arch/x86/kvm/i8254.c
+++ kvm/arch/x86/kvm/i8254.c
@@ -634,10 +634,10 @@ static void __inject_pit_timer_intr(stru
 	struct kvm_vcpu *vcpu;
 	int i;
- mutex_lock(&kvm->lock);
+	mutex_lock(&kvm->irq_lock);

There would be advantages to having irq_lock be
interrupt/nonpreempt-friendly design, such as s/mutex/spinlock.  For
instance, irqfd could inject the interrupt directly without deferring to
a workqueue.   I'm not sure if this is possible/easy, but its something
to consider.

I agree, but let's make the first step splitting the interrupt and a second step changing it to a spinlock. It's scary enough as is.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux