Sai Pavan Boddu <saip...@xilinx.com> writes: > Hi Markus, > >> -----Original Message----- >> From: Markus Armbruster <arm...@redhat.com> >> Sent: Thursday, June 25, 2020 1:42 PM >> To: Sai Pavan Boddu <saip...@xilinx.com> >> Cc: Gerd Hoffmann <kra...@redhat.com>; Peter Maydell >> <peter.mayd...@linaro.org>; Thomas Huth <th...@redhat.com>; Eduardo >> Habkost <ehabk...@redhat.com>; qemu-devel@nongnu.org; Alistair Francis >> <alistair.fran...@wdc.com>; 'Marc-André Lureau' >> <marcandre.lur...@redhat.com>; Ying Fang <fangyi...@huawei.com>; >> Paolo Bonzini <pbonz...@redhat.com>; 'Philippe Mathieu-Daudé' >> <phi...@redhat.com> >> Subject: Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base >> model >> >> Sai Pavan Boddu <sai.pavan.bo...@xilinx.com> writes: >> >> > This patch sets the base to use xhci as sysbus model, for which pci >> > specific hooks are moved to hcd-xhci-pci.c. As a part of this >> > requirment msi/msix interrupts handling is moved under XHCIPCIState, >> > and XHCIState is non qom object, make use of 'container_of' calls to >> > retrive XHCIPciState. Made required changes for qemu-xhci-nec. >> > >> > Signed-off-by: Sai Pavan Boddu <sai.pavan.bo...@xilinx.com> >> >> I can't see a "sysbus model". What I can see is >> >> TYPE_DEVICE >> | >> TYPE_PCI_DEVICE >> | >> TYPE_XHCI_PCI (renamed from TYPE_XHCI) >> / \ >> TYPE_QEMU_XHCI TYPE_NEC_XHCI >> >> All but the two leaves are abstract. >> >> Do you intend to add a "sysbus model" in a future patch? > [Sai Pavan Boddu] Yes. I would be sending it along with that a device which > would be using it. (i.e for zynqmp soc ) > Let me know, if its good to include hcd-xhci-sysbus.c here ?
I'm not sure this series is worthwhile this future patch. Up to the maintainer. Here's a clean way to provide different bus connectors (say PCI and sysbus) for the same core device: Make the core device a TYPE_DEVICE. For each desired bus, have a bus-specific device that contains a core device. Use object_initialize_child() for the component. Example: core device TYPE_SERIAL, PCI device TYPE_PCI_SERIAL, ISA device TYPE_ISA_SERIAL, sysbus devices TYPE_SERIAL_IO. TYPE_SERIAL_MM.