From patchwork Thu Jan 20 15:25:26 2022 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: 12718803 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 75727C433FE for ; Thu, 20 Jan 2022 15:26:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.259109.446956 (Exim 4.92) (envelope-from ) id 1nAZJw-0004MI-7q; Thu, 20 Jan 2022 15:25:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 259109.446956; Thu, 20 Jan 2022 15:25:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nAZJw-0004M9-48; Thu, 20 Jan 2022 15:25:52 +0000 Received: by outflank-mailman (input) for mailman id 259109; Thu, 20 Jan 2022 15:25:50 +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 1nAZJu-0004Ld-Hc for xen-devel@lists.xenproject.org; Thu, 20 Jan 2022 15:25:50 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3e26756b-7a05-11ec-bc18-3156f6d857e4; Thu, 20 Jan 2022 16:25:49 +0100 (CET) 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: 3e26756b-7a05-11ec-bc18-3156f6d857e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1642692349; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=uz8uGhqvkVx+fQNRc6I6RtZfkTU8YzTQPI9wTYzWFkY=; b=U5mH0bQmW4l3nfLqXB6NV9U1cEM6h7A4rpKnvKGTryX9uxmbqgrAjzjx wgXM5Ac/lHVqktMAhIdrgW8rILIcpLzPNjzo+18BHMBDZRRqKD4uffmey NsmaIs2K/kRjmCn+8aSEOa8ax7PTar3rKkQUUczJR8besP1ewbAo4YAYQ A=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: vI23O9fr9kvTuYra5npa+GLAJvnPG9LdTMKjKCQT3CibmCNXaDfWZA0b2itn/1ci/CWhaJiPMq VItrBc1K44ixyvPSnQZsWWmWWxVR1jj2UfoeM3RvcHcEsPaQZ92BL/QLpiTquf4cJhJHNq7dwx 6HwbF1+R9FsRGABb3UsHlYvCB178BMcp3FQsXRwoFJ+oWsvOAGXZdzUWuBrHaxyHF9g9AGMWZr rbmhAh4oxU0b+ArM5+4aRFUFW4o69vIhj8rJ5sSafOWWpkMHlSa0KzXbKcyaUbJQSOrguaxUYx z/0ZZ0/qO6m79Ya7y7tMIPW6 X-SBRS: 5.2 X-MesageID: 62414704 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:935kMahlozSpAkAXEeV0LMpcX161fRYKZh0ujC45NGQN5FlHY01je htvWj+PP/yNYzCjKYx0aNi290oGvsKDmNJgSgs6qys0EHkb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0GE/NtTo5w7Rj2tcy2YDja++wk Y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ADnx5OkcYa ZT5fnnlbZrmG6hHjPkVjEF+q3vYp1zJGbLfqE6gL3V79AM90oJinfxx6Qk7wA9HdwGOt15Dt //Q9dVfYd1P7srhJJGdZc8qPSMex7wqGr3QRqvyHTcZeg60iH22tbKCItc3pDeRHVP9up0pK j8 X-IronPort-AV: E=Sophos;i="5.88,302,1635220800"; d="scan'208";a="62414704" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N1R2UJKSIgVaTV0M51/BgKZ1j9Db9K5wA+q9qcZJAFzD+AFROGT1lPuGba9IPIxJiCsGMaufsRyKXEeG7KzHkj89wSOpnVITpK0lM6NRl6CxBpI+z9G7Fowg6Q7+sCitEkoPeopSRCDN5MCZ3AxnZPovM0YnBcKHe479aq2SIv81OyN2rnowjpNGLU5hJFlrdRjuNLkmOeLV/2fBkucwaRDjs4BzVuaLJk8IdbYGc/tHtQZ3FiiS5OqnMUx9Yo7rVhtD9r9OY3imF/Dwp9eWJHFYrph0JX0d5RsPXWh+p5K3cTJlI+b7jjisj9oDizb/yMOxxWHHWp9M2z5G8FtoXg== 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=EVhmLB8WRhPIHIhc72MTOVuVpcpi8smodcvRNNMHH+Y=; b=YhX7bw2Ceqdnu8gvgtcf7GhIQbRe2bu5+c/2qVs9DbH7a500pNTSTIbwTldfysb/BPSZt5tZX0K0M6Ke396Y6/vpm2sT9JioBOa7alfpxdHuqhlYhJK9ubShIN/qGQqVGBLSHJk9GAYndZDdguUMJZBsfsGoqmH9SS6C+1cct+C9igSHrXz+Xeur+QezILl1kRJfCgabUQvFWbk0pXK5zdkvZeeVA8vbhPMY81nVCOTQdqnd9rER6eJnsryYhZJaz3bS3jiXO506idx/uR6zHUfALBlNvnut/tjzLJn/rFj72zfS0uGNR2q8qgHyHiqmAccGucvV5tinkVJOJ1ebpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=EVhmLB8WRhPIHIhc72MTOVuVpcpi8smodcvRNNMHH+Y=; b=fUwO8ksP1Qk+EiXF+s3BOGthfHja5+QdmwCmjKT+M/a2iNWWS8rhxAqQ2US6fw5BKuwhyPdttSoH8JXOpNmBJbB53FlBMqUyEKgCwcnTHMC9hWxsskNvO5IwsJHIrYIO9q2LMyruzoRyZNThvXVzu/A12RuhrsFH8NrsxgODhXo= From: Roger Pau Monne To: CC: Roger Pau Monne , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H. Peter Anvin" , Subject: [PATCH 1/2] xen/x2apic: enable x2apic mode when supported Date: Thu, 20 Jan 2022 16:25:26 +0100 Message-ID: <20220120152527.7524-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220120152527.7524-1-roger.pau@citrix.com> References: <20220120152527.7524-1-roger.pau@citrix.com> X-ClientProxiedBy: FR3P281CA0036.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::18) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 65654750-3101-419a-7847-08d9dc292098 X-MS-TrafficTypeDiagnostic: SA0PR03MB5468:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZIJdU3EvJ7rLAg0sdys10uG+cLTmCd3cLsz0qRDR8mNWqueG1TTaIti42T385GpWlzSKFou+LBc8MUNg0AlK4r7QbLtSk8+lTi70OmYn4o3f66leCocB/hNwbkxkQhw0Hx3XZgNeVF586/U4Je6Nk5b71GHRzW+GJEggnaGTpt26wAoCWvJeiygVu2zsiJE3O5+xH2Id6VFYGrT/AEFd8jkJ65aqTpnMfT61mfARr5L1KyzlZgDNpa1IFiKBgpJ8p8KsivK3X/XdB7sbTB4fY8YbrlP9OxmHrErsGGRQg2SYoCzoLlF3vVQNHwh4u2PiZr5w3lZaiqXPHzrH2eWHfMSwyg8kacM82XWunU9uaRhtO7Zf4Xa94EjZUqIGiykmaA9+HImAT5vFmI19b4ySmTzGnVO63NtcFDhqExQ/5b7zNHzOP+RvkV9BGr1mTuRV9ymwwVrFNaH6LD4v+k80Rk4oL7ISRa7qr77Mu5oYBXqizNBD6Ye528sXMZpno4yRI/GDP+5WohpFrv7AY3+iNR6CQjMei49n5Oh1RWo4c1YORR1RrxibrDXGgljVzrz7WfF1W7Ox5Ow6BXjy15CyEce6CY5o1ceS5jnGJMEDwYnEaFdFHoG2yWJdfjSCOLmN74XmFJfAShasFuAMLYu/3A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(8676002)(6512007)(6486002)(6666004)(82960400001)(66476007)(66556008)(6916009)(7416002)(54906003)(316002)(8936002)(36756003)(66946007)(508600001)(83380400001)(5660300002)(186003)(38100700002)(26005)(6506007)(2616005)(2906002)(1076003)(4326008)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vw9QPrAca4PVu6PFw64voEsc26DZ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0V?= =?utf-8?q?Z6Bx2YLlV2OV2G7vArHhh8gbW8zUSiVXY75KlUCTlXfn1RLyapO62hC2A+zFuEWjn?= =?utf-8?q?tBkDFKvBsaRRt+HOxcqEU/runrcpVZAY+izKjmt0/AujidEGV5B1+jTPEr19mKIKi?= =?utf-8?q?KDlpVfNR2+lVfWD/1Oso7a5n3iXudoXw2Bb+SqcznRqUzSBvyIROeq4yjKcbFRaOT?= =?utf-8?q?o3cWH8u6BYcuUbetMii1sYxSdhT7slcbSBpBoDsRh5dff1j+lsiTcqaJpwLEL3ZNO?= =?utf-8?q?q/inK+yVv/0V1iDGD1kyLGQdoFlu3ifYUnCMAiTQMpXJxNAnoSkpRmwNjsHg31nBY?= =?utf-8?q?vNCxA1ANT6SwVXOil82Hn9oY7zm3H2bGZVJ+LUvBBIVEEqUgGyS+FCZIsjIbCh4/o?= =?utf-8?q?BspFZZwfN5a/ibjGdWk94E60r130QcF+/GNncGqtinEyWK6AAR3c0uKGVjDDDXWcE?= =?utf-8?q?pS+c1hl6J7SSAhVu9Is3GaB2YGsvu92X7oIYInK0+6i2tUOLZWdgBXaNKE49+VUYM?= =?utf-8?q?BVPEbCwwt/4SMmf0zVCIsZEc5XHnsh7y0pGMTkXhQ2X9pQk3A9/Wv+Wy5lBGvQIdb?= =?utf-8?q?75JlPhAIdRC0l7dUT7Qr31+q6IT7OiZLHo0oP4qO6e3Qv/zinKIJdhYhxwNHu771b?= =?utf-8?q?oZ+zx9QR7e9wtvMCl/hKW5hngOwTuB0sAJsSAC02dSfpa6AYKd9gmOk=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 65654750-3101-419a-7847-08d9dc292098 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2022 15:25:45.0468 (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: V0oi2aSakybdC6b83E3hirloFEb3vanVHksLJzyG3ayjuKBRoW7F3UJd4VzQ/2+lfg6C5T37DgcuODg0P20KvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR03MB5468 X-OriginatorOrg: citrix.com There's no point in disabling x2APIC mode when running as a Xen HVM guest, just enable it when available. Signed-off-by: Roger Pau Monné --- Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: xen-devel@lists.xenproject.org --- arch/x86/xen/enlighten_hvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c index 42300941ec29..ab8171cbee23 100644 --- a/arch/x86/xen/enlighten_hvm.c +++ b/arch/x86/xen/enlighten_hvm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -248,7 +249,7 @@ bool __init xen_hvm_need_lapic(void) return false; if (!xen_hvm_domain()) return false; - if (xen_feature(XENFEAT_hvm_pirqs) && xen_have_vector_callback) + if (!x2apic_supported()) return false; return true; }