[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/libxl: choose a sane default for HAP



On Thu, Sep 05, 2019 at 11:52:59AM +0200, Jan Beulich wrote:
> On 05.09.2019 11:34, Roger Pau Monne wrote:
> > Current libxl code will always enable Hardware Assisted Paging (HAP),
> > expecting that the hypervisor will fallback to shadow if HAP is not
> > available. With the changes to the domain builder that's not the case
> > any longer, and the hypervisor will raise an error if HAP is not
> > available instead of silently falling back to shadow.
> 
> Would it really be much more involved than the change here to restore
> silent defaulting to shadow?

But that would mean that a user having selected hap=1 on the config
file would get silently defaulted to shadow, which is wrong IMO.

> > --- a/xen/include/public/sysctl.h
> > +++ b/xen/include/public/sysctl.h
> > @@ -90,6 +90,10 @@ struct xen_sysctl_tbuf_op {
> >   /* (x86) The platform supports direct access to I/O devices with IOMMU. */
> >  #define _XEN_SYSCTL_PHYSCAP_directio     2
> >  #define XEN_SYSCTL_PHYSCAP_directio  (1u<<_XEN_SYSCTL_PHYSCAP_directio)
> > +/* (x86) The platform supports Hardware Assisted Paging. */
> > +#define _XEN_SYSCTL_PHYSCAP_hap          3
> > +#define XEN_SYSCTL_PHYSCAP_hap           (1u<<_XEN_SYSCTL_PHYSCAP_hap)
> 
> I think this bit wants to be universal (i.e. "(x86)" dropped), and
> be set unconditionally on Arm. Irrespective of the question regarding
> an alternative solution I think it is quite sensible to expose
> availability of HAP to the tools. In fact I think "xl info" should
> show this alongside other properties.

I can indeed make this available to both x86 and ARM. AFAICT it's
always going to be true on ARM. I can expand this a bit so it's also
printed in `xl info` together with the rest of the virt_caps.

Thanks, Roger.

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.