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>, "Gerd Hoffmann" <kraxel@xxxxxxx>
Subject: Re: [Xen-devel] [rfc/patch] pv-on-hvm: make netfront grab PCI ressources.
From: "Kirk Allan" <kallan@xxxxxxxxxx>
Date: Fri, 09 Feb 2007 09:03:44 -0700
Cc: Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 09 Feb 2007 08:03:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45CC5846.3040606@xxxxxxx>
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> <45CC5846.3040606@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

>>> On Fri, Feb 9, 2007 at  4:17 AM, in message <45CC5846.3040606@xxxxxxx>, Gerd
Hoffmann <kraxel@xxxxxxx> wrote: 
> 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

Back in 3.0.3 and earlier, if the guest's config file did not have the 
'type=ioemu' in the vif = [....] line, qemu would somehow not be instructed to 
insert an emulated NIC into the guest.  Now, with or without the 'type=ioemu', 
an emulated device shows up in the guest.  Maybe some tool enhancements could 
be done and based on the config file populate emulated devices or not.

Thanks
Kirk


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