From nobody Fri May 17 03:54:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=citrix.com); dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=2; a=rsa-sha256; t=1698155750; cv=pass; d=zohomail.com; s=zohoarc; b=A+HRn0AeJHhaLfNAr/b/iUiGj2vw05YzX2wWPFfVKbNFFtmYkMtEt5/p/kexX9cR4CEDLzgguXE228/hWC5eorqRUubCUT1F5OiDnJYARSRLFliDOzi1oOKQv4trIBtw3VK4C2iECmZhUrT+bHspi8V7Dt3h5jIV1ziVHJPfh1c= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698155750; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LNkMhdC+rCaRlp+Tt4F04Pgskhxq/sWocxlpcspEf1I=; b=G0uo5EFhsMpQuxrQMOhLTCBnPXsqTkM+WaTb8OZzfPLstvW11n2XGTUASX9m1KjftmYCReJftSjmRUf55uQWVIWam1m52tEtXtthUfjTvbdISze1i59lF58x2KzZHyBvaO9hbjRdAZiBfSNCLWVJfmXXrb4u1lJAoSz2UlQ0KUk= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=citrix.com); dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1698155750664103.74115631280233; Tue, 24 Oct 2023 06:55:50 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.622006.969048 (Exim 4.92) (envelope-from ) id 1qvHsR-0008EW-9x; Tue, 24 Oct 2023 13:55:23 +0000 Received: by outflank-mailman (output) from mailman id 622006.969048; Tue, 24 Oct 2023 13:55: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 1qvHsR-0008EP-6f; Tue, 24 Oct 2023 13:55:23 +0000 Received: by outflank-mailman (input) for mailman id 622006; Tue, 24 Oct 2023 13:55:21 +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 1qvHsP-0008EJ-IB for xen-devel@lists.xenproject.org; Tue, 24 Oct 2023 13:55:21 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f63d67c3-7274-11ee-98d5-6d05b1d4d9a1; Tue, 24 Oct 2023 15:55:19 +0200 (CEST) Received: from mail-co1nam11lp2169.outbound.protection.outlook.com (HELO NAM11-CO1-obe.outbound.protection.outlook.com) ([104.47.56.169]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 24 Oct 2023 09:55:15 -0400 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) by BY5PR03MB4983.namprd03.prod.outlook.com (2603:10b6:a03:1e3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Tue, 24 Oct 2023 13:55:12 +0000 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::acf0:ce2b:1634:5aee]) by SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::acf0:ce2b:1634:5aee%6]) with mapi id 15.20.6933.011; Tue, 24 Oct 2023 13:55:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: f63d67c3-7274-11ee-98d5-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1698155719; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=502XBgEwxn9TErS7zbWrM4f0tWE7agvNq20pg7imh/0=; b=W6HZ7ds77CKIFYIa8BP0NjC3CGWI4bsjvhzjsC5Xpvl0goUqoiE3tVzo y3w7httLshYiOxdo/LimX48TGO0/1w2ETEgKuqCeJVWtPkhgYjFMF+xif aDeaTcQE9XC/z4fvuNKU9ZXHSSCYkZELCPV1fZ2nQ3gPasVHKnKiKRv+p o=; X-CSE-ConnectionGUID: 1aF1dPr/Q6iy5lDrZiG82w== X-CSE-MsgGUID: Qop0uy/sSZCvFfZ9KeL4dg== X-IronPort-RemoteIP: 104.47.56.169 X-IronPort-MID: 126927750 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:i+m58K/qLnSKPoVYPHcDDrUDTn+TJUtcMsCJ2f8bNWPcYEJGY0x3n zcZCjzVOfmMamv2KtF+btjg9UhSvJfTndQxSwZuqyw8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjVAOK6UKidYnwZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ird7ks01BjOkGlA5AdnPaoX5Aa2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDkkX/ NJBJAgXKSndhvPrxJ6heOhD1p48eZyD0IM34hmMzBn/JNN/GNXoZPyP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWNilUvgdABM/KMEjCObd9SkUuC4 HrP4kzyAw0ANczZwj2Amp6prraVw3KhB91PTNVU8NZTh0XL231UEyYkfkWVr8voqUOaB95Qf hl8Fi0G6PJaGFaQZsnwWVi0rWCJujYYWsFMCKsq5QeV0K3W7g2FQG8eQVZpatYrqcs3TjwCz UKSkpXiAjkHmL+ITXOQ8J+EoDX0PjIaRUcZfjMNRwYB59jloakwgwjJQ9IlF7S65vXqHRngz jbMqzIx74j/luYO3qS/uFvA2jSlo8GQShZvv1uGGGW48gl+eYipIZSy7kTW5upBK4DfSUSdu H8DmI6V6+Vm4YyxqRFhid4lRNmBj8tp+hWG6bKzN/HNLwiQxkM= IronPort-HdrOrdr: A9a23:TwCYD67r6fd9bl0DUQPXwPLXdLJyesId70hD6qkRc203TiX8ra uTdZsguSMc5Ax/ZJhCo7C90cu7L080nKQdieN9AV7IZmjbUQWTXeZfxLqn7zr8GzDvss5xvJ 0QFZSW0eeAaGSSW/yKhDVQuOxQouW6zA== X-Talos-CUID: 9a23:L9nLp2Oo5AWzBO5DASBJrUIsAIccLHzMkXP8OX25JjYzV+jA X-Talos-MUID: 9a23:+7CAAQm6hnAE5RNNQhb8dnpbM98w/rXpE3s/uosotfvVFiFUZzuS2WE= X-IronPort-AV: E=Sophos;i="6.03,247,1694750400"; d="scan'208";a="126927750" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FNxMNOir04CEOVKCM1Mo7jo0y2N+qJuPZIiDuZf45Y03fp/UJVonRix+Oi/WBsP2aeAwB3ioxfJ3FRSuCvi9T1fFdlCGQhTx9cQF7zljYbEZw/WPKtd8W1h+wRsSEgDujw+h8RzpXIb6jIYlczMdpxTWWIT9PJkZb9t47wOmHotltXbbRCESLH1P+XxpWpBwzbsMSbWmbBqlQKE47VwWCF1582ANXbTSvfDQKjGp5R1WFLR2JSwWh+2bzcQHgwCiMEiUFlXBiaB5KpJi6j9jruqFOLbgIdoPzCFg8U5Gz6Iipbw9v1250Jkm4sWzKSpe3a9FBUuWajSWg1qN7+Zadg== 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=LNkMhdC+rCaRlp+Tt4F04Pgskhxq/sWocxlpcspEf1I=; b=WqEDc8VyjqKZwpbgAw0CvZbMGCMh4JV0EA7xZWvmjsBP7ebM8jHCDho4QlOBYdV9ICuGnjkIuj61RDokTdfCE3duyrKq55L43L82GbHsh7gviroXllP8/L6GFuVcB0x8JDhZ8sZWvZ+ihXBiAJYD/Z6XT0zDMAwPA7K+E2dMIFp4nVe5fjGpNGEWK4JgJh6qqceo119mSlspRh5B67oiLp1saKKmIReZJQrOuvD2uyki4cgYI1VShsyLb+RuKgAQyyWa9ECru4/rTpSf+FLuzEwjgikfMr8c4pLS7gxMrwUS9VemBm0L9JwQI0+B4YDZRaXJaBwJcH7q1FSIr6C7KA== 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=LNkMhdC+rCaRlp+Tt4F04Pgskhxq/sWocxlpcspEf1I=; b=NANA+rlvdo647uidbGHMPAuammBIs7od4v4OIfunNic0o8cim+pQ+WXxqEo4JRAGuX55EwUWjYF6O97dROgxyWkJpzGg8JDst9ZFmK8O5UNlyNpGQegnaePC6cG7BSKGSrhKIqyQizIj4YAs6kkNQfy93rcTeIKusU9lD+V9seg= 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 , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode Date: Tue, 24 Oct 2023 15:51:50 +0200 Message-ID: <20231024135150.49232-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.42.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: LO4P123CA0382.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::9) To SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6423:EE_|BY5PR03MB4983:EE_ X-MS-Office365-Filtering-Correlation-Id: c61ccb99-dc60-4ac0-fa42-08dbd498d729 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: VEffyVUemcElPj0aUo4VReqVMM3YTmFmJGT1IO6kdZmEcjkdjjAUuEWj/6OWc+H6FYxRbdBU109SnKSASWnjAW+yFW19UE3QUYdraTUdKbz+pbgdiWIwoPeJ6DyIRN/Hd/iDiE8daoKHVqIWNBvXYv0LoyO6rG/cfXHqHfsShMhg+d0i5xTdn4Yozg9uRRWV3Wq+g9d3kQ7uCTCOgsPWAjgNbADZW8aHlzXnDYscQSxCIw40Me1dSwWNy+uLE3KBtyhoi/AsTv8qSPHu/X3WL721LJOcdQcDUpjLSOU+TJsnzh0aRcNsiN+6OMGw4gNDb8cp1TjjtZvF5YZjA75AtpuRrB31o2UvkW33/L1WH1vcuHDTyuz+h/07qIBV02511z5xPwyCsp+GkTK144w94OTgY+I/nakVqZ7Wu+J+FYbqGIaXBWZb/HMh2CIKzJwkdBsw0cSTU/vy3vwHaLgqCOHNMZ42lzR9H5yjWz48yzFxc5b1oLV0OO2RCZWXooo6W6854+kxb3SvnCl1Nl9t+uCNO9Tuhfkq6OTu/1eCgi6PeiHepn1CwH9HvA9WR7yz 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:(13230031)(396003)(136003)(376002)(366004)(39860400002)(346002)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(83380400001)(6506007)(6666004)(2616005)(6486002)(8676002)(41300700001)(38100700002)(66556008)(4326008)(54906003)(8936002)(66946007)(316002)(6916009)(66476007)(26005)(478600001)(82960400001)(1076003)(6512007)(5660300002)(36756003)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZUFQbGVmeUhBZC85eXpJV1Jsbm81OG4wejRxaEJDbWhGNWFpYlZJMU9DUTY4?= =?utf-8?B?UVh2UmVKcit5VXNQcUpwV3J5dVVkbVlzaWtkQXNXaEU3ZzNlK1hFdTZLZkxM?= =?utf-8?B?dVhjbS9rekVLODhucXptbnFQaVNzYjBwc0pLWERkYU5BZnlPRXhoNVkySGtu?= =?utf-8?B?QXUwc3luR044NFhxSGFu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TbFuwr8g/q+DHhXSLOqQA2hfZ2mKD802GHMQlnKshdv99zvIJ0kwyOK+ola7IaJ1jYI2mQEnjirJrQ= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: c61ccb99-dc60-4ac0-fa42-08dbd498d729 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6423.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2023 13:55:11.9897 (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: BufEUXMxK+Bp9lB92GnNovJCfzE2e20RtaiOpFTDExy/pN25PkXHZpyTqPiC2q5bdu2aAfK9WfaZHp85mEipOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR03MB4983 X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1698155751585100001 The current implementation of x2APIC requires to either use Cluster Logical= or Physical mode for all interrupts. However the selection of Physical vs Log= ical is not done at APIC setup, an APIC can be addressed both in Physical or Log= ical destination modes concurrently. Introduce a new x2APIC mode called mixed, which uses Logical Cluster mode f= or IPIs, and Physical mode for external interrupts, thus attempting to use the best method for each interrupt type. Using Physical mode for external interrupts allows more vectors to be used,= and interrupt balancing to be more accurate. Using Logical Cluster mode for IPIs allows less accesses to the ICR register when sending those, as multiple CPUs can be targeted with a single ICR regi= ster write. A simple test calling flush_tlb_all() 10000 times in a tight loop on a 96 C= PU box gives the following average figures: Physical mode: 26617931ns Mixed mode: 23865337ns So ~10% improvement versus plain Physical mode. Note that Xen uses Cluster mode by default, and hence is already using the fastest way for IPI deliver= y at the cost of reducing the amount of vectors available system-wide. Make the newly introduced mode the default one. Suggested-by: Andrew Cooper Signed-off-by: Roger Pau Monn=C3=A9 --- Do we want to keep a full Logical Cluster mode available? I don't see a re= ason to target external interrupts in Logical Cluster mode, but maybe there's something I'm missing. It's not clear to me whether the ACPI FADT flags are meant to apply only to external interrupt delivery mode, or also to IPI delivery. If ACPI_FADT_APIC_PHYSICAL is only meant to apply to external interrupts and n= ot IPIs then we could possibly get rid of physical mode IPI delivery. Still need to put this under XenServer extensive testing, but wanted to get some feedback before in case approach greatly changes. Based on top of 'x86/x2apic: remove usage of ACPI_FADT_APIC_CLUSTER' --- docs/misc/xen-command-line.pandoc | 11 ++++ xen/arch/x86/Kconfig | 37 ++++++++++--- xen/arch/x86/genapic/x2apic.c | 87 ++++++++++++++++++++++--------- 3 files changed, 104 insertions(+), 31 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line= .pandoc index 6b07d0f3a17f..09c6f17b4b02 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -2802,6 +2802,14 @@ the watchdog. =20 Permit use of x2apic setup for SMP environments. =20 +### x2apic-mode (x86) +> `=3D physical | cluster |=C2=A0mixed` + +> Default: `physical` if **FADT** mandates physical mode, `mixed` otherwis= e. + +In the case that x2apic is in use, this option switches between modes to +address APICs in the system as interrupt destinations. + ### x2apic_phys (x86) > `=3D ` =20 @@ -2812,6 +2820,9 @@ In the case that x2apic is in use, this option switch= es between physical and clustered mode. The default, given no hint from the **FADT**, is cluster mode. =20 +**WARNING: `x2apic_phys` is deprecated and superseded by `x2apic-mode`. +The later takes precedence if both are set.** + ### xenheap_megabytes (arm32) > `=3D ` =20 diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index eac77573bd75..a44d63b5c8dc 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -228,11 +228,18 @@ config XEN_ALIGN_2M =20 endchoice =20 -config X2APIC_PHYSICAL - bool "x2APIC Physical Destination mode" - help - Use x2APIC Physical Destination mode by default when available. +choice + prompt "x2APIC Destination mode" + default X2APIC_MIXED + ---help--- + Select APIC addressing when x2APIC is enabled. =20 + The default mode is mixed which should provide the best aspects + of both physical and cluster modes. + +config X2APIC_PHYSICAL + tristate "Physical Destination mode" + ---help--- When using this mode APICs are addressed using the Physical Destination mode, which allows using all dynamic vectors on each CPU independently. @@ -242,9 +249,27 @@ config X2APIC_PHYSICAL destination inter processor interrupts (IPIs) slightly slower than Logical Destination mode. =20 - The mode when this option is not selected is Logical Destination. +config X2APIC_CLUSTER + tristate "Cluster Destination mode" + ---help--- + When using this mode APICs are addressed using the Cluster Logical + Destination mode. =20 - If unsure, say N. + Cluster Destination has the benefit of sending IPIs faster since + multiple APICs can be targeted as destinations of a single IPI. + However the vector space is shared between all CPUs on the cluster, + and hence using this mode reduces the number of available vectors + when compared to Physical mode. + +config X2APIC_MIXED + tristate "Mixed Destination mode" + ---help--- + When using this mode APICs are addressed using the Cluster Logical + Destination mode for IPIs and Physical mode for external interrupts. + + Should provide the best of both modes. + +endchoice =20 config GUEST bool diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c index 707deef98c27..15632cc7332e 100644 --- a/xen/arch/x86/genapic/x2apic.c +++ b/xen/arch/x86/genapic/x2apic.c @@ -180,6 +180,25 @@ static const struct genapic __initconstrel apic_x2apic= _cluster =3D { .send_IPI_self =3D send_IPI_self_x2apic }; =20 +/* + * Mixed x2APIC mode: use physical for external (device) interrupts, and + * cluster for inter processor interrupt. Such mode has the benefits of n= ot + * sharing the vector space with all CPUs on the cluster, while still allo= ws + * IPIs to be more efficiently delivered by not having to perform an ICR + * write for each target CPU. + */ +static const struct genapic __initconstrel apic_x2apic_mixed =3D { + APIC_INIT("x2apic_mixed", NULL), + /* NB: int_{delivery,dest}_mode are only used by non-IPI callers. */ + .int_delivery_mode =3D dest_Fixed, + .int_dest_mode =3D 0 /* physical delivery */, + .init_apic_ldr =3D init_apic_ldr_x2apic_cluster, + .vector_allocation_cpumask =3D vector_allocation_cpumask_phys, + .cpu_mask_to_apicid =3D cpu_mask_to_apicid_phys, + .send_IPI_mask =3D send_IPI_mask_x2apic_cluster, + .send_IPI_self =3D send_IPI_self_x2apic +}; + static int cf_check update_clusterinfo( struct notifier_block *nfb, unsigned long action, void *hcpu) { @@ -220,38 +239,56 @@ static struct notifier_block x2apic_cpu_nfb =3D { static int8_t __initdata x2apic_phys =3D -1; boolean_param("x2apic_phys", x2apic_phys); =20 +enum { + unset, physical, cluster, mixed +} static __initdata x2apic_mode =3D unset; + +static int __init parse_x2apic_mode(const char *s) +{ + if ( !cmdline_strcmp(s, "physical") ) + x2apic_mode =3D physical; + else if ( !cmdline_strcmp(s, "cluster") ) + x2apic_mode =3D cluster; + else if ( !cmdline_strcmp(s, "mixed") ) + x2apic_mode =3D mixed; + else + return EINVAL; + + return 0; +} +custom_param("x2apic-mode", parse_x2apic_mode); + const struct genapic *__init apic_x2apic_probe(void) { - if ( x2apic_phys < 0 ) + /* x2apic-mode option has preference over x2apic_phys. */ + if ( x2apic_phys >=3D 0 && x2apic_mode =3D=3D unset ) + x2apic_mode =3D x2apic_phys ? physical : cluster; + + if ( x2apic_mode =3D=3D unset ) { - /* - * Force physical mode if there's no (full) interrupt remapping su= pport: - * The ID in clustered mode requires a 32 bit destination field du= e to - * the usage of the high 16 bits to hold the cluster ID. - */ - x2apic_phys =3D iommu_intremap !=3D iommu_intremap_full || - (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) || - IS_ENABLED(CONFIG_X2APIC_PHYSICAL); - } - else if ( !x2apic_phys ) - switch ( iommu_intremap ) + if ( acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL ) { - case iommu_intremap_off: - case iommu_intremap_restricted: - printk("WARNING: x2APIC cluster mode is not supported %s inter= rupt remapping -" - " forcing phys mode\n", - iommu_intremap =3D=3D iommu_intremap_off ? "without" - : "with restricted= "); - x2apic_phys =3D true; - break; - - case iommu_intremap_full: - break; + printk(XENLOG_INFO "ACPI FADT forcing x2APIC physical mode\n"); + x2apic_mode =3D physical; } + else + x2apic_mode =3D IS_ENABLED(CONFIG_X2APIC_MIXED) ? mixed + : (IS_ENABLED(CONFIG_X2APIC_PHYSICAL) ? physical + : cluster); + } =20 - if ( x2apic_phys ) + if ( x2apic_mode =3D=3D physical ) return &apic_x2apic_phys; =20 + if ( x2apic_mode =3D=3D cluster && iommu_intremap !=3D iommu_intremap_= full ) + { + printk("WARNING: x2APIC cluster mode is not supported %s interrupt= remapping -" + " forcing mixed mode\n", + iommu_intremap =3D=3D iommu_intremap_off ? "without" + : "with restricted"); + x2apic_mode =3D mixed; + } + if ( !this_cpu(cluster_cpus) ) { update_clusterinfo(NULL, CPU_UP_PREPARE, @@ -260,7 +297,7 @@ const struct genapic *__init apic_x2apic_probe(void) register_cpu_notifier(&x2apic_cpu_nfb); } =20 - return &apic_x2apic_cluster; + return x2apic_mode =3D=3D cluster ? &apic_x2apic_cluster : &apic_x2api= c_mixed; } =20 void __init check_x2apic_preenabled(void) --=20 2.42.0