|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC v1 70/74] libxl: pvshim: Check state->shim_path before domain type
From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
This will make it possible to use the shim when the actual
application-requested domain type is PV.
Code elsewhere is responsible for setting state->shim_path non-NULL
iff the shim is required.
With this patch, in the current context, setting LIBXL_PVSHIM_PATH
will affect non-PVH guests now. So we increase the scope of that
bodge (which we are about to abolish).
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
tools/libxl/libxl_dom.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 14a9a09958..bf509905a1 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -1198,9 +1198,11 @@ int libxl__build_hvm(libxl__gc *gc, uint32_t domid,
* If PVH and no shim override, use the pv cmdline.
* If not PVH, use info->cmdline.
*/
- dom = xc_dom_allocate(ctx->xch, info->type == LIBXL_DOMAIN_TYPE_PVH ?
- (state->shim_path ? state->shim_cmdline :
state->pv_cmdline) :
- info->cmdline, NULL);
+ dom = xc_dom_allocate(ctx->xch,
+ state->shim_path ? state->shim_cmdline :
+ info->type == LIBXL_DOMAIN_TYPE_PVH ? state->pv_cmdline :
+ info->cmdline,
+ NULL);
if (!dom) {
LOGE(ERROR, "xc_dom_allocate failed");
rc = ERROR_NOMEM;
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |