Re: [Xen-devel] [PATCH 31/34] xen: refuse to create HVM guests when !CONFIG_HVM

2018-08-21 Thread Julien Grall

Hi Wei,

On 08/21/2018 11:41 AM, Wei Liu wrote:

On Mon, Aug 20, 2018 at 01:59:57PM +0100, Andrew Cooper wrote:

On 17/08/2018 16:12, Wei Liu wrote:

Signed-off-by: Wei Liu 
---
  xen/common/domain.c | 8 +++-
  1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 171d25e..a22df12 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -318,8 +318,14 @@ struct domain *domain_create(domid_t domid,
  if ( !is_idle_domain(d) )
  {
  if ( config->flags & XEN_DOMCTL_CDF_hvm_guest )


As discovered during my domain creation rewrite work, libxl on ARM
doesn't set hvm/hap.

IMO, they should, and libxl should be fixed.



ISTR they wanted guest type to be PV in libxl.


I think that was because PV was allowing us to not start QEMU. Now that 
PVH exists in lixbl, libxl should be switched to use PVH for Arm guest.


Cheers,

--
Julien Grall

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 31/34] xen: refuse to create HVM guests when !CONFIG_HVM

2018-08-21 Thread Jan Beulich
>>> On 17.08.18 at 17:12,  wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -318,8 +318,14 @@ struct domain *domain_create(domid_t domid,
>  if ( !is_idle_domain(d) )
>  {
>  if ( config->flags & XEN_DOMCTL_CDF_hvm_guest )
> +{
> +#if CONFIG_HVM
>  d->guest_type = guest_type_hvm;
> -else
> +#else
> +err = -EINVAL;
> +goto fail;
> +#endif
> +} else
>  d->guest_type = guest_type_pv;

Would you mind doing the CONFIG_PV case of this as well, which
would then probably also make more apparent that the "else"
above belongs on its own line? Of course once again part of the
final look of this section depends on what ARM folks want to do
with regard to CONFIG_HVM.

Jan



___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 31/34] xen: refuse to create HVM guests when !CONFIG_HVM

2018-08-21 Thread Wei Liu
On Mon, Aug 20, 2018 at 01:59:57PM +0100, Andrew Cooper wrote:
> On 17/08/2018 16:12, Wei Liu wrote:
> > Signed-off-by: Wei Liu 
> > ---
> >  xen/common/domain.c | 8 +++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/xen/common/domain.c b/xen/common/domain.c
> > index 171d25e..a22df12 100644
> > --- a/xen/common/domain.c
> > +++ b/xen/common/domain.c
> > @@ -318,8 +318,14 @@ struct domain *domain_create(domid_t domid,
> >  if ( !is_idle_domain(d) )
> >  {
> >  if ( config->flags & XEN_DOMCTL_CDF_hvm_guest )
> 
> As discovered during my domain creation rewrite work, libxl on ARM
> doesn't set hvm/hap.
> 
> IMO, they should, and libxl should be fixed.
> 

ISTR they wanted guest type to be PV in libxl.

Wei.

> ~Andrew

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 31/34] xen: refuse to create HVM guests when !CONFIG_HVM

2018-08-20 Thread Andrew Cooper
On 17/08/2018 16:12, Wei Liu wrote:
> Signed-off-by: Wei Liu 
> ---
>  xen/common/domain.c | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/domain.c b/xen/common/domain.c
> index 171d25e..a22df12 100644
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -318,8 +318,14 @@ struct domain *domain_create(domid_t domid,
>  if ( !is_idle_domain(d) )
>  {
>  if ( config->flags & XEN_DOMCTL_CDF_hvm_guest )

As discovered during my domain creation rewrite work, libxl on ARM
doesn't set hvm/hap.

IMO, they should, and libxl should be fixed.

~Andrew

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 31/34] xen: refuse to create HVM guests when !CONFIG_HVM

2018-08-17 Thread Wei Liu
Signed-off-by: Wei Liu 
---
 xen/common/domain.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 171d25e..a22df12 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -318,8 +318,14 @@ struct domain *domain_create(domid_t domid,
 if ( !is_idle_domain(d) )
 {
 if ( config->flags & XEN_DOMCTL_CDF_hvm_guest )
+{
+#if CONFIG_HVM
 d->guest_type = guest_type_hvm;
-else
+#else
+err = -EINVAL;
+goto fail;
+#endif
+} else
 d->guest_type = guest_type_pv;
 
 watchdog_domain_init(d);
-- 
git-series 0.9.1

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel