[ipxe-devel] Xen netfront support

Michael Brown mcb30 at ipxe.org
Wed Jul 30 00:05:55 UTC 2014


On 29/07/14 23:58, Shao Miller wrote:
> Personally, I don't think seeing both NICs is a huge deal, as a Xen user
> should be aware of the dual-NIC thing.
>
> But: are there any ordering guarantees about which NIC of the pair is
> going to be first (net0) in iPXE?

The NICs will appear in PCI bus order.  On the current qemu code, the 
Xen platform PCI device will always be registered before any PCI NICs, 
so we'll end up with all of the netfront NICs listed before all of the 
emulated NICs.

> Also: Would the unplugging happen before any NIC-detection, if it were
> going to happen?  If so, that wouldn't suggest a 'xen-unplug' command,
> at least.

To minimise problems, the unplug should happen before we start 
enumerating the PCI bus.  We can _probably_ cope with hotplug PCI 
devices disappearing at runtime (since we do that anyway for EFI), but 
it could lead to strange effects such as gaps in the net device numbering.

> Maybe it could just sit as a build option and those who desire the
> guaranteed unplugging can build such.  That seems to be the special
> scenario; better confused with the possibility of poorer performance
> with the emulated NIC than NICless at OS time, perhaps.

We could say that the user should use e.g. bin/hvm.iso rather than 
bin/ipxe.iso if they want to see only the netfront NICs, which would 
cover the common case without requiring a custom build option.

It's just slightly ugly: it feels as though using bin/ipxe.iso should 
present the user with a single instance of the NIC, while leaving the 
(unused) emulated PCI devices intact for a subsequent OS.  I just can't 
figure out an easy way to do this.

Michael



More information about the ipxe-devel mailing list