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

Re: [Xen-devel] [rfc/patch] pv-on-hvm: make netfront grab PCI ressources.

Keir Fraser wrote:
> On 8/2/07 16:50, "Gerd Hoffmann" <kraxel@xxxxxxx> wrote:
>> This patch makes netfront grab the rtl8139 PCI ressources when running
>> as paravirtualized driver in a HVM domain.  If the driver fails to grab
>> the ressources it refuses to load.  If it succeeds grabbing the
>> ressources this shoulld prevent any other driver from taking the device.
>> This makes sure that we don't have two drivers (8139 pci driver and
>> netfront) active for the same device.
> It seems to me this is a tools issue: they should ensure that only netback
> or qemu advertises a particular interface.

There is one problem with that approach:  The bochs BIOS talks to the
emulated devices for booting from the ide disk.  Once the OS is up and
running you'll want to use the paravirtual blkfront driver if possible.
 Same for pxe boot and virtual nic I guess ...

> In any case, doing a hack in
> netfront doesn't work if the rtl8139 driver gets probed first?

Well, netfront can't grab the PCI device then, and refuses to load.
That case is harder to handle though, I'm not that happy with the
solution yet.  The current approach has the drawback that the driver
will work only with recent qemu-dm versions (subsystem ID is needed for
device matching).

Another idea:  We could make the tools add the ioport / iomem ranges to
xenstore.  Then the frontend drivers can try to grab these ressources
and refuse to initialize if they are not available.  This way we can
have some fancy helper functions to handle that.  The scheme also
doesn't need frontend driver updates in case the emulated device changes
from rtl8139 to something else.  And we don't run into compatibility


Gerd Hoffmann <kraxel@xxxxxxx>

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.