[ipxe-devel] Xen netfront support

Christian Nilsson nikize at gmail.com
Wed Jul 30 16:31:45 UTC 2014

On Wed, Jul 30, 2014 at 12:20 AM, Michael Brown <mcb30 at ipxe.org> wrote:
> I'm please to announce that iPXE now natively supports Xen netfront virtual
> NICs.  This may be of interest to anyone wanting to use iPXE running in a
> Xen PV-HVM domain.
> I have one issue which I'm not sure how to handle, and would appreciate
> feedback from anyone who frequently uses Xen:
> For each configured NIC, Xen exposes both an emulated PCI NIC (for OSes with
> no native Xen drivers) and a netfront virtual NIC (for OSes with native Xen
> drivers).  Xen provides a mechanism for OSes to "unplug" the emulated PCI
> NICs.  Operating systems with native Xen drivers will typically unplug the
> emulated PCI NICs to prevent confusion.
> iPXE could easily unplug the emulated PCI NICs.  However, this operation is
> irreversible.  If the loaded OS does not include native Xen drivers, then it
> will not be able to see any network devices.  This is undesirable.
> iPXE could easily expose both the emulated PCI NICs and the netfront virtual
> NICs (as e.g. net0 and net1).  This works perfectly (since the backends are
> entirely independent; the "hardware" really _is_ providing two NICs which
> happen to have the same MAC address and be connected to the same network),
> but it's somewhat confusing for a user to see:
>   iPXE> ifstat
>   net0: 56:3c:dc:73:51:7e using netfront on vif/0 (open)
>     [Link:up, TX:0 TXE:0 RX:0 RXE:0]
>   net1: 56:3c:dc:73:51:7e using rtl8139 on PCI00:04.0 (open)
>     [Link:up, TX:0 TXE:0 RX:0 RXE:0]
> iPXE cannot easily mask out just the emulated NICs, since we have no easy
> way to identify which ones they are (other than irreversibly unplugging
> them).  Masking by PCI vendor:device IDs known to be used by qemu doesn't
> work, since there's nothing preventing someone using PCI pass-through to
> expose a real physical NIC with the same vendor:device ID.  Also, this
> approach would be fragile since the list of emulated NIC types is known to
> change occasionally.
> Any suggestions?

I do not see a big problem with showing them "multiple times".

But is it possible to save MAC-addresses for netfront devices, and if
these addresses are found on any other device, do not initialize them?
Or only show a message that a duplicate MAC on multiple devices is
most likely because of emulation.

> Michael
> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

More information about the ipxe-devel mailing list