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: "
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;
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: "
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);
* 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
*/
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;
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") )
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;
}
#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;