From patchwork Wed Feb 16 10:30:22 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: 12748398 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 679CBC433EF for ; Wed, 16 Feb 2022 10:31:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.273927.469228 (Exim 4.92) (envelope-from ) id 1nKHaY-0006Td-Qv; Wed, 16 Feb 2022 10:31:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 273927.469228; Wed, 16 Feb 2022 10:31:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nKHaY-0006Su-Kp; Wed, 16 Feb 2022 10:31:10 +0000 Received: by outflank-mailman (input) for mailman id 273927; Wed, 16 Feb 2022 10:31:09 +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 1nKHaX-0006QF-Qp for xen-devel@lists.xenproject.org; Wed, 16 Feb 2022 10:31:09 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8b42a3d6-8f13-11ec-b215-9bbe72dcb22c; Wed, 16 Feb 2022 11:31:06 +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: 8b42a3d6-8f13-11ec-b215-9bbe72dcb22c DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645007466; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=zVlywzfrFYT4j81Q9eKIZ01umyrGNIbePcDAlJ1CQAQ=; b=BaHpv8bOn0iSO14nCmuxM7hGFaqbjwCescefJUWFPQYCVRJCYJOGIA4+ 8Kd3/OaD2BI2XlFfxOH6pGdn9aH6g2LemPHT7X9MVWhqCCO2dQlMuwLEw 2lq8FWw91qp7YijQCu8qq3bb6ikGEbYsWA6I3vVtOKTh9ZYyVDYxHiasi E=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: l/PpeIPovc6mK8WJ6pMCVSoyEj//rpDQ3TlaOQcYkHIVuCtOyGQDoQ+cAwvOR/zNXPMU5HdnP8 fotCSggbygUc5GPMeVYxYCGyc4bvvzFKMaWGz93oplz6yN3YpoIkGLRWkAZkc96nRhSGJuE8wR eDK5e+2zP1tOkcTMQEAL2A7t2UuLmGQiMgjU7KN3XDXMZlPVXTQZkOfsAUJiCbhw7ih1cEFlpK /YgTzhqj/0YOQQiQtTl01wJAjkq8P+CCx44nFV2MOiufZ/VBIXEaa8rdGwvTUdLUAN6WoAZiAB h38ZMtlKSdgVxUoM2dmsEi0z X-SBRS: 5.1 X-MesageID: 64225270 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:epsup6uf1Qub65YOrZr9gz2wrefnVL1ZMUV32f8akzHdYApBsoF/q tZmKWHXMv/ZYTf1L9x0YNnkoEpTuMXczoJqQABv/CxnRCIT+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHd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nJ5MwFRbU/tLEfxf08HVcBCSAqsZj8 aar0RnWQMRfSl06XtrWcv+m03i4oWMZxLBpR0LNL9QKIBfs/YFmJjbflPgyJ81QexzPyiHDj 1SdAAsCpPmLqIgwqYGbiaeBpoavMu1/AksFQDWLsefobXHXpzPxz5VBXeCEeSHmeFn1oKjyN /9Iy/zcMeEcmAoYuYRLDLs2n7k14MHipuEGw108TmnLdVmiFphpPmKCgZtUrqRIy7JU5Vm2V 0aI9oUIMLmFIpq4QlsYJQ5jZeWfz/AE3DLV6K1tckn94SZ2+puBUFlTYEbQ2HAMcuMtPdN32 /olte4X9xe720gjPduxhyxJ83iBcy4bWKI9u5BGWILmh2LHEL2ZjUAw3sMu3KyyVg== IronPort-HdrOrdr: A9a23:7yYfb6OaXjbvo8BcTjujsMiBIKoaSvp037BK7S1MoNJuEvBw9v re+MjzsCWftN9/Yh4dcLy7VpVoIkmskKKdg7NhXotKNTOO0AeVxelZhrcKqAeQeREWmNQ96U 9hGZIOdeEZDzJB/LrHCN/TKade/DGFmprY+9s31x1WPGZXgzkL1XYDNu6ceHcGIjVuNN4CO7 e3wNFInDakcWR/VLXAOpFUN9Kz3uEijfjdEGY7OyI= X-IronPort-AV: E=Sophos;i="5.88,373,1635220800"; d="scan'208";a="64225270" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C/mkjCdRUppdNHAnl2tHU0LDQ+bt4tk+sCtUB2CNhfwe3xMMbgMjgurhKOf7savGtdxJcsj28tOPvx7Ym4AGck+fD45u8BFrkHcW9zUwakKaJzDebTj941rDSJ61xgidY6hYhgoWdHoBIiSVSPWKFOmrPUWIGlHgM+Xy0VXrdaAnSWOL9rtQM6aIucvs8MKv71AqPJksan3I/JX2sH6j2OnBiaYj9dkiaBhGcOk21bguUf2uK7O7ycibzTHcl5yUwMVGCrWaO2eLkvDKN0NibEJMt3tbaDVJjeucB3w6DMf+qRggpwYPdzag+fU9URLflvDxSdhGjO58XynNzUd0Iw== 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=h8Tgei5/cDOMx9szRnWDQ16i7axYk3kXvj6N3RsL58M=; b=AMGQdgwIqdxY9da3YIyRG4WtLFw/nQToUcQ+5heQeheQAFTqO86+6rHLbqyVz9fzQlA5A/nrXhg4A6fx2ul5Usbgk4cZrmiFYVEma/gToq2CBsrBP7M+JMhdyvNZsxwkexfE293CGJaooKk7CC7IG1RcDzrday2/R9ZgPZewNFjCN8Kh9PZhy3gj4fjFpLSOnQeP/3xQjaJvMNuRLmO+Lp2AnM14Q1xRpCVoKVD6hXrjs8ZldSeU3+kA/70ajnnqHHq4bQjt+TDJw3Bv9H8tz1F7v+YrJngtzHkWUlqYGFsFjj2m3nTiTGhT4/v8EMweXkiv1hI46lwQECuPvEDkPQ== 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=h8Tgei5/cDOMx9szRnWDQ16i7axYk3kXvj6N3RsL58M=; b=JfI+VDXna+Abmnlj+sNBDLrqMzek/AyqdBb8L5zcVXwNo0QZELrT0tiRNy5BudgLpC0SDYZCPZTpGRNwz5Dq6fA6ifK/IWSWPFsWWw3A5qnyCTvqCif1ws0RtdRJj591UlTuy6rrNc/t/iJBaDHRbs+VeTw3wXmecbMo1uIluhI= From: Roger Pau Monne To: CC: , Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu Subject: [PATCH v2 1/5] x86/cpuid: add CPUID flag for Extended Destination ID support Date: Wed, 16 Feb 2022 11:30:22 +0100 Message-ID: <20220216103026.11533-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216103026.11533-1-roger.pau@citrix.com> References: <20220216103026.11533-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P265CA0023.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ae::13) To SA0PR03MB5610.namprd03.prod.outlook.com (2603:10b6:806:b2::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b67c13fd-2d8d-496c-9c3c-08d9f1376aa3 X-MS-TrafficTypeDiagnostic: SJ0PR03MB6256:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lF0Lw1gFJ5/NKLbaFuMXzRM+sZD+7lU8nZxIUpOiZfh1Q7nnAlGpdaRkZYRko0Lb7raOmEkNLARQP4efaKwEXMeJgsL5iAZxq4sjBo9zv53SzthwsOjg87COpSUrAoLV2rhukDqgGPyWIifsxypQSC9ceN3yfvu7zwtpHhuYZj3tuNSjXX1uP7AxTdbe2yc0QkaCI+UXMPVuqKCSHqaSsU1UJwdKSRR8MUzZZZLcVnvhdAvCFnMmbn5lOJAiswxNBAuYdoY2Q61Q6YlEzovhs5anpaSYN/uIu3LghGVCBciZQdBuhOObnJSPayFRxKP1kSYK6PRkI0NBmJ+qPHH89PlMuuKgieZlJ3t1F0aXE6hmfXkBGEirALGAy/A/vsVQBVjoiSjhRx+P2jUipZGSOPYGiy5ui9vIzHTTsI8VpNM6UQSGB+lX5+Yju8YVbS/LibZ1G8jvKyOdUu+TY9tPdyj403/Wt3og3oZcwNCM2PjtUhwJr+/pkI7EF2rlPcOsn+nlz8C+si0w7PJJT7oHUaartry6MJamcKXR6uMhrH7zIdt5499oSLchXPFJtTiyIdWtTYd4zp24x6S8nqN7+wMxI+mqMepljyve+Px04lazgEzPW8RPMTv+s4lRofC+wsulzrrZyfVc2stmFhBsBoq9A729f1E5PsbnEdKV+4FELwcogSjbxjB0U86ULOpei4wy3JmCNpIqmbpJV6F1olPBtouoxvkcPtDsqnVaWA8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR03MB5610.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(8676002)(2616005)(66946007)(6506007)(6512007)(316002)(26005)(1076003)(66556008)(508600001)(86362001)(6486002)(6916009)(6666004)(54906003)(966005)(82960400001)(66476007)(83380400001)(4326008)(38100700002)(36756003)(5660300002)(2906002)(8936002)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7JVaB3eplJSkIhGFw4OJLmdZjK9+?= =?utf-8?q?YbK8Ukhii9pRg+FXJPJTizfvZeGI7SFch0n3aMzR2nGBkppYRNf6Lj/JmEJcdUbcF?= =?utf-8?q?LCigSJQEvtgTbp6YX8ZfboI8lPr0rhsIcEQKlToAjzI5D8UUTJI3Y1MNdnRCzhjXN?= =?utf-8?q?ZBiNpzJg1fAgsBdQ/Jd15o3lPsX09NRqjhzcxJkB9IiWkWgpaTUiPsYy7AKtVKbgg?= =?utf-8?q?LgxF0qAg4PNEwQizDwdW0U3dxuvVErI/Ybj45byk7pNuHd5tvH9CJFvfIFXNmjQTu?= =?utf-8?q?sxrLPFQYZanII2V+ov1UfstvTTfVjraKe/Nu1L0LgLzpqPVMX070QlvrWcqvAdoHq?= =?utf-8?q?HLxLn0sswIINyOKNI+il0iKue0I0S7zvRKSH/TvM4rRGtMl2VkWgPSezhfXou6GgX?= =?utf-8?q?b/xEbVrtIZ5WhE2bOglOlYP3bNo7XnYLaUnjCQvBM3FhMU8WC8m3z/T47mE7VxWo5?= =?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?5hODwEjL/+CtSwjJh6C8XVad16h8QBqcfrU5xhS7LqKsRwLnA3y0Vp6E/RBTeZE61?= =?utf-8?q?eslDJ+YbNMvHeogIMCooUG8f4dCW/QYCKsHlKTRh2i9VybgkL/d1tmdbxCrm2PyX7?= =?utf-8?q?2BDCNmrzOt8GtVU0HvEp48yGEWWh6+Mmwr0G1Gznzr1h4oLlyaQkejj+/v/8dx9SR?= =?utf-8?q?NK5Qpk6Ybt8Znw0E+t57Ob38kYtVGx5GuUPJFC9b0yI1el+KfZhOofY=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b67c13fd-2d8d-496c-9c3c-08d9f1376aa3 X-MS-Exchange-CrossTenant-AuthSource: SA0PR03MB5610.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2022 10:30:56.6269 (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: bH2vgfAnvnQWt7K6aFpUsSlyLq2k2gOWiq4YOLFmoNIZ8bLts5zybpa/QV/eh15Sw/hNt8muWnSYtH1rnShSBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR03MB6256 X-OriginatorOrg: citrix.com Introduce the CPUID flag to be used in order to signal the support for using an extended destination ID in IO-APIC RTEs and MSI address fields. Such format expands the maximum target APIC ID from 255 to 32768 without requiring the usage of interrupt remapping. The design document describing the feature can be found at: http://david.woodhou.se/15-bit-msi.pdf Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Changes since v1: - New in this version. --- xen/include/public/arch-x86/cpuid.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/include/public/arch-x86/cpuid.h b/xen/include/public/arch-x86/cpuid.h index ce46305bee..49bcc93b6b 100644 --- a/xen/include/public/arch-x86/cpuid.h +++ b/xen/include/public/arch-x86/cpuid.h @@ -102,6 +102,12 @@ #define XEN_HVM_CPUID_IOMMU_MAPPINGS (1u << 2) #define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */ #define XEN_HVM_CPUID_DOMID_PRESENT (1u << 4) /* domid is present in ECX */ +/* + * Bits 55:49 from the IO-APIC RTE and bits 11:5 from the MSI address can be + * used to store high bits for the Destination ID. This expands the Destination + * ID field from 8 to 15 bits, allowing to target APIC IDs up 32768. + */ +#define XEN_HVM_CPUID_EXT_DEST_ID (1u << 5) /* * Leaf 6 (0x40000x05)