Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57EEDC47082 for ; Mon, 7 Jun 2021 09:04:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13D6960FE8 for ; Mon, 7 Jun 2021 09:04:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13D6960FE8 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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: 8bit 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 --- 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, -- 2.26.2