From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr Date: Sun, 6 Sep 2015 10:16:09 +0800 Message-ID: <55EBA1E9.5040509@intel.com> References: <1437579859-24485-1-git-send-email-ian.jackson@eu.citrix.com> <1437579859-24485-16-git-send-email-ian.jackson@eu.citrix.com> <55E96FD0020000780009F86A@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tamas K Lengyel , Jan Beulich Cc: Kevin Tian , xen-devel@lists.xensource.com, Wei Liu , Ian Campbell , George Dunlap , Ian Jackson , Yang Zhang List-Id: xen-devel@lists.xenproject.org Sorry for this delay response because I was on vacation. On 9/5/2015 5:52 AM, Tamas K Lengyel wrote: > On Fri, Sep 4, 2015 at 2:17 AM, Jan Beulich wrote: > >> >>> On 03.09.15 at 21:39, wrote: >> > So this change in 4.6 prevents me from passing through devices that have >> > worked previously with VT-d: >> > >> > (XEN) [VT-D] cannot assign 0000:00:1a.0 with shared RMRR at ae8a9000 for >> > Dom30. >> > (XEN) [VT-D] cannot assign 0000:00:1d.0 with shared RMRR at ae8a9000 for >> > Dom31. >> > >> > The devices are the USB 2.0 devices on a DQ67SW motherboard: >> > >> > 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset >> > Family USB Enhanced Host Controller #2 (rev 04) >> > 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset >> > Family USB Enhanced Host Controller #1 (rev 04) >> >> Please don't top post. And I'm also puzzled by you sending this to >> Ian rather than the author. >> > > Hm, I've just hit reply-all to the latest message I've found in the thread. > > >> >> Technically - Tiejun, should this perhaps be permitted in relaxed >> mode, at least until group assignment gets implemented? (Or I agree. What about this? 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", 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? Thanks Tiejun