From: Wei Liu Subject: Re: [v2][PATCH] xen/vtd/iommu: permit group devices to passthrough in relaxed mode Date: Thu, 10 Sep 2015 11:37:20 +0100 Message-ID: <20150910103720.GG8496@zion.uk.xensource.com> References: <1441763998-4937-1-git-send-email-tiejun.chen@intel.com> <55EFF3CE02000078000A1150@prv-mh.provo.novell.com> <55F156E302000078000A18B4@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <55F156E302000078000A18B4@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Yang Z Zhang , Tiejun Chen , Kevin Tian , Wei Liu , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, Sep 10, 2015 at 02:09:39AM -0600, Jan Beulich wrote: > >>> On 10.09.15 at 07:23, wrote: > >> From: Jan Beulich [mailto:JBeulich@suse.com] > >> Sent: Wednesday, September 09, 2015 2:55 PM > >> > >> >>> On 09.09.15 at 03:59, wrote: > >> > @@ -2310,12 +2312,16 @@ static int intel_iommu_assign_device( > >> > PCI_DEVFN2(bdf) == devfn && > >> > rmrr->scope.devices_cnt > 1 ) > >> > { > >> > - printk(XENLOG_G_ERR VTDPREFIX > >> > - " cannot assign %04x:%02x:%02x.%u" > >> > + bool_t relaxed = !!(flag & XEN_DOMCTL_DEV_RDM_RELAXED); > >> > + > >> > + printk(XENLOG_G_WARNING VTDPREFIX > >> > >> Well, I can live with this always being a warning, but it's not what I > >> had asked for. The VT-d maintainers will have to judge. > >> > > > > Need to have separate warning/error level for relax/strict. > > > > However I don't think this patch is a right fix. So far relax/strict policy > > is per-domain. what about one VM specifies relax while another VM > > specifies strict when each is assigned with a device sharing rmrr > > with the other? In that case it becomes a system-wide security hole. > > The one specifying "strict" won't gets its device assigned (due to > the code above, taking the path that was there already without > the patch), so I don't see the security issue. > Agreed. A VM can't get such device assigned in the first place, so the hypothetical scenario doesn't exist. Wei. > Jan