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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] create proper net device for hvm guests

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] create proper net device for hvm guests
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Fri, 04 Apr 2008 20:21:12 -0600
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 04 Apr 2008 19:21:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080405003011.GB5762@xxxxxxxxxx>
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: <47F6B905.4000800@xxxxxxxxxx> <20080405003011.GB5762@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20060911)
Daniel P. Berrange wrote:
> On Fri, Apr 04, 2008 at 05:25:57PM -0600, Jim Fehlig wrote:
>> I've noticed that hvm guests using pv network device also get an
>> emulated network device.  Conversely, hvm guests using emulated network
>> device also get pv network device.  I'm surprised that this hasn't been
>> fixed already, which makes me think there is some unforeseen issue that
>> results from not providing both.  I guess one drawback is that the guest
>> config file must be edited to remove 'model=foo, type=ioemu' when using
>> pv network device  - but it seems the guest config file should be the
>> place where these types of settings are explicitly stated.
>> I've attached a patch the creates either the emulated or pv network
>> device (but not both) depending on setting in guest configuation, i.e.
>> 'type=ioemu'.  Please apply if my reasoning is sane.  If not, please
>> clarify reason for presenting both :-).
> The guest administrator does not have control over the Dom0, and thus has
> no ability to change the config. Since installing Xen PV drivers is a post
> install task, you can't create the guest with pv-only mode straightaway,
> and nor can the guest admin change the config.

Yes, that was the drawback I noted above.

>  Thus the presenting both the
> devices lets the guest admin choose between the two at will. They can
> easily blacklist the '8139too' driver in modprobe.conf if they only want
> to use the pv driver and prevent the 2nd nic from being mistakenly used.
> IIRC, the logic is supposed to currently be:
>   - type=ioemu  - only present emulated rtl8139 (or as per model=)
>   - type=netfront - only present the pv driver
>   - no type= setting - present both pv & rtl8139 nic

On 3.2 I observe

  - type=ioemu - both emulated and pv presented
  - type=netfront - only pv presented
  - no type setting - both emulated and pv presented

The second hunk of this patch provides the behavior you described. 
However, when using it, I noticed that no vif entries are created in
xenstore frontend/backend paths (DevController.createDevice is not
called when 'type=ioemu').  Oddly, I don't see any ill affects from that
though ;-).

The first hunk changes

  -no type setting - both emulated and pv presented


-no type setting - only pv presented

so ignore that.  I would suspect that many guests targeted for pv driver
installation have 'type=ioemu' in their config, making the second hunk
of this patch distasteful as well.  Sigh ...


> Regards,
> Dan.

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>