From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlIoz-0000QV-CN for qemu-devel@nongnu.org; Fri, 16 May 2014 10:09:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlIos-00018f-MM for qemu-devel@nongnu.org; Fri, 16 May 2014 10:09:13 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:28262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlIos-00018Y-GL for qemu-devel@nongnu.org; Fri, 16 May 2014 10:09:06 -0400 Date: Fri, 16 May 2014 10:08:51 -0400 From: Konrad Rzeszutek Wilk Message-ID: <20140516140851.GC3154@phenom.dumpdata.com> References: <1400237624-8505-1-git-send-email-tiejun.chen@intel.com> <1400237624-8505-5-git-send-email-tiejun.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400237624-8505-5-git-send-email-tiejun.chen@intel.com> Subject: Re: [Qemu-devel] [Xen-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tiejun Chen Cc: peter.maydell@linaro.org, xen-devel@lists.xensource.com, mst@redhat.com, allen.m.kay@intel.com, stefano.stabellini@eu.citrix.com, weidong.han@intel.com, Kelly.Zytaruk@amd.com, jean.guyader@eu.citrix.com, qemu-devel@nongnu.org, yang.z.zhang@intel.com, anthony@codemonkey.ws, anthony.perard@citrix.com On Fri, May 16, 2014 at 06:53:40PM +0800, Tiejun Chen wrote: > Some VBIOSs and drivers assume the IGD BDF (bus:device:function) is > always 00:02.0, so we need to reserves 00:02.0 for assigned IGD in reserve > guest. > > Signed-off-by: Tiejun Chen > Signed-off-by: Yang Zhang > --- > v2: > > * Use a common way patch #2 introduce to reserve PCI devfn. > > hw/pci-host/piix.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c > index ffdc853..b6f49bd 100644 > --- a/hw/pci-host/piix.c > +++ b/hw/pci-host/piix.c > @@ -329,6 +329,14 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, > s = PCI_HOST_BRIDGE(dev); > b = pci_bus_new(dev, NULL, pci_address_space, > address_space_io, 0, TYPE_PCI_BUS); > + > + /* > + * Some video bioses and gfx drivers will assume the bdf of IGD is 00:02.0. > + * So user need to set it to 00:02.0 in Xen configure file explicitly, > + * otherwise IGD will fail to work. > + */ > + pci_reserve_pci_devfn(b, PCI_DEVFN(2, 0)); > + And we do this without checking whether PCI passthrough is done. Should it be gated on that? Or is the reason you do it unconditionally because you want to be able to hot-plug an GFX in? > s->bus = b; > object_property_add_child(qdev_get_machine(), "i440fx", OBJECT(dev), NULL); > qdev_init_nofail(dev); > -- > 1.9.1 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel