mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl: PVH guests use PV nics
Remove device model "none" support from the nic functions. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
0adc9507c8
commit
b51a2d89d3
1 file changed
+3
-4
@@ -92,18 +92,17 @@ static int libxl__device_nic_setdefault(libxl__gc *gc, uint32_t domid,
|
||||
switch (libxl__domain_type(gc, domid)) {
|
||||
case LIBXL_DOMAIN_TYPE_HVM:
|
||||
if (!nic->nictype) {
|
||||
if (hotplug ||
|
||||
(libxl__device_model_version_running(gc, domid) ==
|
||||
LIBXL_DEVICE_MODEL_VERSION_NONE))
|
||||
if (hotplug)
|
||||
nic->nictype = LIBXL_NIC_TYPE_VIF;
|
||||
else
|
||||
nic->nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
|
||||
}
|
||||
break;
|
||||
case LIBXL_DOMAIN_TYPE_PVH:
|
||||
case LIBXL_DOMAIN_TYPE_PV:
|
||||
if (nic->nictype == LIBXL_NIC_TYPE_VIF_IOEMU) {
|
||||
LOGD(ERROR, domid,
|
||||
"trying to create PV guest with an emulated interface");
|
||||
"trying to create PV or PVH guest with an emulated interface");
|
||||
return ERROR_INVAL;
|
||||
}
|
||||
nic->nictype = LIBXL_NIC_TYPE_VIF;
|
||||
|
||||