From: Wei Wang2 Subject: [PATCH] iommu: Fix hvm_dpci_eoi for smp guest in ioapic interrupt mode Date: Wed, 2 Jul 2008 18:20:50 +0200 Message-ID: <1215015650.8363.169.camel@gran.amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-tUltzQU4Z+0mn4KF85f8" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --=-tUltzQU4Z+0mn4KF85f8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, My testing shows, for some smp guests, ent->fields.mask will not be unmasked when hvm_dpci_eoi() is invoked at the first time. In that case, we should rely on timeout call back to do pirq_guest_eoi() and should not stop the per-irq timer too early. -Wei --=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=C3=A4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=C3=A4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=C3=A4ftsf=C3=BChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy=20 --=-tUltzQU4Z+0mn4KF85f8 Content-Disposition: attachment; filename="smp.patch" Content-Type: text/x-patch; name="smp.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit diff -r dedfadeadf86 xen/drivers/passthrough/io.c --- a/xen/drivers/passthrough/io.c Fri Jun 20 18:42:45 2008 +0100 +++ b/xen/drivers/passthrough/io.c Wed Jul 02 18:15:10 2008 +0200 @@ -253,10 +253,12 @@ void hvm_dpci_eoi(struct domain *d, unsi { spin_unlock(&hvm_irq_dpci->dirq_lock); - stop_timer(&hvm_irq_dpci->hvm_timer[ - domain_irq_to_vector(d, machine_gsi)]); if ( (ent == NULL) || !ent->fields.mask ) + { + stop_timer(&hvm_irq_dpci->hvm_timer[ + domain_irq_to_vector(d, machine_gsi)]); pirq_guest_eoi(d, machine_gsi); + } } else spin_unlock(&hvm_irq_dpci->dirq_lock); --=-tUltzQU4Z+0mn4KF85f8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-tUltzQU4Z+0mn4KF85f8--