From nobody Thu May 2 09:26:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1623056696; cv=none; d=zohomail.com; s=zohoarc; b=d41P7YL/dS2CSuo6hnL4IpoaC7xoho0MS9Vt0eZ12RLnG0z8Z8RfPaHhSSJ4Kw00Iqgb9HGdrVBdTLrRlClC0EWIundKhYTTEmyASXyicaxq69as4F9pH5eFfLcvK4J0eilf2+Lgpd3ymaL2qjXB4YI5HWPOn0jcFIX/KiHLCDY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623056696; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=yL97rnNZM/IuAgRq+UAn/CMZq82m0SlmJjq4Ku9Fwmk=; b=UhWIgz838QN2TT8cyfza2mOv9tqOlLaJvNXG0UD6nTFpIHHCKixy5ShTs/MERtD1lBWftgIqHvoSycXYJis1hUvIZASt5Ggk8yOFxD4kZUvDJT4u8350pUPPSXoIPrvh1d/17g9louZxayI91DoKATPv2yhNsdtXuLUYGDJxC+0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1623056696677113.19337447912574; Mon, 7 Jun 2021 02:04:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.137751.255173 (Exim 4.92) (envelope-from ) id 1lqBBP-0002no-N7; Mon, 07 Jun 2021 09:04:31 +0000 Received: by outflank-mailman (output) from mailman id 137751.255173; Mon, 07 Jun 2021 09:04:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lqBBP-0002nh-KD; Mon, 07 Jun 2021 09:04:31 +0000 Received: by outflank-mailman (input) for mailman id 137751; Mon, 07 Jun 2021 09:04:29 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lqBBN-0002nb-LX for xen-devel@lists.xenproject.org; Mon, 07 Jun 2021 09:04:29 +0000 Received: from smtp-out1.suse.de (unknown [195.135.220.28]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c317017b-bc5c-4c8b-872c-03e730df006f; Mon, 07 Jun 2021 09:04:28 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BB84421A86; Mon, 7 Jun 2021 09:04:27 +0000 (UTC) Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 8DB4A118DD; Mon, 7 Jun 2021 09:04:27 +0000 (UTC) Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id pTV1IRvhvWDdBAAALh3uQQ (envelope-from ); Mon, 07 Jun 2021 09:04:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c317017b-bc5c-4c8b-872c-03e730df006f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1623056667; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=yL97rnNZM/IuAgRq+UAn/CMZq82m0SlmJjq4Ku9Fwmk=; b=aGVb94R3An5t1FUxPWWKFZc2kO/7nc82f8/g7ECRWgSWFMYkCp8IJPF43XFK8/tSr6yHxr RIe4Q7ldQXOE+Z6tWJ2eqy+sPS4rYBot2vMPDHGkRj1RDGiJ5qj1XUdkzN1pYUVAjaSl4K jYVxiD/rzlz77q9HT3c+KV2S/AEriyI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1623056667; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=yL97rnNZM/IuAgRq+UAn/CMZq82m0SlmJjq4Ku9Fwmk=; b=aGVb94R3An5t1FUxPWWKFZc2kO/7nc82f8/g7ECRWgSWFMYkCp8IJPF43XFK8/tSr6yHxr RIe4Q7ldQXOE+Z6tWJ2eqy+sPS4rYBot2vMPDHGkRj1RDGiJ5qj1XUdkzN1pYUVAjaSl4K jYVxiD/rzlz77q9HT3c+KV2S/AEriyI= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH] tools/libs/guest: fix save and restore of pv domains after 32-bit de-support Date: Mon, 7 Jun 2021 11:04:25 +0200 Message-Id: <20210607090425.18277-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" 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 n= o longer supported") Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- 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_s= r_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 =3D entries[0].mfn; #else /* 64 bit toolstacks need to ask Xen specially for it */ + if ( ctx->x86.pv.levels =3D=3D 3 ) { struct xen_machphys_mfn_list xmml =3D { .max_extents =3D 1, --=20 2.26.2