Received: from eggs.gnu.org ([2001:4830:134:3::10]:38876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCrMR-0006c6-P6 for qemu-devel@nongnu.org; Wed, 17 Oct 2018 15:20:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCrMM-0005Rc-Ix for qemu-devel@nongnu.org; Wed, 17 Oct 2018 15:20:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51126) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCrMM-0005RI-7h for qemu-devel@nongnu.org; Wed, 17 Oct 2018 15:19:58 -0400 Date: Wed, 17 Oct 2018 16:19:42 -0300 From: Eduardo Habkost Message-ID: <20181017191942.GH31060@habkost.net> References: <20181013025435.25785-1-ehabkost@redhat.com> <20181014173258-mutt-send-email-mst@kernel.org> <20181015181404.GQ31060@habkost.net> <20181016170236.GJ7995@redhat.com> <87murdf73g.fsf_-_@dusky.pond.sub.org> <20181017155637.GC31060@habkost.net> <20181017122840-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181017122840-mutt-send-email-mst@kernel.org> Subject: Re: [Qemu-devel] No more chameleon devices (was: [PATCH] virtio: Provide version-specific variants of virtio PCI devices) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Markus Armbruster , Laine Stump , Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , Caio Carrara , Fabian Deutsch , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Gonglei , Gerd Hoffmann , Andrea Bolognani , Cleber Rosa , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Marcel Apfelbaum On Wed, Oct 17, 2018 at 12:38:29PM -0400, Michael S. Tsirkin wrote: > On Wed, Oct 17, 2018 at 12:56:37PM -0300, Eduardo Habkost wrote: > > (CCing Marcel, in case he has extra details on the complex > > Conventional/Express bus/device plugging rules) > > > > On Wed, Oct 17, 2018 at 07:57:39AM +0200, Markus Armbruster wrote: > > > Laine Stump writes: > > > > > > [...] > > > > In the end, having a device that changed PCI ID depending on what kind > > > > of slot it was plugged into was an idea "too clever for its own good", > > > > should be avoided when new devices are added in the future, and we > > > > should at least provide an alternative that doesn't do that for existing > > > > devices. > > > > > > That means for each chameleon PCI/PCIe device: > > > > > > * create a pair of devices that can only go into one kind of slot > > > > > > * deprecate the chameleon > > > > > > Yes, please! Volunteers? > > > > > > Do we have similar chameleons outside PCI? > > > > I'm worried that we could be trying to address multiple issues at > > the same time, and I'm not sure yet if we should address all of > > them in one take. > > > > Right now we need to differentiate non-transitional and > > transitional virtio devices, for a few reasons: > > * They have different PCI IDs; > > * Legacy drivers don't work with non-transitional devices; > > * Transitional virtio devices can be plugged to Conventional PCI > > buses; non-transitional ones can't. > > No that last point isn't true at all. Sorry, I got it reversed: * Non-transitional virtio devices can be plugged to PCI Express buses; transitional ones can't[1]. [1] Well, theoretically, under a few circumstances they could. We could extend the QMP interfaces in the future to cover that use case, but I don't think it's worth the effort. > > > This patch addresses that problem. > > > > You seem to be talking about a different issue: > > * Some devices (including transitional virtio) can be plugged on > > both Conventional PCI and PCI Express buses (I will call those > > devices "hybrid PCI devices"). > > > > The former is a practical problem: management software needs to > > be able to ask for a transitional virtio device, depending o the > > guest OS being run. > > > > Addressing the latter seems more complex (it would affect other > > devices, not just virtio), and I don't see which practical > > problems it would solve. > > > > I see some problems it wouldn't solve, though: the system > > wouldn't be able to represent the fact that transitional virtio > > devices can still work on PCI Express buses, as long as they > > support PIO bars; or that Conventional PCI devices can be plugged > > to PCI Express root buses. > > > > I don't see problems caused by hybrid conventional/express PCI > > devices. The original problem with virtio devices was just not > > being hybrid, it was lying about being hybrid: non-transitional > > virtio devices are hybrid, but transitional virtio devices > > aren't. > > > > I wouldn't be against abolishing hybrid PCI devices completely if > > somebody volunteers to do the work. I just don't see which > > problems this would solve. > > > > -- > > Eduardo -- Eduardo