[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 25/28] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()
- To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: "Durrant, Paul" <xadimgnik@xxxxxxxxx>
- Date: Fri, 27 Oct 2023 10:46:47 +0100
- Cc: Kevin Wolf <kwolf@xxxxxxxxxx>, Hanna Reitz <hreitz@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Marcelo Tosatti <mtosatti@xxxxxxxxxx>, qemu-block@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, Bernhard Beschow <shentey@xxxxxxxxx>, Joel Upham <jupham125@xxxxxxxxx>
- Delivery-date: Fri, 27 Oct 2023 09:47:00 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 25/10/2023 15:50, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>
The loop over nd_table[] to add PCI NICs is repeated in quite a few
places. Add a helper function to do it.
Some platforms also try to instantiate a specific model in a specific
slot, to match the real hardware. Add pci_init_nic_in_slot() for that
purpose.
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
hw/pci/pci.c | 45 ++++++++++++++++++++++++++++++++++++++++++++
include/hw/pci/pci.h | 4 +++-
2 files changed, 48 insertions(+), 1 deletion(-)
Reviewed-by: Paul Durrant <paul@xxxxxxx>
|