[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr





diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 836aed5..038776a 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -2310,12 +2310,16 @@ static int intel_iommu_assign_device(
       PCI_DEVFN2(bdf) == devfn &&
       rmrr->scope.devices_cnt > 1 )
    Â{
+Â Â Â Â Â Â u32 relaxed = flag & XEN_DOMCTL_DEV_RDM_RELAXED;
+
      Âprintk(XENLOG_G_ERR VTDPREFIX
-Â Â Â Â Â Â Â Â Â Â" cannot assign %04x:%02x:%02x.%u"
+Â Â Â Â Â Â Â Â Â Â" Currently its %s to assign %04x:%02x:%02x.%u"
          " with shared RMRR at %"PRIx64" for Dom%d.\n",
+Â Â Â Â Â Â Â Â Â Ârelaxed ? "disallowed" : "risky",

This debug message is backwards?
Â
          seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
          rmrr->base_address, d->domain_id);
-Â Â Â Â Â Â return -EPERM;
+Â Â Â Â Â Â if ( !relaxed )
+Â Â Â Â Â Â Â Â return -EPERM;
    Â}
  Â}


Tamas, do you actually mean to assign these to _different_
guests, considering the log fragment above?)


No, I actually want to assign them to the same domain. The domain creation
fails with either of those devices specified for passthrough whether they
are to be attached to the same domain or not.


Tamas, could you try this in your case?

Took me a while to find the xl config option to set this flag (pci = [ 'sbdf, rdm_policy=strict/relaxed' ]) but now it works as expected!

Thanks,
Tamas

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.