WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [rfc/patch] pv-on-hvm: make netfront grab PCI ressources.
From: Gerd Hoffmann <kraxel@xxxxxxx>
Date: Fri, 09 Feb 2007 12:17:26 +0100
Cc: Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 09 Feb 2007 03:17:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1F10AAE.91E8%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C1F10AAE.91E8%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (X11/20060911)
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
problems.

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@xxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel