xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>, "Wei Liu" <wl@xen.org>,
	"Ian Jackson" <Ian.Jackson@citrix.com>,
	"Anthony PERARD" <anthony.perard@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 6/6] xen/public: Obsolete HVM_PARAM_PAE_ENABLED
Date: Thu, 6 Feb 2020 11:32:39 +0000	[thread overview]
Message-ID: <5227980e-5938-f23b-7b1d-eac67bba792e@citrix.com> (raw)
In-Reply-To: <9c7f9930-02d7-13d3-88ab-bad236993e31@suse.com>

On 06/02/2020 09:28, Jan Beulich wrote:
> On 05.02.2020 17:50, Andrew Cooper wrote:
>> --- a/tools/libxc/xc_sr_restore_x86_hvm.c
>> +++ b/tools/libxc/xc_sr_restore_x86_hvm.c
>> @@ -72,6 +72,16 @@ static int handle_hvm_params(struct xc_sr_context *ctx,
>>          case HVM_PARAM_BUFIOREQ_PFN:
>>              xc_clear_domain_page(xch, ctx->domid, entry->value);
>>              break;
>> +
>> +        case HVM_PARAM_PAE_ENABLED:
>> +            /*
>> +             * This HVM_PARAM only ever existed a non-standard calling ABI for
>> +             * xc_cpuid_apply_policy().  It has now been updated to use a
>> +             * regular calling convention, making the param obsolete.
>> +             *
>> +             * Discard if we find it in an old migration stream.
>> +             */
>> +            continue;
> Having also looked at the previous patch (the only one in this series
> relevant to the adjustments done here afaict)

Correct.

> I wonder whether simply
> ignoring it (i.e. not even warning anywhere when out of sync with
> whatever info->u.hvm.pae gets populated from) is a good approach.

We can't (easily) cross check at all, because info->u.hvm.pae is in a
separate process (as far as the xl/libxl toolstack goes).

On cross checking, you'll find that migration in from pre Xen 4.6
doesn't actually have the data.  If you look back at the 4.5 legacy
migration code, you'll observe that this param is restored but never
saved.  In hindsight, we probably shouldn't have fixed that in migration
v2, but we did.

Upstream was actually fine, because libxl sets HVM_PARAM_PAE_ENABLED
after the migration stream completes, and overwrites whatever was
where.  XenServer did not, and we noticed as a consequence of Xen 4.5
actually cross-checked CPUID settings on a mov to %cr4 emulation.

> But of course I may be easily missing aspects here that make this quite
> fine.

It really is obsolete and needs forgetting, not checking.

>
>> --- a/xen/include/public/hvm/params.h
>> +++ b/xen/include/public/hvm/params.h
>> @@ -86,7 +86,7 @@
>>  #define HVM_PARAM_STORE_PFN    1
>>  #define HVM_PARAM_STORE_EVTCHN 2
>>  
>> -#define HVM_PARAM_PAE_ENABLED  4
>> +#define HVM_PARAM_PAE_ENABLED  4 /* Obsolete.  Do not use. */
> I think this should be moved up in the deprecated section.

There isn't a deprecated section.

The params are currently sorted numerically.  Playing "which param is
this integer?" with an unsorted params.h is an experience I wish never
to repeat again.

~Andrew

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

  reply	other threads:[~2020-02-06 11:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 16:50 [Xen-devel] [PATCH 0/6] tools: Rationalise legacy CPUID handling Andrew Cooper
2020-02-05 16:50 ` [Xen-devel] [PATCH 1/6] tools/libxl: Remove libxl_cpuid_{set, apply_policy}() from the API Andrew Cooper
2020-02-11 17:40   ` Ian Jackson
2020-02-05 16:50 ` [Xen-devel] [PATCH 2/6] tools/ocaml: Drop cpuid helpers Andrew Cooper
2020-02-06 14:25   ` Christian Lindig
2020-02-05 16:50 ` [Xen-devel] [PATCH 3/6] tools/python: " Andrew Cooper
2020-02-05 19:37   ` Marek Marczykowski-Górecki
2020-02-11 17:41   ` Ian Jackson
2020-02-05 16:50 ` [Xen-devel] [PATCH 4/6] tools/libxl: Combine legacy CPUID handling logic Andrew Cooper
2020-02-11 17:43   ` Ian Jackson
2020-02-05 16:50 ` [Xen-devel] [PATCH 5/6] tools/libx[cl]: Don't use HVM_PARAM_PAE_ENABLED as a function parameter Andrew Cooper
2020-02-11 17:47   ` Ian Jackson
2020-02-11 17:55     ` Andrew Cooper
2020-02-17 15:40   ` Ian Jackson
2020-02-17 17:57   ` [Xen-devel] [PATCH v2 " Andrew Cooper
2020-02-17 17:59     ` Ian Jackson
2020-02-05 16:50 ` [Xen-devel] [PATCH 6/6] xen/public: Obsolete HVM_PARAM_PAE_ENABLED Andrew Cooper
2020-02-06  9:28   ` Jan Beulich
2020-02-06 11:32     ` Andrew Cooper [this message]
2020-02-06 11:37       ` Jan Beulich
2020-02-06 12:25         ` Andrew Cooper
2020-02-08 12:12   ` Julien Grall
2020-02-08 12:15     ` Andrew Cooper
2020-02-11 17:49   ` Ian Jackson
2020-02-11 18:03     ` Andrew Cooper

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=5227980e-5938-f23b-7b1d-eac67bba792e@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=anthony.perard@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).