]> xenbits.xen.org Git - xenclient/xen-pq.git/commitdiff
Ugly hack to fix SATA - Send EOI for MSI immediately.
authorJames Mckenzie <jamesmck@taoand.(none)>
Thu, 20 Aug 2009 07:28:35 +0000 (08:28 +0100)
committerJames Mckenzie <jamesmck@taoand.(none)>
Thu, 20 Aug 2009 07:28:35 +0000 (08:28 +0100)
Xen tends to allocate MSI with high vector numbers (priority)
it leaves them pending until the guest sends EOI. However
if you have an MSI pending per CPU you lose.

master/series
master/ugly-hack-to-fix-sata [new file with mode: 0644]

index c027f7b68d66fa6d78b5ef84418d65e5488e4817..31c3a33677d0191ce9b157f0f024dc39cf284ff4 100644 (file)
@@ -18,3 +18,4 @@ tools-hvm-info
 default-iommu-inclusive-mapping
 igd-cmd-reg-change-for-reboot
 xblanker
+ugly-hack-to-fix-sata
diff --git a/master/ugly-hack-to-fix-sata b/master/ugly-hack-to-fix-sata
new file mode 100644 (file)
index 0000000..8b5c645
--- /dev/null
@@ -0,0 +1,29 @@
+diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
+index e2202ba..eee9dd1 100644
+--- a/xen/arch/x86/irq.c
++++ b/xen/arch/x86/irq.c
+@@ -318,13 +318,17 @@ static void __do_IRQ_guest(int vector)
+     if ( action->ack_type == ACKTYPE_EOI )
+     {
+-        sp = pending_eoi_sp(peoi);
+-        ASSERT((sp == 0) || (peoi[sp-1].vector < vector));
+-        ASSERT(sp < (NR_VECTORS-1));
+-        peoi[sp].vector = vector;
+-        peoi[sp].ready = 0;
+-        pending_eoi_sp(peoi) = sp+1;
+-        cpu_set(smp_processor_id(), action->cpu_eoi_map);
++        if ( desc->handler == &pci_msi_type ) { //FIXME I'M UGLY
++            desc->handler->end(vector);
++        } else {
++            sp = pending_eoi_sp(peoi);
++            ASSERT((sp == 0) || (peoi[sp-1].vector < vector));
++            ASSERT(sp < (NR_VECTORS-1));
++            peoi[sp].vector = vector;
++            peoi[sp].ready = 0;
++            pending_eoi_sp(peoi) = sp+1;
++            cpu_set(smp_processor_id(), action->cpu_eoi_map);
++        }
+     }
+     for ( i = 0; i < action->nr_guests; i++ )