[libvirt] [Xen-devel] Setting devid for emulated NICs (Xen 4.3.1 / libvirt 1.2.0) using libxl driver
Jim Fehlig
jfehlig at suse.com
Mon Jan 6 21:26:34 UTC 2014
Jim Fehlig wrote:
> 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 netfront NIC
>>>> when no model is specified and sets the type. The libxl setdefault function sets
>>>> the model to rtl8139 but leaves the type untouched.
>>>>
>>>>
>>> The xend toolstack always creates both emulated and vif devices unless
>>> 'type=netfront' 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?
>>>
>>>
>> On my 4.3.1 setup, I changed the above to
>>
Updated the system to Xen 4.4 rc1 meanwhile...
>>
>>
>> if (hvm) {
>>
>> x_nic->nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
>>
>> if (l_nic->model) {
>>
>> if (VIR_STRDUP(x_nic->model, l_nic->model) < 0)
>>
>> return -1;
>>
>> if (STREQ(l_nic->model, "netfront"))
>>
>> x_nic->nictype = LIBXL_NIC_TYPE_VIF;
>>
>> }
>>
>> } else {
>>
>> x_nic->nictype = LIBXL_NIC_TYPE_VIF;
>>
>> }
>>
>>
>>
>> which is better initialization logic IMO. If the domain is hvm, set
>> nictype to LIBXL_NIC_TYPE_VIF_IOEMU, unless model 'netfront' is
>> specified. This behavior is consistent with the legacy xen driver.
>> The change seems to work fine and resolves the PXE issue Stefan noted -
>>
I've submitted a patch for the PXE issue to the libvirt list
https://www.redhat.com/archives/libvir-list/2014-January/msg00208.html
>> as long as I initialize devid in libvirt. So we'll need the above fix
>> in libvirt, as well as a resolution to the nic devid initialization in
>> libxl that started this thread.
>>
Stefan, any progress on the devid initialization?
Regards,
Jim
More information about the libvir-list
mailing list