Received: from eggs.gnu.org ([2001:4830:134:3::10]:41019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmXRG-0000WA-Ic for qemu-devel@nongnu.org; Mon, 28 Aug 2017 23:43:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmXRF-00013Y-OQ for qemu-devel@nongnu.org; Mon, 28 Aug 2017 23:43:42 -0400 Date: Tue, 29 Aug 2017 00:43:29 -0300 From: Eduardo Habkost Message-ID: <20170829034329.GV15315@localhost.localdomain> References: <20170823221445.15243-1-ehabkost@redhat.com> <20170823221445.15243-5-ehabkost@redhat.com> <20170825193922.GN27715@localhost.localdomain> <8ad06170-3409-f9aa-dbaf-380c2ca35fd9@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ad06170-3409-f9aa-dbaf-380c2ca35fd9@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/5] pci: Add INTERFACE_LEGACY_PCI_DEVICE to legacy PCI devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-devel@nongnu.org, xen-devel@lists.xenproject.org, qemu-block@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org On Mon, Aug 28, 2017 at 06:58:37PM -0400, John Snow wrote: > > > On 08/25/2017 03:39 PM, Eduardo Habkost wrote: > > CCing maintainers of affected devices (sorry for not CCing you > > before). > > > > On Wed, Aug 23, 2017 at 07:14:44PM -0300, Eduardo Habkost wrote: > >> Add INTERFACE_LEGACY_PCI_DEVICE to all direct subtypes of > >> TYPE_PCI_DEVICE, except: > >> > >> 1) The ones that already have INTERFACE_PCIE_DEVICE set: > >> > >> * base-xhci > >> * e1000e > >> * nvme > >> * pvscsi > >> * vfio-pci > >> * virtio-pci > >> * vmxnet3 > >> > >> 2) base-pci-bridge > >> > >> Not all PCI bridges are legacy PCI devices, so > >> INTERFACE_LEGACY_PCI_DEVICE is added only to the subtypes that > >> are actually legacy PCI devices: > >> > >> * dec-21154-p2p-bridge > >> * i82801b11-bridge > >> * pbm-bridge > >> * pci-bridge > >> > >> The direct subtypes of base-pci-bridge not touched by this patch > >> are: > >> > >> * xilinx-pcie-root: Already marked as PCIe-only device. > >> * pcie-port: all non-abstract subtypes of pcie-port are already > >> marked as PCIe-only devices. > >> > >> 3) megasas-base > >> > >> Not all megasas devices are legacy PCI devices, so the interface > >> names are added to the subclasses registered by > >> megasas_register_types(), according to information in the > >> megasas_devices[] array. > >> > >> "megasas-gen2" already implements INTERFACE_PCIE_DEVICE, so add > >> INTERFACE_LEGACY_PCI_DEVICE only to "megasas". > >> > >> Signed-off-by: Eduardo Habkost > >> --- > > [...] > > >> hw/ide/ich.c | 4 ++++ > >> hw/ide/pci.c | 4 ++++ > > Acked-by: John Snow > > > (Random fly-by comment without looking at the other patches: I assume > there are reasons it's not appropriate or good to add a legacy PCI > device parent that we inherit from, and it's instead better to manually > add the property to all children?) Yes, the reason I'm using interfaces instead of regular inheritance is the existence of hybrid devices (see patch 2/5). -- Eduardo