iommu: Remove pointless iommu=pv boot option.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 9 Jul 2010 14:39:35 +0000 (15:39 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 9 Jul 2010 14:39:35 +0000 (15:39 +0100)
Allow devices to always be passed through to PV domains, just as they
can be to HVM domains.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/ia64/xen/dom0_ops.c
xen/arch/x86/domctl.c
xen/drivers/passthrough/iommu.c
xen/include/xen/iommu.h

index 499eed56157849f7556e708e22fc738673da2017..6c44cc8e53772f57b21d866210f0633d46cfe98b 100644 (file)
@@ -339,12 +339,6 @@ long arch_do_domctl(xen_domctl_t *op, XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
         bus = (op->u.assign_device.machine_bdf >> 16) & 0xff;
         devfn = (op->u.assign_device.machine_bdf >> 8) & 0xff;
 
-        if ( !iommu_pv_enabled && !is_hvm_domain(d) )
-        {
-            ret = -ENOSYS;
-            break;
-        }
-
         if ( device_assigned(bus, devfn) )
         {
             gdprintk(XENLOG_ERR, "XEN_DOMCTL_assign_device: "
@@ -381,12 +375,6 @@ long arch_do_domctl(xen_domctl_t *op, XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
         bus = (op->u.assign_device.machine_bdf >> 16) & 0xff;
         devfn = (op->u.assign_device.machine_bdf >> 8) & 0xff;
 
-        if ( !iommu_pv_enabled && !is_hvm_domain(d) )
-        {
-            ret = -ENOSYS;
-            break;
-        }
-
         if ( !device_assigned(bus, devfn) )
             break;
 
index e5989360351be73788d75c20c21495a07905280d..070ff39f363d9ee11249076634e976e9fd75fd35 100644 (file)
@@ -841,12 +841,6 @@ long arch_do_domctl(
         bus = (domctl->u.assign_device.machine_bdf >> 16) & 0xff;
         devfn = (domctl->u.assign_device.machine_bdf >> 8) & 0xff;
 
-        if ( !iommu_pv_enabled && !is_hvm_domain(d) )
-        {
-            ret = -ENOSYS;
-            goto assign_device_out;
-        }
-
         ret = assign_device(d, bus, devfn);
         if ( ret )
             gdprintk(XENLOG_ERR, "XEN_DOMCTL_assign_device: "
@@ -882,11 +876,6 @@ long arch_do_domctl(
         bus = (domctl->u.assign_device.machine_bdf >> 16) & 0xff;
         devfn = (domctl->u.assign_device.machine_bdf >> 8) & 0xff;
 
-        if ( !iommu_pv_enabled && !is_hvm_domain(d) )
-        {
-            ret = -ENOSYS;
-            goto deassign_device_out;
-        }
         spin_lock(&pcidevs_lock);
         ret = deassign_device(d, bus, devfn);
         spin_unlock(&pcidevs_lock);
index 732618cc83fffe48771784a4475623228776483f..b592800a19e9b1868c3535b5e9f3e5c739e51f85 100644 (file)
@@ -27,8 +27,6 @@ static int iommu_populate_page_table(struct domain *d);
  * value may contain:
  *
  *   off|no|false|disable       Disable IOMMU (default)
- *   pv                         Enable IOMMU for PV domains
- *   no-pv                      Disable IOMMU for PV domains (default)
  *   force|required             Don't boot unless IOMMU is enabled
  *   workaround_bios_bug        Workaround some bios issue to still enable
                                 VT-d, don't guarantee security
@@ -40,7 +38,6 @@ static int iommu_populate_page_table(struct domain *d);
  */
 custom_param("iommu", parse_iommu_param);
 bool_t __read_mostly iommu_enabled = 1;
-bool_t __read_mostly iommu_pv_enabled;
 bool_t __read_mostly force_iommu;
 bool_t __read_mostly iommu_verbose;
 bool_t __read_mostly iommu_workaround_bios_bug;
@@ -63,10 +60,6 @@ static void __init parse_iommu_param(char *s)
         if ( !strcmp(s, "off") || !strcmp(s, "no") || !strcmp(s, "false") ||
              !strcmp(s, "0") || !strcmp(s, "disable") )
             iommu_enabled = 0;
-        else if ( !strcmp(s, "pv") )
-            iommu_pv_enabled = 1;
-        else if ( !strcmp(s, "no-pv") )
-            iommu_pv_enabled = 0;
         else if ( !strcmp(s, "force") || !strcmp(s, "required") )
             force_iommu = 1;
         else if ( !strcmp(s, "workaround_bios_bug") )
@@ -294,15 +287,11 @@ int __init iommu_setup(void)
 
     if ( !iommu_enabled )
     {
-        iommu_pv_enabled = 0;
         iommu_snoop = 0;
         iommu_qinval = 0;
         iommu_intremap = 0;
     }
     printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis");
-    if ( iommu_enabled )
-        printk("I/O virtualisation for PV guests %sabled\n",
-               iommu_pv_enabled ? "en" : "dis");
     return rc;
 }
 
index 1b16f7f392885cedd0b121ae197eabd3ad1baa1c..98ead331a510474483a98931d99d4f837aa95bbc 100644 (file)
@@ -26,7 +26,7 @@
 #include <public/hvm/ioreq.h>
 #include <public/domctl.h>
 
-extern bool_t iommu_enabled, iommu_pv_enabled;
+extern bool_t iommu_enabled;
 extern bool_t force_iommu, iommu_verbose;
 extern bool_t iommu_workaround_bios_bug, iommu_passthrough;
 extern bool_t iommu_snoop, iommu_qinval, iommu_intremap;