* [PATCH v2] libxl/arm: fix guest type conversion
@ 2018-11-01 13:33 Wei Liu
2018-11-01 20:36 ` Julien Grall
2018-11-02 11:01 ` Ian Jackson
0 siblings, 2 replies; 3+ messages in thread
From: Wei Liu @ 2018-11-01 13:33 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu
Commit 359970fd8b ("tools/libxl: Switch Arm guest type to PVH") missed
changing the type field in c_info. This issue didn't surface until
ef72c93df9 which made creating PV guest on Arm unusable.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Julien Grall <julien.grall@arm.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Julien Grall <julien.grall@arm.com>
v2: avoid duplicating error messages.
This should fix libvirt breakage.
---
tools/libxl/libxl_arm.c | 4 +---
tools/libxl/libxl_create.c | 10 ++++++++++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 25dc3defc6..6f2dcab489 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -1128,9 +1128,7 @@ void libxl__arch_domain_build_info_setdefault(libxl__gc *gc,
if (b_info->type != LIBXL_DOMAIN_TYPE_PV)
return;
- LOG(WARN, "Converting PV guest to PVH.");
- LOG(WARN, "Arm guest are now PVH.");
- LOG(WARN, "Please fix your configuration file/toolstack.");
+ LOG(DEBUG, "Converting build_info to PVH");
/* Re-initialize type to PVH and all associated fields to defaults. */
memset(&b_info->u, '\0', sizeof(b_info->u));
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 4bb750e951..311957f87c 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -35,6 +35,16 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
return ERROR_INVAL;
}
+#if defined(__arm__) || defined(__aarch64__)
+ if (c_info->type == LIBXL_DOMAIN_TYPE_PV) {
+ LOG(WARN, "Converting PV guest to PVH.");
+ LOG(WARN, "Arm guest are now PVH.");
+ LOG(WARN, "Please fix your configuration file/toolstack.");
+
+ c_info->type = LIBXL_DOMAIN_TYPE_PVH;
+ }
+#endif
+
if (c_info->type != LIBXL_DOMAIN_TYPE_PV) {
libxl_defbool_setdefault(&c_info->hap, true);
libxl_defbool_setdefault(&c_info->oos, true);
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] libxl/arm: fix guest type conversion
2018-11-01 13:33 [PATCH v2] libxl/arm: fix guest type conversion Wei Liu
@ 2018-11-01 20:36 ` Julien Grall
2018-11-02 11:01 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Julien Grall @ 2018-11-01 20:36 UTC (permalink / raw)
To: Wei Liu, xen-devel; +Cc: Stefano Stabellini, Ian Jackson
Hi,
On 11/1/18 1:33 PM, Wei Liu wrote:
> Commit 359970fd8b ("tools/libxl: Switch Arm guest type to PVH") missed
> changing the type field in c_info. This issue didn't surface until
> ef72c93df9 which made creating PV guest on Arm unusable.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Tested-by: Julien Grall <julien.grall@arm.com>
FWIW:
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
> ---
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Julien Grall <julien.grall@arm.com>
>
> v2: avoid duplicating error messages.
>
> This should fix libvirt breakage.
> ---
> tools/libxl/libxl_arm.c | 4 +---
> tools/libxl/libxl_create.c | 10 ++++++++++
> 2 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
> index 25dc3defc6..6f2dcab489 100644
> --- a/tools/libxl/libxl_arm.c
> +++ b/tools/libxl/libxl_arm.c
> @@ -1128,9 +1128,7 @@ void libxl__arch_domain_build_info_setdefault(libxl__gc *gc,
> if (b_info->type != LIBXL_DOMAIN_TYPE_PV)
> return;
>
> - LOG(WARN, "Converting PV guest to PVH.");
> - LOG(WARN, "Arm guest are now PVH.");
> - LOG(WARN, "Please fix your configuration file/toolstack.");
> + LOG(DEBUG, "Converting build_info to PVH");
>
> /* Re-initialize type to PVH and all associated fields to defaults. */
> memset(&b_info->u, '\0', sizeof(b_info->u));
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index 4bb750e951..311957f87c 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -35,6 +35,16 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
> return ERROR_INVAL;
> }
>
> +#if defined(__arm__) || defined(__aarch64__)
> + if (c_info->type == LIBXL_DOMAIN_TYPE_PV) {
> + LOG(WARN, "Converting PV guest to PVH.");
> + LOG(WARN, "Arm guest are now PVH.");
> + LOG(WARN, "Please fix your configuration file/toolstack.");
> +
> + c_info->type = LIBXL_DOMAIN_TYPE_PVH;
> + }
> +#endif
> +
> if (c_info->type != LIBXL_DOMAIN_TYPE_PV) {
> libxl_defbool_setdefault(&c_info->hap, true);
> libxl_defbool_setdefault(&c_info->oos, true);
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] libxl/arm: fix guest type conversion
2018-11-01 13:33 [PATCH v2] libxl/arm: fix guest type conversion Wei Liu
2018-11-01 20:36 ` Julien Grall
@ 2018-11-02 11:01 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2018-11-02 11:01 UTC (permalink / raw)
To: Wei Liu; +Cc: xen-devel, Julien Grall, Stefano Stabellini
Wei Liu writes ("[PATCH v2] libxl/arm: fix guest type conversion"):
> Commit 359970fd8b ("tools/libxl: Switch Arm guest type to PVH") missed
> changing the type field in c_info. This issue didn't surface until
> ef72c93df9 which made creating PV guest on Arm unusable.
...
> +#if defined(__arm__) || defined(__aarch64__)
> + if (c_info->type == LIBXL_DOMAIN_TYPE_PV) {
> + LOG(WARN, "Converting PV guest to PVH.");
> + LOG(WARN, "Arm guest are now PVH.");
> + LOG(WARN, "Please fix your configuration file/toolstack.");
> +
> + c_info->type = LIBXL_DOMAIN_TYPE_PVH;
> + }
> +#endif
Please, no #ifdefs in the main part of the code.
Maybe I should have the Makefile throw a fit about this.
I think you may need to change
libxl__arch_domain_build_info_setdefault
to
libxl__arch_domain_create_info_setdefault
Sorry,
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-02 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 13:33 [PATCH v2] libxl/arm: fix guest type conversion Wei Liu
2018-11-01 20:36 ` Julien Grall
2018-11-02 11:01 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.