From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQfxa-0004bR-Ff for qemu-devel@nongnu.org; Mon, 30 Sep 2013 12:04:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQfxU-0001NB-Ey for qemu-devel@nongnu.org; Mon, 30 Sep 2013 12:04:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQfxU-0001N4-59 for qemu-devel@nongnu.org; Mon, 30 Sep 2013 12:04:28 -0400 Date: Mon, 30 Sep 2013 19:06:47 +0300 From: "Michael S. Tsirkin" Message-ID: <20130930160647.GE10306@redhat.com> References: <524162DE.1080705@redhat.com> <20130925070116.GA5436@redhat.com> <1380098908.1968.30.camel@localhost.localdomain> <87txh62nyz.fsf@blackfin.pond.sub.org> <20130928181241.GA617@redhat.com> <8761tiiqfw.fsf@blackfin.pond.sub.org> <20130930104855.GD20445@redhat.com> <1380556877.3922.48.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1380556877.3922.48.camel@nilsson.home.kraxel.org> Subject: Re: [Qemu-devel] Attaching PCI devices to the PCIe root complex List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Anthony Liguori , marcel.a@redhat.com, qemu list , Markus Armbruster , Laine Stump , Andreas =?iso-8859-1?Q?F=E4rber?= On Mon, Sep 30, 2013 at 06:01:17PM +0200, Gerd Hoffmann wrote: > Hi, > > > Yes but, same as in the initial design, > > it really makes it user's problem. > > > > So we'd have > > virtio-net-pci-conventional > > virtio-net-pci-express > > virtio-net-pci-integrated > > > > > > All this while users just really want to say "virtio" > > (that's the expert user, what most people want is for guest to be faster). > > And for the actual device emulation it makes almost no difference. xhci > exists in express and integrated variants too. The qemu-emulated device > calls pcie_endpoint_cap_init() unconditionally, so the express endpoint > capability shows up even if you plug it into the root bus. That should > be handled better. But I think that would be the only difference in the > xhci code. And even that could be handled in the pci core, for example > by making pcie_endpoint_cap_init a nop unless the device is actually is > a express endpoint from the bus topology point of view. > > Maybe PCIDeviceClass->is_express should move to PCIDevice and > PCIDeviceClass should get a supports_express field instead. > > cheers, > Gerd Not sure why do you need is_express in PCIDevice. We already have QEMU_PCI_CAP_EXPRESS set in cap_present.