|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v12 10/17] libxl: set correct nic type depending on the guest
Roger Pau Monne writes ("[PATCH v12 10/17] libxl: set correct nic type
depending on the guest"):
> Fix the use of nic type, which results in the following for each type
> of domain:
>
> * HVM: let the user choose, if none specified use VIF_IOEMU.
> * PV: use VIF is none provided, return error if VIF_IOEMU requested.
...
> + switch (libxl__domain_type(gc, domid)) {
> + case LIBXL_DOMAIN_TYPE_HVM:
> + if (!nic->nictype)
> + nic->nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
> + break;
> + case LIBXL_DOMAIN_TYPE_PV:
> + if (nic->nictype == LIBXL_NIC_TYPE_VIF_IOEMU) {
> + LOG(ERROR, "trying to create PV guest with an emulated
> interface");
> + return ERROR_INVAL;
> + }
> + nic->nictype = LIBXL_NIC_TYPE_VIF;
> + break;
> + default:
> + abort();
> + }
You are missing
+ case LIBXL_DOMAIN_TYPE_INVALID:
+ return ERROR_FAIL;
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |