|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 2/5] x86/hvm/domain: remove the 'hap_enabled' flag
> -----Original Message-----
> From: Jan Beulich <JBeulich@xxxxxxxx>
> Sent: 30 July 2019 12:56
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Julien Grall <julien.grall@xxxxxxx>;
> Andrew Cooper
> <Andrew.Cooper3@xxxxxxxxxx>; Roger Pau Monne <roger.pau@xxxxxxxxxx>; George
> Dunlap
> <George.Dunlap@xxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; Stefano
> Stabellini
> <sstabellini@xxxxxxxxxx>; Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>; Tim
> (Xen.org) <tim@xxxxxxx>;
> Wei Liu <wl@xxxxxxx>
> 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |