From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Dealing with non-existent BDF devices in VT-d and in the hardware. Date: Wed, 19 Mar 2014 08:57:47 -0400 Message-ID: <20140319125747.GB8694@phenom.dumpdata.com> References: <20140311173039.GB14684@phenom.dumpdata.com> <531F49A4.80107@citrix.com> <20140311174940.GB15088@phenom.dumpdata.com> <20140314175115.GL30560@phenom.dumpdata.com> <20140317200020.GD16397@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline 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: "Zhang, Yang Z" Cc: Andrew Cooper , "gordan@bobich.net" , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, Mar 19, 2014 at 12:32:31AM +0000, Zhang, Yang Z wrote: > Konrad Rzeszutek Wilk wrote on 2014-03-18: > > On Mon, Mar 17, 2014 at 01:03:00AM +0000, Zhang, Yang Z wrote: > >> Konrad Rzeszutek Wilk wrote on 2014-03-15: > >>>> > >>>> What happens if you assign the devices under bus 09 to another guest? > >>> > >>> Hadn't tried that. I think it would all blow up as the the > >>> non-existent bridge is now assigned to one guest and the phantom > >>> DMA requests for the > >>> 09 would show up under the 08 device. I think I would corrupt the > >>> guest memory with random DMA writes. > >>> > >>>> Is it better to add Xen command line to add such devices to a > >>>> group and > >>> assign the whole group to a guest when trying to assign a device > >>> of the group to guest? > >>> > >>> Or implement the group assigment in QEMU or libxl so that nobody > >>> tries doing it. > >> > >> But I think user still need to tell which device is buggy manually > >> and I don't > > think QEMU or libxl can do it. > > > > I think there are two issues here: > > > > a) Missing device assigments via groups. That should be done irregardless > > if the device / hardware is buggy. > > > > Yes, this is missing. > > > b) Buggy devices like the IDT bridge that I see. That is a seperate issue - and > > we just discussion if we want to inject that in the VT-d (or AMD-VI) what > > would be the mechanism to do that. > > The question is that device 08:00.0 doesn't exist in your platform, you only saw the BDF in the DMA transaction. How can you add a non-exist device to a group? Why do I need to add it to a group? The patch I posted (see first email in this thread) just made a fake PCI device in the Xen hypervisor. But I don't see libxl nor QEMU doing any group operations - so why are they required? If I just bundle all of the PCI devices underneath that bridge to the guest it should be OK, shouldn't it? > > >> > >> Best regards, > >> Yang > >> > >> > > > Best regards, > Yang >