All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Jan Beulich <jbeulich@suse.com>, Wei Liu <wl@xen.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: Re: [Xen-devel] [PATCH 3/6] x86/hvm/domain: remove the 'hap_enabled' flag
Date: Thu, 25 Jul 2019 12:48:40 +0000	[thread overview]
Message-ID: <0cbac7035fd4489e9786acadfff6b257@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <6bed666c7c604fada293b3d650c8f643@AMSPEX02CL03.citrite.net>

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Paul Durrant
> Sent: 25 July 2019 11:08
> To: Roger Pau Monne <roger.pau@citrix.com>
> Cc: xen-devel@lists.xenproject.org; Wei Liu <wl@xen.org>; Jan Beulich <jbeulich@suse.com>; Andrew
> Cooper <Andrew.Cooper3@citrix.com>
> Subject: Re: [Xen-devel] [PATCH 3/6] x86/hvm/domain: remove the 'hap_enabled' flag
> 
> > -----Original Message-----
> > From: Roger Pau Monne <roger.pau@citrix.com>
> > Sent: 25 July 2019 10:44
> > To: Paul Durrant <Paul.Durrant@citrix.com>
> > Cc: xen-devel@lists.xenproject.org; Jan Beulich <jbeulich@suse.com>; Andrew Cooper
> > <Andrew.Cooper3@citrix.com>; Wei Liu <wl@xen.org>
> > Subject: Re: [PATCH 3/6] x86/hvm/domain: remove the 'hap_enabled' flag
> >
> > On Tue, Jul 23, 2019 at 05:06:06PM +0100, Paul Durrant wrote:
> > > -#ifdef CONFIG_HVM
> > > -#define hap_enabled(d)  (is_hvm_domain(d) && (d)->arch.hvm.hap_enabled)
> > > -#else
> > > -#define hap_enabled(d)  ({(void)(d); false;})
> > > -#endif
> > > +#define hap_enabled(d) \
> > > +    (hvm_hap_supported() && is_hvm_domain(d) && \
> > > +     evaluate_nospec(d->createflags & XEN_DOMCTL_CDF_hap))
> >
> > You could make this an inline function while at it AFAICT.
> 
> Yeah, that's not a bad idea.
> 

Alas this turns out to be a can of worms. As an inline function I cannot call is_hvm_domain() from here which, I guess, is why it’s a macro at the moment. Also I cannot dereference d->createflags (a.k.a. options) as the definition of struct domain is not available.

  Paul

>   Paul
> 
> >
> > Thanks, Roger.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-07-25 12:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 16:06 [Xen-devel] [PATCH 0/6] stash domain create flags and then use them Paul Durrant
2019-07-23 16:06 ` [Xen-devel] [PATCH 1/6] domain: stash xen_domctl_createdomain flags in struct domain Paul Durrant
2019-07-25  9:22   ` Roger Pau Monné
2019-07-25 10:11     ` Paul Durrant
2019-07-25 10:24       ` Jan Beulich
2019-07-25 11:24         ` Paul Durrant
2019-07-23 16:06 ` [Xen-devel] [PATCH 2/6] domain: remove 'guest_type' field (and enum guest_type) Paul Durrant
2019-07-25  9:30   ` Roger Pau Monné
2019-07-23 16:06 ` [Xen-devel] [PATCH 3/6] x86/hvm/domain: remove the 'hap_enabled' flag Paul Durrant
2019-07-25  9:44   ` Roger Pau Monné
2019-07-25 10:07     ` Paul Durrant
2019-07-25 12:48       ` Paul Durrant [this message]
2019-07-23 16:06 ` [Xen-devel] [PATCH 4/6] x86/domain: remove the 'oos_off' flag Paul Durrant
2019-07-24 17:44   ` Tim Deegan
2019-07-25 10:16     ` Paul Durrant
2019-07-23 16:06 ` [Xen-devel] [PATCH 5/6] domain: remove the 'is_xenstore' flag Paul Durrant
2019-07-25  9:47   ` Roger Pau Monné
2019-07-25 10:08     ` Paul Durrant
2019-07-23 16:06 ` [Xen-devel] [PATCH 6/6] x86/domain: remove the 's3_integrity' flag Paul Durrant
2019-07-25  9:48   ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0cbac7035fd4489e9786acadfff6b257@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.