Re: [PATCH v4 13/17] hw/i386/pc: support '-nic' for xen-net-device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/11/2023 14:35, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>

The default NIC creation seems a bit hackish to me. I don't understand
why each platform has to call pci_nic_init_nofail() from a point in the
code where it actually has a pointer to the PCI bus, and then we have
the special cases for things like ne2k_isa.

If qmp_device_add() can *find* the appropriate bus and instantiate
the device on it, why can't we just do that from generic code for
creating the default NICs too?

But that isn't a yak I want to shave today. Add a xenbus field to the
PCMachineState so that it can make its way from pc_basic_device_init()
to pc_nic_init() and be handled as a special case like ne2k_isa is.

Now we can launch emulated Xen guests with '-nic user'.

Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
  hw/i386/pc.c             | 11 ++++++++---
  hw/i386/pc_piix.c        |  2 +-
  hw/i386/pc_q35.c         |  2 +-
  hw/xen/xen-bus.c         |  4 +++-
  include/hw/i386/pc.h     |  4 +++-
  include/hw/xen/xen-bus.h |  2 +-
  6 files changed, 17 insertions(+), 8 deletions(-)


Reviewed-by: Paul Durrant <paul@xxxxxxx>





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux