Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 4579

kernel-2.6.18-194.11.1.el5.src.rpm

From: Gerd Hoffmann <kraxel@redhat.com>
Date: Thu, 23 Apr 2009 23:39:01 +0200
Subject: [xen] x86: fix MSI eoi handling for HVM passthru
Message-id: 49F0DFF5.5090402@redhat.com
O-Subject: [RHEL 5.4 PATCH] BZ 477261 Fix MSI eoi handling for HVM passthru.
Bugzilla: 477261
RH-Acked-by: Don Dutile <ddutile@redhat.com>

   Hi,

One fix needed to make the AMD IOMMU support fully functional managed to
escape the attention until now ;)  Here comes the last-minute posting.

The fix has been tested in the latest virttest kernel.  It brings the
code in line with upstream.  Somehow that hook must have been missed
while backporting the iommu support.

BZ 477261.

cheers,
   Gerd

>From 95996100c215c9d86387fb3f952092cb2660c3b9 Mon Sep 17 00:00:00 2001
From: Sarathy, Bhavna <Bhavna.Sarathy@amd.com>
Date: Wed, 15 Apr 2009 11:21:10 -0500
Subject: [PATCH] RE: virttest 10 versus virttest 12

We have the final piece worked out for the AMD IOMMU support.
There was an issue regarding the HVM passthru with 64-bit guests.

Most 64bit guest (openSUSE 11 for example) uses msi interrupt instead
of io-apic interrupt by default. However, there seems to be an issue of
msi interrupt handling in virttest15. That is,  function
hvm_dpci_msi_eoi() is never invoked. This patch fixes this problem.
Please review and send comments.

diff --git a/arch/x86/hvm/vlapic.c b/arch/x86/hvm/vlapic.c
index 27cd7f0..36a4b80 100644
--- a/arch/x86/hvm/vlapic.c
+++ b/arch/x86/hvm/vlapic.c
@@ -376,6 +376,8 @@ void vlapic_EOI_set(struct vlapic *vlapic)
 
     if ( vlapic_test_and_clear_vector(vector, &vlapic->regs->data[APIC_TMR]) )
         vioapic_update_EOI(vlapic_domain(vlapic), vector);
+
+    hvm_dpci_msi_eoi(current->domain, vector);
 }
 
 static void vlapic_ipi(struct vlapic *vlapic)
diff --git a/include/asm-x86/hvm/io.h b/include/asm-x86/hvm/io.h
index c3b4d76..a7b2846 100644
--- a/include/asm-x86/hvm/io.h
+++ b/include/asm-x86/hvm/io.h
@@ -147,6 +147,6 @@ extern void hvm_io_assist(void);
 void hvm_dpci_eoi(struct domain *d, unsigned int guest_irq,
                   union vioapic_redir_entry *ent);
 
-
+extern void hvm_dpci_msi_eoi(struct domain *d, int vector);
 #endif /* __ASM_X86_HVM_IO_H__ */