[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


  • To: Paul Durrant <paul.durrant@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Tue, 30 Jul 2019 11:56:10 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I3glbWt8c4OsMem/i2TSPdgIfCBibIKqbB7/0dL2fpo=; b=gwI9wKKkLJDG2aI8nnnuabtaILawOvEhHyzonQ65fKAL6UD4EWM07mc4QwtAUR6gBFywsP2tJ+oFIhBhmdoo7WY4i4KSNHh/gRPBEMpJ4FKvIOUWSRc6X+TOIFhMgdL4ICRKFDIBwZKQSvlxc34kLDORitZguZPb03Z0dXeHfjxQndPiskQcMRS6V6FqDIHaTMJ8UKNuWNGrHhgjeldxL2/glrFucRfc/y7X5avu5h2tCLuji4NKqcKlBHnqu+aJf8a3FVvbjOZB77brPZD9e7a8AYuPwaIa4f/nKA4vpiXY117AjH3af3YxTNwqXRVCcAxu2A4K1wkE7Mtxnj4GAA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cO9dzp1a3HCdZ5QRn7tn/i3gaPz0MR6jLmYIDICPdpvfeeLygz9J2XjPEW31Pq0YOyR11zbq15jUKWroIw/kG7eUSraXHsWeX3BzPoCV6Io7cqcnN3ZnKrtloSMS+52XHVj7rc+N9QSEixzVq9+LmRIuL4GE3B/MWFgQf3aM7WK6pl0QwkQJYx49DwP05Y2mViRBLjRpvheSRMwwX14n440QcIQg2Q2zsQ9Vq+2huSBAhgfq+JFTXDW7i+b6Yotczmz5o8yKgQRvBcw4EEKNHZpomNvCOIm4aDcE1tDff7/28a+CNsIegIAx34NNPTcp2JH+lGR6/M3md0VxfPSakQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, TimDeegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 30 Jul 2019 11:59:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVRrq+c2LMEf8iM0aU6M+2axgpnabjDhCA
  • Thread-topic: [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.

> --- 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?

Jan
_______________________________________________
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®.