From patchwork Wed Oct 25 10:13:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mykyta Poturai X-Patchwork-Id: 13435907 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 67765C0032E for ; Wed, 25 Oct 2023 10:13:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.622788.969924 (Exim 4.92) (envelope-from ) id 1qvat3-0008QU-UF; Wed, 25 Oct 2023 10:13:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 622788.969924; Wed, 25 Oct 2023 10:13:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qvat3-0008QN-QP; Wed, 25 Oct 2023 10:13:17 +0000 Received: by outflank-mailman (input) for mailman id 622788; Wed, 25 Oct 2023 10:13:16 +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 1qvat2-0008QC-B7 for xen-devel@lists.xenproject.org; Wed, 25 Oct 2023 10:13:16 +0000 Received: from mx0b-0039f301.pphosted.com (mx0b-0039f301.pphosted.com [148.163.137.242]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1ae304a9-731f-11ee-9b0e-b553b5be7939; Wed, 25 Oct 2023 12:13:13 +0200 (CEST) Received: from pps.filterd (m0174682.ppops.net [127.0.0.1]) by mx0b-0039f301.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39P93PdS023707; Wed, 25 Oct 2023 10:13:06 GMT Received: from eur04-db3-obe.outbound.protection.outlook.com (mail-db3eur04lp2051.outbound.protection.outlook.com [104.47.12.51]) by mx0b-0039f301.pphosted.com (PPS) with ESMTPS id 3ty025r8hk-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Oct 2023 10:13:05 +0000 Received: from VI1PR03MB3758.eurprd03.prod.outlook.com (2603:10a6:803:33::29) by AS2PR03MB10033.eurprd03.prod.outlook.com (2603:10a6:20b:640::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Wed, 25 Oct 2023 10:13:03 +0000 Received: from VI1PR03MB3758.eurprd03.prod.outlook.com ([fe80::eecf:7ef0:b4b5:fc42]) by VI1PR03MB3758.eurprd03.prod.outlook.com ([fe80::eecf:7ef0:b4b5:fc42%4]) with mapi id 15.20.6907.032; Wed, 25 Oct 2023 10:13:03 +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: 1ae304a9-731f-11ee-9b0e-b553b5be7939 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OI/yEBc9ICcHZtZSCDNE9NnFUV7+4ZUksXhqs1C/fzVcaOiVRzbqKlSx4MZF6moQZ/e0ehZF5n+Kr0XvOIw9OX9+oWQNnYYXRePmFdETWUvhRcKbebxVmIBVLtycogI9mjBLMhVCAppgnRnCznQavkubCPL/W4UJi2AxVyWKQoh13nBQ61dWXla8o7VLDkksY/XiKHVguOdyLb76NRMZd0ioAoS6xc9sroqxIKMEosTtZwSFMauXCe00umcFXlEUx2rv86VnBeblrT5aktFTzQVo0v6X5MZwWogk0Zdy0gk2wwgY/dufiMeaoIbQTMupp5+aR132EABpjPv2rguPEA== 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=v0hasQCTewak0M/WsWi1DBsXRVxcba50BJ6CoGzHE18=; b=TTLUTjaC6izjrBpKTT1qAgelF/bxkEKzMJ+E9RmBA2B43fZMeO6Dig2X7iMwyg9ZiwFHhvRlm6zNO1n6vR8LzpYBRONupkNAfMmRqzMo1fYuQD/M8Dk68GpXcX64vA2VwtE0LCdS2dXDns82tWKkoc0IYcPUMhVx3Baf3Je47QI23hF4Z8UMENz0Pkyb+srSNlT8AzhfWtXhvrs8p8FEuUu2Lw29ssZvl/p/dHAYD+MlrnDv/FTc0mCr0ygRmNVA4DEqN23LvXaJiUhbgl60oN5QLuGz9Kd/289Kgu4uLZiKOS3fQwRdqvmouj1t7Jely99oHAMxyOazkquwRYij+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v0hasQCTewak0M/WsWi1DBsXRVxcba50BJ6CoGzHE18=; b=dFSk0z0uJsssQtZIMdtATWrqql8SK/ydTVXHKh7vWI6vgUzTllRcd7KAugRU0xh6UFYIu+4/JrVNIhNc3xc3zh+9DwfKFixOZwVXVJHaHa7/ulQqPMCE0hslMmbLXmd2thdREqatlheCZgcCJDmL69IAAawgWWnf5PkmBD1N6maEjj5rkj3+nkTdWZqyCSz5mOjfkLsWF2ipulfYQFbgNPhc++tNeb1vQsK/SK8e1bmEW+HrgaYQeGJAhkdnAngXajYD4GzIxcAr0D7s9LIbPFEadJcwTvTnPY8aLyuyLZll5avczHmvECxs+uJy9Hg10uRuq8oGPefQ3O8m12Xfeg== From: Mykyta Poturai To: "xen-devel@lists.xenproject.org" CC: Mykyta Poturai , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [XEN PATCH 2/4] arm/vgic: Move get/put irq to a wider scope Thread-Topic: [XEN PATCH 2/4] arm/vgic: Move get/put irq to a wider scope Thread-Index: AQHaByvWBiq1Qvud1EWAf+t452eM0w== Date: Wed, 25 Oct 2023 10:13:02 +0000 Message-ID: <89ca664d00a3cdcf3f68d8ae0c4a6c7b76965120.1698225630.git.mykyta_poturai@epam.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: VI1PR03MB3758:EE_|AS2PR03MB10033:EE_ x-ms-office365-filtering-correlation-id: 1768e6df-5532-41d1-37a9-08dbd542f95d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xkI/K//eG/Ws6WAmB+DVsNNatEmtD+QTDO2mML5hSVZlTHxmXEbmSEnonyybKLH9etescKh/W+0BLDaVJXUljptB0rr80IIhroq9n6sjbSBthNGRENj5CLCIy7pZZTpWrsz6baaLE3UKWebAxNqc4x+B1TMuraJnGfyHIRvtLvrNZBbte8cCLqyH7OQB3+llZjTFY4a7MwuYcXpa7WEIyq5Mh8bXIeUFojLTU22if6n0tKuW4bw+TxMd3qp1xViuHHCnZAlzcx1ZIo3o472nZ0cN2JzsfDCwKV8aucZbCjb5YueF/88/ASCA+bNfJzqoFRBHgYfs1/ZTGxPpL69MzQOyd9rVPl8wOYajh4JPTrV+um3BHb+wTpWwbKnlCSX04iYDjgdPw8aHCozKnb2pdldaNmfjhF4h8U6ptg+TRh4JgJ5ODyTbEcDqwJmB/GVUbEV9Thd+iQbuGtwA/i4HeV5RtiyAOdmX2zNp377G6MewrmT9aLanJqknAGgrQ1Bw93/epaZV33g91mCRGcfz0iw+1FL4ttBQldayT36240CFBdAhhHOLu/UVkQkQ/mFm8t8KfT+Ze6IELfBa69/cFVVMP0htRmxn3VCg6cYq0pcQLPAVwBqLoHorRZmy7cqU x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR03MB3758.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(376002)(136003)(346002)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(86362001)(2906002)(91956017)(38100700002)(54906003)(41300700001)(66446008)(66476007)(122000001)(316002)(76116006)(66946007)(66556008)(6916009)(71200400001)(6506007)(6486002)(2616005)(107886003)(478600001)(6512007)(83380400001)(64756008)(4326008)(36756003)(5660300002)(8676002)(8936002)(26005)(38070700009);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?ns5+Q8kwzju1fo0QNqfGU1q?= =?iso-8859-1?q?NqpEa6FZGcj2UVaqDX2iAmjVSBgHHsA50/R4HBOKKpLFs9CLUD081eTIuu/a?= =?iso-8859-1?q?EyLlBrg2t0dnDEzaJyrRXpDDm0gjphucL6W50w3ji2ieY7wWxRHBOtDlaY0F?= =?iso-8859-1?q?+sNO/OLWIUrqfBJAXaEDmdA+uPBrmvqc9X1Bb5kgMK+s7tRwqr5RzHgmFeTo?= =?iso-8859-1?q?hwM2N2IAgO196oaCYfsGn7LNjyhB20077pJU7YuaqPwSLdiSX4gamPwF3RyC?= =?iso-8859-1?q?MqPIJHzrt9kiLoUz3r7cVuQNwLVSWaYiOF7u+mjZrahYLBu5LpmCzIDf87wF?= =?iso-8859-1?q?ER3On5nu6sEVJLCcdYi7UGkMEluN8VJT0FwMxByIH3rl4apMmTj+ZVMx6m9d?= =?iso-8859-1?q?3kTSyMAaroooYM/l11IIvsLsqmnepKmTyH9ANVe9xRQU4/9JRYM5CO2ZchWk?= =?iso-8859-1?q?8V1EORMCVB51JFAnsm1jsHylTcGOorhBrcfL4aUmm0AzEO2V2zQ6FYCqyIMg?= =?iso-8859-1?q?g9VTNiYVDdkGDL8uChxaetZW1iKZmUnPKqbv1i+klJnsYGHhYEFEznMn/uH9?= =?iso-8859-1?q?ei069jbp9vwcOo/7wCED+dlw/KcK9VSKjhQZU1nqAM6q95ca3/slyDaMyYra?= =?iso-8859-1?q?i4ssOTJvUylwCqpdPwOXEfuZ0xwxKFtRqk+xMyQFaI1qun9HVTm7jgbMD/CG?= =?iso-8859-1?q?hR7IP9r9Olbwl4t9y06shYuDlJQwjOWupqcH8ACfM1nVXwdKizzfri62hTrI?= =?iso-8859-1?q?r/Dpn0nB9s4kEln1Yl1pYOszkauDy4BxMA8BTIwobWIAqGGRGg2iAaD1snXh?= =?iso-8859-1?q?BkLlycWgv89860GiX7H2efiHHa6W04bcqjDXlJkot18oWFQq8GZ3R8CxkfGJ?= =?iso-8859-1?q?L4Z67oSmHWpEptfTXEBw8C6YG5NZdKEhBXyCewoyGt5LAGbg7zINKGjuO75i?= =?iso-8859-1?q?c4lQLdj45rVFxbjrd4vmdabFEJ2ynEfRks4P+gTvuzSva2sMZtVab8OUKXjw?= =?iso-8859-1?q?hPd7sFb/qKzIvvl69HSV4+hJRgrHjCAvGIOMcTAD+M4DARqjmeUAc2krWrhR?= =?iso-8859-1?q?fHLxQahyt8QYBJI5HhdQLpWLYK5/MxlKQjD9L+5XSj5cguoKMSgn6cQo91sn?= =?iso-8859-1?q?ze2gexXucAkXwYPUE/auwAzBxdfl7XMGYwmI+De+5gVrmHCerKXVqLXRl4Wi?= =?iso-8859-1?q?Qi8YHnhQA2ibBccfjSol07MNU8n0DRTkbFa1fkA/P7x78ZYxymFrYoyoY1iw?= =?iso-8859-1?q?/qUaIZEA/sjZqFMuVXExoaHvlT54V+9hQMPJKFinBdXUalcCUBnTgFWoZpLJ?= =?iso-8859-1?q?XzJWSR9cLR194UsuyAP4gO/NsCAhCtym4pyQPU7h7WtWDMSS1iN2y0GmoaXK?= =?iso-8859-1?q?6I/F1WziDa6VCiC/gSqle0vnh69NXejc1tvs7LQxsIn+v9y1LTWXotbEHRe6?= =?iso-8859-1?q?ADHtgOGvfWsdPKzfMjl1DoavnFicYg1w9hhmpooRsJD27WPcMwAif7W825So?= =?iso-8859-1?q?tMUi+0pOf1RcaEB5ItlaNuDeqNeMheFNfp8/q6Y+yk7LlbP7Ht+uUfkEV83a?= =?iso-8859-1?q?GFdM8lhcEewG7kWgvfE7oMzsFt3uot5Bv8E9bWupWuYev43mkLXQdZbHoAFc?= =?iso-8859-1?q?BnH+yxrNkseerrZEcyCu40oyFcrjnTfeqEn9oQw=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB3758.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1768e6df-5532-41d1-37a9-08dbd542f95d X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2023 10:13:02.9566 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6JAuyBJS03iusiJwsRIbRlwPfk9sKsMOQmbi24bAR2EMRKWxeEccLanpdo9bcO5a85toJr8nVcr/2woyE+Abpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB10033 X-Proofpoint-ORIG-GUID: azudyZhk4km5IehQ_6g_Y1jADpHND25B X-Proofpoint-GUID: azudyZhk4km5IehQ_6g_Y1jADpHND25B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-25_01,2023-10-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 suspectscore=0 mlxlogscore=768 phishscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310250088 We will need GICv3 code to access get/put irq to inject LPIs for new VGIC similar to how the old one uses irq_to_pending now. So move get/put irq to the same header file. Signed-off-by: Mykyta Poturai --- xen/arch/arm/include/asm/vgic.h | 6 ++++++ xen/arch/arm/vgic/vgic.h | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/include/asm/vgic.h b/xen/arch/arm/include/asm/vgic.h index 922779ce14..7216ce82b7 100644 --- a/xen/arch/arm/include/asm/vgic.h +++ b/xen/arch/arm/include/asm/vgic.h @@ -387,6 +387,12 @@ void vgic_sync_from_lrs(struct vcpu *v); int vgic_vcpu_pending_irq(struct vcpu *v); +#ifdef CONFIG_NEW_VGIC +struct vgic_irq *vgic_get_irq(struct domain *d, struct vcpu *vcpu, + uint32_t intid); +void vgic_put_irq(struct domain *d, struct vgic_irq *irq); +#endif + #endif /* __ASM_ARM_VGIC_H__ */ /* diff --git a/xen/arch/arm/vgic/vgic.h b/xen/arch/arm/vgic/vgic.h index 534b24bcd3..c6bc3509a5 100644 --- a/xen/arch/arm/vgic/vgic.h +++ b/xen/arch/arm/vgic/vgic.h @@ -45,9 +45,6 @@ static inline bool vgic_irq_is_mapped_level(struct vgic_irq *irq) return irq->config == VGIC_CONFIG_LEVEL && irq->hw; } -struct vgic_irq *vgic_get_irq(struct domain *d, struct vcpu *vcpu, - uint32_t intid); -void vgic_put_irq(struct domain *d, struct vgic_irq *irq); void vgic_queue_irq_unlock(struct domain *d, struct vgic_irq *irq, unsigned long flags); void vgic_kick_vcpus(struct domain *d);