From patchwork Thu Jan 5 16:07:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13090127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3EBC7C3DA7A for ; Thu, 5 Jan 2023 16:08:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.472056.732162 (Exim 4.92) (envelope-from ) id 1pDSmT-00076W-8T; Thu, 05 Jan 2023 16:07:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 472056.732162; Thu, 05 Jan 2023 16:07:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pDSmT-00076P-4f; Thu, 05 Jan 2023 16:07:49 +0000 Received: by outflank-mailman (input) for mailman id 472056; Thu, 05 Jan 2023 16:07:48 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pDSmR-0005kL-Ss for xen-devel@lists.xenproject.org; Thu, 05 Jan 2023 16:07:48 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2067.outbound.protection.outlook.com [40.107.104.67]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1833933e-8d13-11ed-91b6-6bf2151ebd3b; Thu, 05 Jan 2023 17:07:47 +0100 (CET) Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by PAXPR04MB9326.eurprd04.prod.outlook.com (2603:10a6:102:2b8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Thu, 5 Jan 2023 16:07:46 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2991:58a4:e308:4389]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2991:58a4:e308:4389%7]) with mapi id 15.20.5944.019; Thu, 5 Jan 2023 16:07:46 +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: 1833933e-8d13-11ed-91b6-6bf2151ebd3b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mkvHJGOSyTC+uh7KK9yKtwXtD4wBCxEwOJlMnqQSu0uq0g5kEhJP33TmxQx5ZLAnAeh6eKMBP8hBcNSTnA/eZVd/yyV3iemh/pZwK6bnI2twKpzn7b32ohBawSvYYc4UnmfWnUz27Nzz2BDbcL8G2jDbJaJsJQuPb12RU65DEoGBTi9/CfUPELl7bwhceZIxHT9fU27AE5/kA35CjnzJck9pIgGo3oeYYH54JXjMoweMBO0dHVZ2EFzrWU8fMFJlV44FgMt2Rrbu3UCpLjHjdf0xqXiAY5qraRKvwzLyhOFQzmLKAJWlanwHq4l3qg+nTh72XW5Fall2qvwOn3q7ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rkzMWSo4VP4iVpCTjNCVb8H5HyGWrBz+Rgr5MlOxOXI=; b=idd6L6FpiU/2DvabEp8/JucIpXyj+UvQJxZXHrqG/WXbSXT9xPtk7rEb5jzkr195Ly6+1lr8bFzLvTCI1VZ69bb5UHy79RAf183moAqy81GH80ZoDksquItCilhSiaff6AJva41BfQC02vmNgHcgXgTnQs/Ix6YXRAZMblcLBc7ttkVfjOxq2nows5tv38cD0Cd8xbn+yoTjFimuTr2h4ox/Ai35saWHLWVawU9qIG1JQh66TeQNMFtZmW5QebKq8kwJrexAAmq7997yp+Tc9sGIWDyfJGuo3/WhuDRlw2JvHw7F18Y3klQU7YfAZygcEe6sOj5PSwXVAn30LnXNtw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rkzMWSo4VP4iVpCTjNCVb8H5HyGWrBz+Rgr5MlOxOXI=; b=gQz6yA5sZHFf4Twv/F1LXZxXucKEh3yRKR3vYxJ78t+WO8OlSBTxbPMiKzC+9KAFJoXSFDWSPtnYjmazJ5cDfynhBBUDQx1W1lEB0LNXzNVhbhF9l6Ga3vfFUEoL+P/PW8hNPQ6/uYSpJrETfq8Lmw29avdvD1RqbsIpRFXUCfaOU1GJeM+m12mLSiiLKW6TMJM9zyUPxPM1fv2FNhXKzt9fU4/I6wKHsaGiyDpXzodcUG1B/4KxOoyfjZ4xkMzPT6PienCcRRuQcIbZ3w+6/wonafpQ2PT2Snu/4bQRhUrBtYo4hzLioSz0YjYUuy9qB4zEYJBUYX1PR/yZh4Q12Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <514f374d-daa0-ddc0-8cdf-9dfd014d508b@suse.com> Date: Thu, 5 Jan 2023 17:07:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: [PATCH 11/11] x86/shadow: sh_remove_all_mappings() is HVM-only Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Tim Deegan , George Dunlap References: <074dc3bb-6057-4f61-d516-d0fe3551165c@suse.com> In-Reply-To: <074dc3bb-6057-4f61-d516-d0fe3551165c@suse.com> X-ClientProxiedBy: FR3P281CA0070.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::22) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|PAXPR04MB9326:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a50beb0-154a-425f-3cd2-08daef36fbd2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3UX9Gb8wOQdYBNL9QMEEOh/S1m4Gqp6MVJVEmW5FkJ4v1Yw6hcrzEQ2bc6lLbB8jlHJwIOV/MvG/aHVvOpnANkCw+NvZYH1WY/cFVNstBkFx2NAD9t4g7hturD5hrjbDW+3LEc56WRnHhhBlkBKV2Mv1jOuZXRYJRLHx6eMigYrkhqQzQw1qeUn+uy63WtgvbqSNpj7XwdyyT2/UrV0FElj7qvgmPP0nFgiTvM9UtqgzGyDeHpFDBT6qGPKmh6PYmYLDnBjd/YxG/UuPuGKcASoDp8xWkp5eCA8yhDiUYjmglusPifgnXBE2IRNF9VFz88w8LjMk027+RqhW4Krd6VR/APKXFGwhvd3PMK6PxFGDbhttPAGTL0cEUX0sULKYp6fH46ctayr3I/46WmDvrcAwe3X5Yh9MVHBB9LIAZapfJaSJLNxfhn3ZKcP0q/Or0LfuPljDkaWweHXCP23z1JhgpOgPH0Gjxsu3e7yoYATC6w//88r/2q5N+mgiZRK1LDyCkPuRoXmd2wyEkIpDJb7/1qXtvPd2ggvbyzNWUcYXfWCNQwNnlGTX6aGcew+1JgOleoEQEHpw0Yw49M/hAxYjDrQShvy8m+3JEElbNWpWtnlOqyVrRQnyaIuf1u6ZSKYjZzlPplgA2+iHFUXmz0h5qU07IWapG/OslnwmCGI1mo8VE0tsVoei9OI1KR438XKYS1QJcVLiy+Olm2AD4pNbxAf9uheuxKCLcsJ0+JA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6560.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(346002)(376002)(136003)(39860400002)(396003)(366004)(451199015)(186003)(26005)(2616005)(83380400001)(86362001)(31696002)(36756003)(6512007)(38100700002)(316002)(66556008)(31686004)(54906003)(6916009)(2906002)(4326008)(66946007)(8936002)(41300700001)(8676002)(5660300002)(66476007)(478600001)(6486002)(6506007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?GNozWXtimKcvhGt4N+ckgG0n0PYe?= =?utf-8?q?VWU2Hjjj0tm/F7F2o1PESNPr0Tj7O9ludkIdC60SyDU0TlkEefi1BfnUyGCx+cO2P?= =?utf-8?q?yihnAaDXSA7pR7972M4Jx9nXDK5kltzXEX+eRh6i3XbBUbIg3ssk5sWUS6HqJNpnB?= =?utf-8?q?Ql35+JCRfxk+T5S7572hNLpOZx3KVOgr2EzL+ep/Iblxr1xGu9HcndkphMKcth/GN?= =?utf-8?q?1yGhGr2VRiWWe49Kk1Jvppn4vxFfFO2O4NFGsC3lcSIXylCEhiUUnhARctSE1A1vb?= =?utf-8?q?JtRHjwetVfsLbkUETQNctqLf8jsw2acAHirhpQ1icZv8Hkr/frNBdOi387hDsPLx5?= =?utf-8?q?qhc8zUlP7e50mZOel+8635Www6EAXMKYTWR4aQ6kZfDWy6xA+g/GNZpSGUUkXkfs1?= =?utf-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J6EyIJVlULpNLQH5vWFu9yIG8A/g+uMc9U1CvOF1n0JLj1x8qFr/EVC0FX?= =?utf-8?q?194OmseQ665Yi0p/UplRVlk/lO5W9Zll4P9bTHwRhTCrtSd9RSf0JP8UcA/l+iekL?= =?utf-8?q?2ZU9xgqtd2qp/DAom5GaOraoQrbAKdGN7UCg2Tpjxv8T6e9BexV8891HSRw5gqg2m?= =?utf-8?q?SPewEgPcdIubCtOWsawsKzXyrVYxxT1ldb+VKOlx0jVf85jVGHbiIH31xceya9dKI?= =?utf-8?q?ixK+0UWJGd2v?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a50beb0-154a-425f-3cd2-08daef36fbd2 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2023 16:07:45.9884 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A9Kk2GnJgQoXn6o5Aw5NeB4cTtB+/9ZszHm7RsREp/286bWoi2PaoGWsz28cy/lSyRECxe8zOeimWxZIkK2dDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9326 All callers live in hvm.c. Moving the function there is undesirable, as hash walking is local to common.c and probably better remains so. Hence move an #endif, allowing to drop an #ifdef. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -1992,7 +1992,6 @@ int sh_remove_write_access(struct domain /* We killed at least one writeable mapping, so must flush TLBs. */ return 1; } -#endif /* CONFIG_HVM */ /**************************************************************************/ /* Remove all mappings of a guest frame from the shadow tables. @@ -2004,12 +2003,10 @@ int sh_remove_all_mappings(struct domain /* Dispatch table for getting per-type functions */ static const hash_callback_t callbacks[SH_type_unused] = { -#ifdef CONFIG_HVM [SH_type_l1_32_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 2), [SH_type_fl1_32_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 2), [SH_type_l1_pae_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 3), [SH_type_fl1_pae_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 3), -#endif [SH_type_l1_64_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 4), [SH_type_fl1_64_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 4), }; @@ -2064,6 +2061,7 @@ int sh_remove_all_mappings(struct domain return 1; } +#endif /* CONFIG_HVM */ /**************************************************************************/ /* Remove all shadows of a guest frame from the shadow tables */