From patchwork Fri Sep 30 06:27:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12994934 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 D9E65C433FE for ; Fri, 30 Sep 2022 06:27:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.414011.658045 (Exim 4.92) (envelope-from ) id 1oe9UZ-00057Y-En; Fri, 30 Sep 2022 06:27:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 414011.658045; Fri, 30 Sep 2022 06:27:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oe9UZ-00057R-CH; Fri, 30 Sep 2022 06:27:23 +0000 Received: by outflank-mailman (input) for mailman id 414011; Fri, 30 Sep 2022 06:27:21 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oe9UX-00057L-DF for xen-devel@lists.xenproject.org; Fri, 30 Sep 2022 06:27:21 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2063.outbound.protection.outlook.com [40.107.22.63]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id efc3c131-4088-11ed-9374-c1cf23e5d27e; Fri, 30 Sep 2022 08:27:20 +0200 (CEST) Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by DB8PR04MB6778.eurprd04.prod.outlook.com (2603:10a6:10:111::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Fri, 30 Sep 2022 06:27:18 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2459:15ae:e6cb:218a]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2459:15ae:e6cb:218a%7]) with mapi id 15.20.5676.023; Fri, 30 Sep 2022 06:27:18 +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: efc3c131-4088-11ed-9374-c1cf23e5d27e ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l2Q9p1sIDILL7OpiEi4w7iNJY9C0tqvvgxr6AEQLzur7INJiO2vA5zAAHjTytlBd8xTBtRF5aJ6rF3fpD9WbpFnjxkwWKH8WyQuAiJ+gFNm1j2IvICNDZCtQBLjUtaWzM8HdOne5yWjRJGfsAR5uooJqzmx7XryXgpVkX7ARrOIEbSYbSfNE0xwoyQ3rOmdhxmMAc190MOl+Pza3HBBG1j3IeyqBN7EWsfbIX3rlpJBDMqLBAp6BMT2UH/0d+vu3fqU9HWPtwioZWnYE72Ew4KMC2bDbqhsM/l5JgG1oXoO84ECMc1NqzBYm9br5pwyNer/zHajsri3pmw3Qdhbc+Q== 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=8vSe6zMJQMKQZY0HkfJTH4TFHIMwGZdcGx5JC1qH/AM=; b=cBpKfkN602BL/rw+Nwad7afXmSwd8eW54YFXDeB9rcdYsBfHnBk1Fy4Q2+Ni9DX0p+gFH5iWhGKhzw7u+kSzm6w7Nf9dfSlPGIEGz74sVsv5CbtW/ZThI/IIvMFrFrSY1PE38EfZsUm7VxAfUsTr+THb5QVmjsnpZX0thXoR+PjfzPOJ/vZTx67lBSPnE+DDW8wiu/oXXZgMc1x2z3Efkky77z1d3CAuqXaGGPHzwzJ5hC36OzcCn1/w0o4psiizxK+ADn4SbRLBlAyu7603+cs1Q/C0EJeM3M00d9T/sbXLtGYwBRBy2TmssNa6FbSXq/qOYEDMBv8sHmhPpc4pLA== 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=8vSe6zMJQMKQZY0HkfJTH4TFHIMwGZdcGx5JC1qH/AM=; b=O9T662CGC/XmWh3zFIE9/i5Owmz9SssPZYh7MrnQNxvApD/ASQ4LcNjsMGkjoPSW8e7TbDYHA+eD2/5VLt4KC5F6WnjS8ZW4Y+OHnIcbB+xYJX5/GlIqI/bBnfkTYWXqthRloVfsnwQ+lokPKwxQGuliuLH3Nwkhtceh6xgPXtcoNLVSx5CbJy4oh/WWKvtC9JJu/lQT2Htj3wvNqrnszO1ONr/McqqMnqIVVCG/gSbUhMJTxcV0fJ/S5BEf+QYy1FprLjn5sRysGRvFWzgSmbNZTG0xFVncoUgyLsTSir4OLQQUmjsaJ4pVt8LQqUU3gFG5DyN57l8WPfZ5XozC5w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Fri, 30 Sep 2022 08:27:17 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Content-Language: en-US To: "xen-devel@lists.xenproject.org" Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis , Andrew Cooper From: Jan Beulich Subject: [PATCH] Arm/vGIC: adjust gicv3_its_deny_access() to fit other gic*_iomem_deny_access( X-ClientProxiedBy: FR0P281CA0039.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::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_|DB8PR04MB6778:EE_ X-MS-Office365-Filtering-Correlation-Id: a12b3e58-b036-4186-ee86-08daa2acd2e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JHyYW33sgvpauSVa59/t8GvhZXSMIjjWEe8LIPAhO8lcEAO2ghWA20uChYX5mpLudKfo3PdR12yrysMv5wOSeyToLRwVersAE/neB0whHSqUt9wu/MIbPF+o0+LXEg6GxmNlgIGyR2drT1wXbHCMg5aUgCqjoMlvQ/A972EP2URa/RRUv0Q9Ti5QYh5miXK965KlvA8aVPcmQYV/sfpugX1jmm5Y7fYIaZI3VBoD01k22L4q+OJntm75Qv48WdckyYPpLy0Muc2xulAqguNqe6ZvPdStG+V8r1hBJVvjsjgTwv2RdvlrY0/hudikSfZbh26tfoPU/NVucKa4dzbFx4BMgLyZxgrRSGmCfA5Sg/khe0GviUj31FKx/5lQwGHIH5rDH3weNWguIXg+ZANZiZ/YmsD01UUFxQc3bbiUrjUsxFvUjuG3Fx2ZnPML7zNNBKsupXfaT7c0YQdETtfVxZv1GaRPoic+JHQPu2MUHDI2AmQGAV6EdIlRwZH+PwFdNefqdHUH0hNArcxagz3euhFTKvidiot60GIKV2VhNf6co7RgbItvXG60BGQoyya808poC5MxwP+Ib7P229h7NfF7YpAvSOWL66lRwExalHHTMZ9YPgr9EeSLqlubsIncFlXpaiVX1SJ0ElA03eNYfQMgEprHKARQQpAJSebLCP487Ea7elenij2fc048uzeQSDZ8iqmfkr2W+AQMeVHu0rEH+QAWn7QXc0c7i3OMnsqcXJnzaWhfn9ferj14YfYyeT/Wuzhy3eGAAk6ZToc2Ob/vzOxdPHQQAaCNwfeDRC4= 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)(396003)(136003)(346002)(39860400002)(366004)(376002)(451199015)(8676002)(316002)(6916009)(478600001)(86362001)(6486002)(31696002)(4326008)(2906002)(54906003)(41300700001)(38100700002)(8936002)(31686004)(36756003)(6506007)(5660300002)(6512007)(186003)(26005)(66946007)(66556008)(66476007)(83380400001)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?daHhYdlSdsJLP42u7tgiShEQ34Eh?= =?utf-8?q?HboI4XgBBKXLc1Vff3Z+zvMO0423QPWTUp/FM36fPGNaGYQZ76h14xvtU6bSodZ7D?= =?utf-8?q?SZXrFeyTW7UZkmqMMwxPmbmJrH6PJ8oWctRXrrFEOi/DhGWKvm9D99fwJEfDguCSm?= =?utf-8?q?IfykLn983dknZQub74xFzO897ohzG4M6EfLDSD7PGdw4INn6nKii+tJtkLUk7Lf3W?= =?utf-8?q?aPt6TySQrLWdf11UI3qSBIJm+KS5RpLvW4L9azt2+EJtVtIOag8oZzlReJp2RauVi?= =?utf-8?q?AxSRtxxf6SwkrxHpdLBeX3th41ttcQNJ2gtZIm71r0qhMtKGHZyGEw2rpCjK54pNO?= =?utf-8?q?oPNkXbUIft+Hw3av0AHGliqiIcG04tKinVvAy1ReL86ak2KH93aKf6PmHg1fY2BhL?= =?utf-8?q?1c8Ja7b7ejhXqcexRHT+ZUbrTMdp5LskZr2pvg9p/hTHES8C6OsX8lVUPyb8sEFj9?= =?utf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?q?zEYHVy/j31WHx/820HxbBVUi9ShyWGuu4coFJVe19SyGXzz1RFpvIPYvS9c8IjvFl?= =?utf-8?q?fKD7tEmCt0D/WgEKajGka9s6hhXsqNBgTuUa/uFyA9Oxeygal38e11ACRZCxKU3+V?= =?utf-8?q?ITj/uWHoL+e6TSH+S4o//0Iagkl2kbwzi5GedH23QALSeEzC/gXs2zE7PvQ/WWpdw?= =?utf-8?q?+U+OGnUNUEb0?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a12b3e58-b036-4186-ee86-08daa2acd2e0 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2022 06:27:18.3627 (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: 5e/YEhhVqjej1cxJWe3oIXWIsHVZi2IaNHlkaIOUroq7vnScr8fKTzsXfsiBiGozQMsBupib+rE57cpiM7so/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6778 While an oversight in 9982fe275ba4 ("arm/vgic: drop const attribute from gic_iomem_deny_access()"), the issue really became apparent only when iomem_deny_access() was switched to have a non-const first parameter. Fixes: c4e5cc2ccc5b ("x86/ept: limit calls to memory_type_changed()") Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Michal Orzel Tested-by: Michal Orzel Reviewed-by: Bertrand Marquis --- a/xen/arch/arm/gic-v3-its.c +++ b/xen/arch/arm/gic-v3-its.c @@ -892,7 +892,7 @@ struct pending_irq *gicv3_assign_guest_e return pirq; } -int gicv3_its_deny_access(const struct domain *d) +int gicv3_its_deny_access(struct domain *d) { int rc = 0; unsigned long mfn, nr; --- a/xen/arch/arm/include/asm/gic_v3_its.h +++ b/xen/arch/arm/include/asm/gic_v3_its.h @@ -139,7 +139,7 @@ unsigned long gicv3_its_make_hwdom_madt( #endif /* Deny iomem access for its */ -int gicv3_its_deny_access(const struct domain *d); +int gicv3_its_deny_access(struct domain *d); bool gicv3_its_host_has_its(void); @@ -206,7 +206,7 @@ static inline unsigned long gicv3_its_ma } #endif -static inline int gicv3_its_deny_access(const struct domain *d) +static inline int gicv3_its_deny_access(struct domain *d) { return 0; }