All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Cc: Ian Jackson <iwj@xenproject.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH] tools/libs/guest: fix save and restore of pv domains after 32-bit de-support
Date: Mon, 7 Jun 2021 13:20:37 +0200	[thread overview]
Message-ID: <747ef58e-3b39-89b5-c48d-37313e33c260@suse.com> (raw)
In-Reply-To: <cd954aa7-ee43-1126-f97a-21c213ef053b@citrix.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1681 bytes --]

On 07.06.21 13:01, Andrew Cooper wrote:
> On 07/06/2021 10:04, Juergen Gross wrote:
>> After 32-bit PV-guests have been security de-supported when not running
>> under PV-shim, the hypervisor will no longer be configured to support
>> those domains per default when not being built as PV-shim.
>>
>> Unfortunately libxenguest will fail saving or restoring a PV domain
>> due to this restriction, as it is trying to get the compat MFN list
>> even for 64 bit guests.
>>
>> Fix that by obtaining the compat MFN list only for 32-bit PV guests.
>>
>> Fixes: 1a0f2fe2297d122a08fe ("SUPPORT.md: Un-shimmed 32-bit PV guests are no longer supported")
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>   tools/libs/guest/xg_sr_common_x86_pv.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/libs/guest/xg_sr_common_x86_pv.c b/tools/libs/guest/xg_sr_common_x86_pv.c
>> index cd33406aab..ad20461e2e 100644
>> --- a/tools/libs/guest/xg_sr_common_x86_pv.c
>> +++ b/tools/libs/guest/xg_sr_common_x86_pv.c
>> @@ -154,6 +154,7 @@ int x86_pv_map_m2p(struct xc_sr_context *ctx)
>>       ctx->x86.pv.compat_m2p_mfn0 = entries[0].mfn;
>>   #else
>>       /* 64 bit toolstacks need to ask Xen specially for it */
>> +    if ( ctx->x86.pv.levels == 3 )
>>       {
>>           struct xen_machphys_mfn_list xmml = {
>>               .max_extents = 1,
> 
> This wants to encompass the whole ifdef block, to avoid having differing
> behaviour between compile widths.
> 
> Also the comment next to compat_m2p_mfn0 wants adjusting to say "only
> set for 32bit PV guests".

Okay, together with Jan's suggestion this makes sense.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

      reply	other threads:[~2021-06-07 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  9:04 [PATCH] tools/libs/guest: fix save and restore of pv domains after 32-bit de-support Juergen Gross
2021-06-07  9:12 ` Jan Beulich
2021-06-07 11:01 ` Andrew Cooper
2021-06-07 11:20   ` Juergen Gross [this message]

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=747ef58e-3b39-89b5-c48d-37313e33c260@suse.com \
    --to=jgross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.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 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.