xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][VTD] force boot to fail if interrupt remapping cannot be enabled when iommu=force
@ 2011-04-27 23:42 Kay, Allen M
  2011-04-28 17:05 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Kay, Allen M @ 2011-04-27 23:42 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Cihula, Joseph, Keir Fraser, Jan Beulich

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

Force Xen boot to fail if interrupt remapping fails to enable and the following are true: iommu=force is set as xen boot parameter, VT-d engine HW is interrupt remapping capable, DMAR_INTR_REMAP bit is set in DMAR flags.  This forces iommu=force boot instances has interrupt remapping enabled if HW and BIOS supports it.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>

[-- Attachment #2: intremap0427.patch --]
[-- Type: application/octet-stream, Size: 1177 bytes --]

diff -r 2f08c89b767d xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Wed Apr 20 17:13:08 2011 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c	Wed Apr 27 22:28:19 2011 -0700
@@ -1971,9 +1971,23 @@ static int init_vtd_hw(void)
             iommu = drhd->iommu;
             if ( enable_intremap(iommu, 0) != 0 )
             {
-                dprintk(XENLOG_WARNING VTDPREFIX,
-                        "Interrupt Remapping not enabled\n");
-                break;
+                int call_panic = 1;
+
+                if ( !force_iommu )
+                    call_panic = 0;
+                if ( !ecap_intr_remap(iommu->ecap) )
+                    call_panic = 0;
+                if ( !platform_supports_intremap() )
+                    call_panic = 0;
+
+                if ( !call_panic )
+                {
+                    dprintk(XENLOG_WARNING VTDPREFIX,
+                            "Interrupt Remapping not enabled\n");
+                    break;
+                }
+                else
+                    panic("enable_intremap() failed with iommu=force and platform is intremap capable\n");
             }
         }
     }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-28 18:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 23:42 [PATCH][VTD] force boot to fail if interrupt remapping cannot be enabled when iommu=force Kay, Allen M
2011-04-28 17:05 ` Keir Fraser
2011-04-28 18:26   ` Joanna Rutkowska
2011-04-28 18:58   ` Cihula, Joseph

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).