From patchwork Wed Jul 26 12:55:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13327983 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 B1EAAC0015E for ; Wed, 26 Jul 2023 12:55:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.570452.892228 (Exim 4.92) (envelope-from ) id 1qOe3C-0001RV-Bf; Wed, 26 Jul 2023 12:55:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 570452.892228; Wed, 26 Jul 2023 12:55:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qOe3C-0001RO-7O; Wed, 26 Jul 2023 12:55:34 +0000 Received: by outflank-mailman (input) for mailman id 570452; Wed, 26 Jul 2023 12:55:33 +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 1qOe3B-0001CQ-3h for xen-devel@lists.xenproject.org; Wed, 26 Jul 2023 12:55:33 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b36a6c9f-2bb3-11ee-8613-37d641c3527e; Wed, 26 Jul 2023 14:55:30 +0200 (CEST) Received: from mail-bn8nam11lp2169.outbound.protection.outlook.com (HELO NAM11-BN8-obe.outbound.protection.outlook.com) ([104.47.58.169]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 26 Jul 2023 08:55:26 -0400 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) by BN8PR03MB4964.namprd03.prod.outlook.com (2603:10b6:408:7d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 12:55:25 +0000 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::2e0e:5665:96a7:5767]) by SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::2e0e:5665:96a7:5767%3]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 12:55:24 +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: b36a6c9f-2bb3-11ee-8613-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1690376131; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=bMzgoEGHShhbiGsSDEpVwuBzCaDU2yGfCvh44S0Z3qQ=; b=Erf8FKv2YH6y1qP+A928acrHb2AMSL7AL8KPp5IVHuK9+jCQqjbGU83g FsS6uU/kqpDzXMCeS3v927UvYolVgkxPGhyEinFJSGXuo7CSgAydmVglU Ib4l5qGeazbSD06dlWTeTvqwZNtvf6SgXTXxEb8nsjBLiytZ3KdWOch8j c=; X-IronPort-RemoteIP: 104.47.58.169 X-IronPort-MID: 120127620 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:veLOHKAxjqi+VhVW/xXiw5YqxClBgxIJ4kV8jS/XYbTApG8i1z1Tz mIaDGGEPK6NM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jE1gFpYQBlolIzXOVrci13wemGKMzhOaIyceH6b9YQ5vdU7zg== X-Talos-MUID: 9a23:gYWqrgzLeAtcmp1AY4YwAZgyrt2aqI6CE20ByK4rh5SZNCl6N3SCiG+sc6Zyfw== X-IronPort-AV: E=Sophos;i="6.01,232,1684814400"; d="scan'208";a="120127620" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VzBIK6YZDTIP5DWTjpYUuszDOxjnRx4ppz1IBHpVFhBJIH5zcKji9OL0Lis3D+add8m+HJ1qENAaNV8777oId2yQeIhaMQcImCCzX4yjvRMHXgk26Km5U7eSco/WyX3NT4wLJyjEn0j92Eey9veZUmVkgXTw2xajOvLi/qnCfE9TB+KYhB7pxuwqHy839a7kwqIjrQzKR2wd31hquM+hmAIcllmaKidKSFx24ig8CU82uOTXvehcYARRbLBusJpymXz9c+5C8JFqrD7jjp2TPxxmlwzdjymIONQZKaC5ZX3F93kj23KqXbMgMTnalKQLO/VImISY13Trtiyihpej7g== 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=N4+akuxj11Pm6MmCcIs2+XB2xj50RQ6f8LRImtxUdTY=; b=Cq7pMRXbRDnLGQjGdGxF5qZp1NvptzIuPSMJ4nU+7wUi4rZftCGGpRWVix0mj5sGB678WJM8a1PHC4h46an2v8R1/2T3cNK2Z3mcpqCeP74q9lawdUHfuxHz0uSTNsdBGZj5AkB+ItFcoUDvoCTg3L5IL0485MU9QNGG4wtCYfD5maNMq/n0efTCUkAwox3dpKpTnIC+xOirPCevPY2b2NVJOTPrgFYenRI08VkaD/sa2w8KUmtO3aQtbc8/uJLfGuNBCzBAx0G+hqz4vEk2gA759NDDcRXfWLiL7Arb19lke2S0uV87tUzyt22LdH+w4M4XxhYDU6GZVT1RxSiZeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N4+akuxj11Pm6MmCcIs2+XB2xj50RQ6f8LRImtxUdTY=; b=YGQEu1EDh64fe+NsBtzBeaUjv3G+bMX2yqk8DkuEgQySGycdNgZVUq482DA98IukQfN1G2q1/hk9RaU4naOFXrVpknt/MEs+bKLttDy/uMH2yYu+HGhD9f//8Mq/bKx3fMXhMdelzSM7lYWnC371qaQZON/+7/OzO27KCXJWagM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu , Kevin Tian Subject: [PATCH v3 1/4] x86/ioapic: add a raw field to RTE struct Date: Wed, 26 Jul 2023 14:55:05 +0200 Message-ID: <20230726125508.78704-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230726125508.78704-1-roger.pau@citrix.com> References: <20230726125508.78704-1-roger.pau@citrix.com> X-ClientProxiedBy: LO2P265CA0295.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::19) To SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6423:EE_|BN8PR03MB4964:EE_ X-MS-Office365-Filtering-Correlation-Id: 9165da2f-8aec-4ed7-a238-08db8dd7942e X-LD-Processed: 335836de-42ef-43a2-b145-348c2ee9ca5b,ExtAddr,ExtFwd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mEpAiIZsL1RG3FSHtj+lZIxpOIn3ANWHSxxAa2L+FqbRPkWXCEVFDahluBXgN7WnWWWGxtd2yALcOipdhEdrRiZdaiB+NNYMjQrdNTcVvg6AgygiTFSJHfpvAyfS8mrr5mGFJ9XGvYVavR+80ZI3DivAu7vENt7W8LpE81Xa9bPwPpTs5eckMUdmSF866T3K8KNehgqLUaG7Jl92BfwnKW8uGuAaUTUlrcY4bjJH+ZhLKw9wK89FJ/SnIeFrSR3mMl/GxLaLFUl4gDcYwWGU7ZoLPKxWmBkDC9WfE5mIl5JJrOPsDsXXE93OvLQzXL9Wp464Gp5g/2J1tx/qE/UTPWKhEDajFVYCm9lNiJ6ntHGwR8jmImeKl2McMMk5F1b3OGlBVUwzGt8a8uXdu5MYDXcLuY4kTuWqARTwywcKDjN2qtcqeTbOKY60spaTNcgumzCjAu9HALHfOsthCUCyYO3+41pJJr+DA3RQVdUfWaFZBtULbmAPcZ23VJeRauBL/KOkXs7hnmbXQQbvLYl5jXRbfq0W9C1K6jSdIilJFVX1NFWgS2zB6t9f5VYarVcy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6423.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(136003)(396003)(346002)(366004)(451199021)(41300700001)(26005)(6506007)(478600001)(38100700002)(6512007)(86362001)(36756003)(6916009)(4326008)(8676002)(8936002)(186003)(316002)(66946007)(66476007)(66556008)(5660300002)(2906002)(2616005)(83380400001)(54906003)(82960400001)(6486002)(1076003)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LiO9lzvKSV7EoRmsBWM1QycA3/3D?= =?utf-8?q?4Yjs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yyj8xATtXWPBWkpfTnl4395TUey3Pol4MncTuXe4Qrsv3IGYT+1?= =?utf-8?q?EUI6kkMKIy/NdBimVe299nhjcl4Or5wHSiIRbmzimsjOoJmYtFd63SYgXBF8RO8Rn?= =?utf-8?q?We1MpZfCOA7LkBwxB1H7mhhKYs28bniy226NNAuMsd3ez3ROonOTlCfJM89VJJHXT?= =?utf-8?q?8EgTmGYEDY5QJhFwQRMazKOY9vPgaGqTC2MHWa+E7pX9H5nO1QklKvCgJyvxCBZhD?= =?utf-8?q?06bc0O3+tHyCWtYZn3DUYox0ajbqJLtsdTbBurrOzuYTmJWebEnX6Caf5/+T0V+Es?= =?utf-8?q?j7w1UhJkTZpEl5Z2SIWJR6rlS1vVr+h3R4peadjf9LOZ0y/84KQKAHckwTDcKUpSy?= =?utf-8?q?LirkH83tEmeR6CDQV9ndn10jY+QNk7HBZlT5XpKPL1BeMV8PGUvUo4xCW3FW6UUjf?= =?utf-8?q?DSjsDIWY2up0qEYXcQNfJ38jW9qKuq/K9tH/wxdKyqJxIp4R+JJE/ktHF2xQ33sNy?= =?utf-8?q?OjeW34svklplUNdOAAp//NFwvWTvjyO3NeLUktK3mCdlNXLMQrDLif1Ywr0drWXjK?= =?utf-8?q?ku09kzB545ZKXJrPBld96Y8oRB6IwyJP8fA2UvGF3yBfEhVfEgnZATZYOC7M9G/1S?= =?utf-8?q?ObTp9Jlhd6TtfbTrSeAUW9ZkHPZwcrIY9Q=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: gDprcMIUIgK/zonqQj5risU1zYm3BEKFrbaUM8JO7oN5QeGVmzWOUJUENFrnVEtgoQNkqOauCy/CmPiV9C+L2XosfzLpfQL/DwYikycygrDP4MXnrZjXfFDy9DuPrlOGGPh3MYerPiOpbBaeqd4eVmTTS0NhAAO1FJnJGXOeXRJX0D0mEbs8rZGpnQbZxqTqH+JGOuUpVASMGCaIXXE8KznaUH0nR/3Yok2eMgsqwBhz/or+4JnNjzLb+EiDrNxxfQjrluAuGWBk+Y/gx2+FixkMkURB9P8SuIE6kM0UmKPEndIMKPzV96jol0+i2u+E2Z8wOf6jButUtQFYeZa45o/c1aUyBbvR8lm4TrCqshS19wr/GlJZrf/k4klk4ZMx8XLkszDCIzslZCzb4USAdtjCwRIfHyTgQFL4UYQP10+0GCovTA4O8tykzpHhZz5ACGPEvxxLg+iJLm+4/jJ2vnUIAGaaumePS0AxalrdFIBc2eW48Sw/yEOHVanDXschxlItzymGSCnd81a0H64WeOlG+6yJvCjbOEOCSw2umb15T9h+BgzXkfIZJhw6jFRmKQYTzXId8v5lzPr9N9htPc/8CzqGGIv72s8vkqpHE7qqZlmoP7YcPh9ONwz+xhQjGPjlUTQtGAdSdEmSWHabfvESBTd3wg+Vseg+QPwXixFxrVapeno4EcarzLZJrfefdY63GRgFu82h27IU61I9ZY/ZlKoHeOkzTx5FR76PpB0p0hGtAGP6yaM6ucd6ZOpZupeAVCJugT/h7Bc4dGiWP8iyA0yVAR7h2bV/q0mxMTbXgfuL6Bb9e9taAmy7xPhWxxeQW7XfF1lP+8I7xTcXS7ml4E7NFBU+oEJeHDVeA7Y= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9165da2f-8aec-4ed7-a238-08db8dd7942e X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6423.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 12:55:24.9031 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ldUOxp+XZZwdSCW8jzQle3pSSvhZypuPoDfoFM6p+BvOJo2XU0M6gjK1XLraEUQKEk/X1prozUTonSz4cNUWNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR03MB4964 Further changes will require access to the full RTE as a single value in order to pass it to IOMMU interrupt remapping handlers. No functional change intended. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- Changes since v1: - Fix initializers. --- Tested on gitlab CI, builds on all compilers used there. --- xen/arch/x86/include/asm/io_apic.h | 57 +++++++++++++----------- xen/arch/x86/io_apic.c | 2 +- xen/drivers/passthrough/amd/iommu_intr.c | 4 +- xen/drivers/passthrough/vtd/intremap.c | 4 +- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/xen/arch/x86/include/asm/io_apic.h b/xen/arch/x86/include/asm/io_apic.h index bd8cb95f46b1..4c4777b68a51 100644 --- a/xen/arch/x86/include/asm/io_apic.h +++ b/xen/arch/x86/include/asm/io_apic.h @@ -90,35 +90,38 @@ enum ioapic_irq_destination_types { }; struct IO_APIC_route_entry { - unsigned int vector:8; - unsigned int delivery_mode:3; /* - * 000: FIXED - * 001: lowest prio - * 111: ExtINT - */ - unsigned int dest_mode:1; /* 0: physical, 1: logical */ - unsigned int delivery_status:1; - unsigned int polarity:1; /* 0: low, 1: high */ - unsigned int irr:1; - unsigned int trigger:1; /* 0: edge, 1: level */ - unsigned int mask:1; /* 0: enabled, 1: disabled */ - unsigned int __reserved_2:15; - union { struct { - unsigned int __reserved_1:24; - unsigned int physical_dest:4; - unsigned int __reserved_2:4; - } physical; - - struct { - unsigned int __reserved_1:24; - unsigned int logical_dest:8; - } logical; - - /* used when Interrupt Remapping with EIM is enabled */ - unsigned int dest32; - } dest; + unsigned int vector:8; + unsigned int delivery_mode:3; /* + * 000: FIXED + * 001: lowest prio + * 111: ExtINT + */ + unsigned int dest_mode:1; /* 0: physical, 1: logical */ + unsigned int delivery_status:1; + unsigned int polarity:1; /* 0: low, 1: high */ + unsigned int irr:1; + unsigned int trigger:1; /* 0: edge, 1: level */ + unsigned int mask:1; /* 0: enabled, 1: disabled */ + unsigned int __reserved_2:15; + + union { + struct { + unsigned int __reserved_1:24; + unsigned int physical_dest:4; + unsigned int __reserved_2:4; + } physical; + + struct { + unsigned int __reserved_1:24; + unsigned int logical_dest:8; + } logical; + unsigned int dest32; + } dest; + }; + uint64_t raw; + }; }; /* diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 25a08b1ea6c6..aada2ef96c62 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2360,7 +2360,7 @@ int ioapic_guest_read(unsigned long physbase, unsigned int reg, u32 *pval) int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val) { int apic, pin, irq, ret, pirq; - struct IO_APIC_route_entry rte = { 0 }; + struct IO_APIC_route_entry rte = { }; unsigned long flags; struct irq_desc *desc; diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/amd/iommu_intr.c index f4de09f43180..9e6be3be3515 100644 --- a/xen/drivers/passthrough/amd/iommu_intr.c +++ b/xen/drivers/passthrough/amd/iommu_intr.c @@ -352,8 +352,8 @@ static int update_intremap_entry_from_ioapic( void cf_check amd_iommu_ioapic_update_ire( unsigned int apic, unsigned int reg, unsigned int value) { - struct IO_APIC_route_entry old_rte = { 0 }; - struct IO_APIC_route_entry new_rte = { 0 }; + struct IO_APIC_route_entry old_rte = { }; + struct IO_APIC_route_entry new_rte = { }; unsigned int rte_lo = (reg & 1) ? reg - 1 : reg; unsigned int pin = (reg - 0x10) / 2; int seg, bdf, rc; diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index b39bc832821a..786388b4d9c7 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -419,7 +419,7 @@ unsigned int cf_check io_apic_read_remap_rte( { unsigned int ioapic_pin = (reg - 0x10) / 2; int index; - struct IO_xAPIC_route_entry old_rte = { 0 }; + struct IO_xAPIC_route_entry old_rte = { }; int rte_upper = (reg & 1) ? 1 : 0; struct vtd_iommu *iommu = ioapic_to_iommu(IO_APIC_ID(apic)); @@ -442,7 +442,7 @@ void cf_check io_apic_write_remap_rte( unsigned int apic, unsigned int reg, unsigned int value) { unsigned int ioapic_pin = (reg - 0x10) / 2; - struct IO_xAPIC_route_entry old_rte = { 0 }; + struct IO_xAPIC_route_entry old_rte = { }; struct IO_APIC_route_remap_entry *remap_rte; unsigned int rte_upper = (reg & 1) ? 1 : 0; struct vtd_iommu *iommu = ioapic_to_iommu(IO_APIC_ID(apic));