> -----Original Message-----
> From: Jan Beulich <jbeul...@suse.com>
> Sent: 30 July 2019 12:56
> To: Paul Durrant <paul.durr...@citrix.com>
> Cc: xen-devel@lists.xenproject.org; Julien Grall <julien.gr...@arm.com>; 
> Andrew Cooper
> <andrew.coop...@citrix.com>; Roger Pau Monne <roger....@citrix.com>; George 
> Dunlap
> <george.dun...@citrix.com>; Ian Jackson <ian.jack...@citrix.com>; Stefano 
> Stabellini
> <sstabell...@kernel.org>; Konrad Rzeszutek Wilk <konrad.w...@oracle.com>; Tim 
> (Xen.org) <t...@xen.org>;
> Wei Liu <w...@xen.org>
> Subject: Re: [PATCH v3 2/5] x86/hvm/domain: remove the 'hap_enabled' flag
> 
> On 30.07.2019 11:39, Paul Durrant wrote:
> > --- a/xen/arch/x86/domain.c
> > +++ b/xen/arch/x86/domain.c
> > @@ -460,6 +460,12 @@ int arch_sanitise_domain_config(struct 
> > xen_domctl_createdomain *config)
> >           return -EINVAL;
> >       }
> >
> > +    if ( config->flags & XEN_DOMCTL_CDF_hap && !hvm_hap_supported() )
> 
> The & wants to be parenthesized here.
> 
> > --- a/xen/common/domain.c
> > +++ b/xen/common/domain.c
> > @@ -313,6 +313,13 @@ static int sanitise_domain_config(struct 
> > xen_domctl_createdomain *config)
> >           return -EINVAL;
> >       }
> >
> > +    if ( !(config->flags & XEN_DOMCTL_CDF_hvm_guest) &&
> > +         config->flags & XEN_DOMCTL_CDF_hap )
> 
> Same here.

Oh yes. Not sure how I missed those.

> 
> > --- a/xen/include/xen/sched.h
> > +++ b/xen/include/xen/sched.h
> > @@ -948,6 +948,11 @@ static inline bool is_hvm_domain(const struct domain 
> > *d)
> >           evaluate_nospec(d->options & XEN_DOMCTL_CDF_hvm_guest);
> >   }
> >
> > +static inline bool hap_enabled(const struct domain *d)
> > +{
> > +    return evaluate_nospec(d->options & XEN_DOMCTL_CDF_hap);
> > +}
> > +
> >   static inline bool is_hvm_vcpu(const struct vcpu *v)
> 
> Could this please not be placed between two closely related functions?
> 

Ok.

  Paul

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

Reply via email to