From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Bader Subject: Re: [libvirt] Setting devid for emulated NICs (Xen 4.3.1 / libvirt 1.2.0) using libxl driver Date: Fri, 20 Dec 2013 11:29:01 +0100 Message-ID: <52B41BED.5000808@canonical.com> References: <52B07D09.5060008@canonical.com> <1387299534.1025.19.camel@dagon.hellion.org.uk> <52B08AA9.8010809@canonical.com> <1387369646.27441.129.camel@kazak.uk.xensource.com> <52B19F4E.8010601@canonical.com> <1387373284.28680.18.camel@kazak.uk.xensource.com> <52B1B842.4090306@canonical.com> <52B2415A.3030903@suse.com> <1387448340.9925.30.camel@kazak.uk.xensource.com> <52B3278D.3000607@canonical.com> <52B33D6C.6010608@suse.com> <1387534262.17289.34.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0137106213395178272==" Return-path: In-Reply-To: <1387534262.17289.34.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0137106213395178272== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RlVogossQrG0rveE4JhbgF7IjrP92Ma2i" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RlVogossQrG0rveE4JhbgF7IjrP92Ma2i Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 20.12.2013 11:11, Ian Campbell wrote: > On Thu, 2013-12-19 at 11:39 -0700, Jim Fehlig wrote: >> Stefan Bader wrote: >>> Oh, just while talking about setdefault. Jim, this is one of the odd = things when >>> moving from xm to xl stack from libvirt: libvirt defaults to the netf= ront NIC >>> when no model is specified and sets the type. The libxl setdefault fu= nction sets >>> the model to rtl8139 but leaves the type untouched. >> >> The xend toolstack always creates both emulated and vif devices unless= >> 'type=3Dnetfront' is explicitly specified. As you say, the guest gets= to >> choose what to do with them. E.g. PXE boot using the emulated device,= >> or have the driver for the PV device unplug the emulated one. I don't= >> think libxl supports this right? >=20 > It should do, in fact I thought it was the default. >=20 > How are you initialising the libxl_device_nic? Type =3D=3D VIF_IOEMU (= which > is the default for a VIF on an HVM guest) means both emulated and pv. > (there were bugs in the semantics here in very early versions of libxl,= > but I thought they were fixed even before 4.2) Right now, what I take from libvirt git HEAD, it checks for a set model n= ame. If one is set and it is not "netfront", then type gets set to IOMEU, otherwi= se to VIF. So currently, by the time the dm gets launched, the xen libxl side calls setdefault which in case of an unset model, sets it to rtl8139. The code = later accepts the NIC_TYPE_VIF set already (if unset, the default would be NIC_TYPE_VIF_IOEMU). >=20 > I don't think there is an option to have just the emulated device -- > there is always a PV VIF there even if the guest doesn't use it. That is what I end up with when having no specific model in my libvirt co= nfig. Which works kind of but prevents any BIOS recognized network. And libxl does work as xm in the way that having an emulated NIC only mat= ters for early stages. There is always a PV NIC present in parallel which caus= es the emulated one to get unplugged when the OS supports this. So right now, I = can explicitly set an emulated model in libvirt and then get the emulated one= during boot and use the virtual one from within the guest. >=20 > Ian. >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >=20 --RlVogossQrG0rveE4JhbgF7IjrP92Ma2i Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJStBvtAAoJEOhnXe7L7s6jMakQAMQ29lP4lGf4I+6Bt/Rg6nxb h5Sf1Rz65Lgf3OizB3iuO4O0fbL58Lu7NzxpnwVFpLbmpjqAYIqVijZhiRRshT/d aNcwj6/aNhOZsZ2R/sY6RC2UAZYPeIRcsWwLtF67HCq8MV8C/P640teJbie82zBr DZatZ515XmZG01ZT7xqxtXULE0i/Syztkdtn119AqXoaXtQ3qwAP0+M2sDLQViGA nkucA2XEz+W5+YRvOKrUn1/bm8osJBq59X3z4Hh8gu1GN8n7LAGXcNP2vAHDglRk hGll2VQKj4v+KEA2mkSwSe33CRdJdhCsy6Y1deKWB3G/M/d046A5qkDAjUkfxFKZ 2YbyZwW7GogIZVM1RCFcWL78UV5slf+bUp8DMQBXVBeIYnL6O2sLRWPco0AYTlS+ NoU9oKvBqpM15o+ihwB6Lxc6wL4p9VI7H6YcOihYroMZ1aO+Wo49YDP6OvTFMjNR hhR7MYgbkJ25XBTn10A67eYs+vtNYXvZgqVUZGrxl5or2k/HaOVr5cqRBH98Kq9Y Z3iYpjjetrhAjZWtYp212pTnk03RgGezmiHu7SG0wW11gIVbBHQlZ9IjaomDFz+y OwkcKaAhAt0crzLezqfR/J0iRthdFXBseryTxrucZvnzyWZ2JdtIks2qCYKlZ3d9 tr0xR5Dwgmkkc9UV3cNk =tM8u -----END PGP SIGNATURE----- --RlVogossQrG0rveE4JhbgF7IjrP92Ma2i-- --===============0137106213395178272== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============0137106213395178272==--