From patchwork Fri May 13 10:34:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12848644 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 C3CF3C433F5 for ; Fri, 13 May 2022 10:36:05 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.328385.551378 (Exim 4.92) (envelope-from ) id 1npSe4-00026B-Cb; Fri, 13 May 2022 10:35:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 328385.551378; Fri, 13 May 2022 10:35:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1npSe4-000264-9g; Fri, 13 May 2022 10:35:40 +0000 Received: by outflank-mailman (input) for mailman id 328385; Fri, 13 May 2022 10:35:39 +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 1npSe3-00025y-38 for xen-devel@lists.xenproject.org; Fri, 13 May 2022 10:35:39 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6c425a6e-d2a8-11ec-b8b8-f95467ff1ed0; Fri, 13 May 2022 12:35:37 +0200 (CEST) Received: from mail-dm6nam12lp2171.outbound.protection.outlook.com (HELO NAM12-DM6-obe.outbound.protection.outlook.com) ([104.47.59.171]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 13 May 2022 06:35:34 -0400 Received: from DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) by BN6PR03MB2819.namprd03.prod.outlook.com (2603:10b6:404:118::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Fri, 13 May 2022 10:35:32 +0000 Received: from DS7PR03MB5608.namprd03.prod.outlook.com ([fe80::5df3:95ce:4dfd:134e]) by DS7PR03MB5608.namprd03.prod.outlook.com ([fe80::5df3:95ce:4dfd:134e%5]) with mapi id 15.20.5250.014; Fri, 13 May 2022 10:35:32 +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: 6c425a6e-d2a8-11ec-b8b8-f95467ff1ed0 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1652438137; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=kwxTFr5F6CSXIMRptM2BX/K/lUueF8Uj+EjtZEw9lYU=; b=VXpWvYNvLcK0ygZueI4RFMSEjEsshaWhWJBivsz0oSEQ7WujhREjj3vd P5x5EXhwZ0FWq0vHo0xCDPtXUNuhHNjte9GQETQhR7AZ0hX66vhXsXUx6 zYWpKuVrHOId+A9aMFVO9mBIEsToeyax6e2LwUxsii8ulZoqLD2Z1QswG k=; X-IronPort-RemoteIP: 104.47.59.171 X-IronPort-MID: 71235105 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:Sd86ZKmry27nKbyg2BmOWtLo5gyGJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xJNWTvVM6vZYzP8e4okPdyypE4HusSGytcwHAo++S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qDxOIiCqo/zOl/Ccl6nfkx1Pdq2Dku9bFSDUzDNcErZ5FczPCgnBQ8e1U4e Zu5Sa0ppBXBRTPkGDW/N7TTSxnkUKyvD4LjfMTtXpCSoETAYUh57D3xHklX6voIRiKprzOSI JVfYDhDbdtABinhknizyVSKIfGZAVyIv+EKnJyyfB9nQIm30yR9HFou/D3rk1wiK7VdKM0md gsSp4Y8o2mbvVmGJ6VV91xNfdeNAT2MGPxGVPXB2jbP4c6HF+Ig6LLwdwOlZGXkdozvdMPpK g= X-IronPort-AV: E=Sophos;i="5.91,221,1647316800"; d="scan'208";a="71235105" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W+sYFPn3o5VAt0W5dtUM1diPHcgKkep6sc5xrgrdyWBGfG7hs88XeY17hCXYJETwRnbJqlN0HZHAvM7lXNYSu7Ixiyf8CelN8QBNyuefkIYmDDWRQ8/NG9IarRXUS4DUYRSGmzpE/ThWvrB3T1nrjNqhbijwOLtnM4Dsu2dXOGZ94rOPVIIdPKWcrPr8vjdcrYIrlHdK2dKwGM9qgoSQpEjz2F8I9bVUpDQMR94vMMG/l6IvmW5y0DQAZ6SXvmRMNhVaKzcTnTwV2NLAoLj7cJKm3dxiLYKxzYI1c3ACqL26u3GqKNCP4h9aimoGv+aoWIz8Kl8YtgeSYwz2HrfwHA== 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=cJVuBkdSGC+1p8QkOTN2jFLWWi099Q4WwQFh47ImKJU=; b=OsgR5hst0aQ8rtugPju+GLbnpHu7YxhzTwFTAliao8OILoz+FA6GABezfPdtEepTWKgfDYVf1DJoYr8veaB3uV9baSmubPvgj+4vsxtXftS/mK+n7fV1Qjm7qwA8pEeAQ/lU9183Mr+/GuW5W5NJEnsV/BbFqAA+eTJUpjBXmn/ed4pPQTTrh7FforlIzicH8ElDGa8JYPx9GCHUDk7fiCVqzdaZTFoE8ehW9D9Kz2Yb9BZRUyqDIRESLMtM6fFcEmc6MuXglaYUY7gbZxgjGfrZb57RKPoDOtfK8L5RzKXGcPa5Nr+iGGn7Kzp21AN9QvaArs3bNCHAHwyVIlDvdQ== 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=cJVuBkdSGC+1p8QkOTN2jFLWWi099Q4WwQFh47ImKJU=; b=Bhw3P5tjGWsgxZtkYZnc7TieINDrxKRB4txi638W1xKR4tHA+UypxRhcS2jb+oNSU6vRwiK7gbt+h2oFQ3TITaky9IdDg7KuKaPP/IkaJGxStl3nygDtXLnCmXpMw26qkHaFQ21KlDWzac8ZjOsFyWsT2eUQz4VrJZiZ9CXuISI= 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 , Wei Liu , Anthony PERARD , Juergen Gross , Jan Beulich , Andrew Cooper Subject: [PATCH 0/2] x86/cpuid: expose MCDT_NO Date: Fri, 13 May 2022 12:34:58 +0200 Message-Id: <20220513103500.3671-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.36.0 X-ClientProxiedBy: MR2P264CA0143.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:30::35) 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: 193b8be2-7013-4177-db5b-08da34cc4e61 X-MS-TrafficTypeDiagnostic: BN6PR03MB2819:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gZgqJet1bugkEzCQp+pdLoJG9najLDxXrD+7PvGtrRtLq6nhOrndMIjkzMh4DJj3sfetN9UBXhKAQuKn7Jiotbaek93o8M8d2MS0RT+8rznzpf9/pmtZrtuGtmkqUKnSEEvs742e5Ezt7oxWdmQmIGjogJyqt0LElSF8SZTXliG7pBdxXlqFR+R04zilfGChAroD3xH7xnQcKIoYe1QlmXqNMDQVkm/clb1caEA/SizEYRvAtow42xNieBNFDmHU2q98cKSHyhF7GVt2UZgp2qjNc6X1eiefgoxJAejkLYsY97z5VSoLZIVg8GhD3LavqTRoHDj7WrCa9RoBuHFUgOkqF1Ek751zSJTN79QOhi/bB2sr/t8ySH86pWyS3QFAZRnKUuon4wRJxbn0G1KRBKtyMFz8I3f4O4m5GRugTD6vHuYXt/C7j0FLrBEnlCo3/ZtGOt2v99T4SOnpAGVqOvwB0gj7SbJj9Qn5e5LGf4/bt3pJVa5hWZNPOtk29UA2kDONYvyy5eRkR48oq3XWEOo8goJ95USb0toV0PAbEmc34zFNrQYgwSqks/o3jQgTQT9i/RfHfG2cfoSLUuQ2mi5h45JXs/SRiEL/dgycuxpJANptrFutTU3jkx4PQcS+f3wOJFT/8fLEzA/RO8P27Vsxmwi1xOyxasRoVUl/SY2gZ2Fl/VFDdpPMz33Ple/qiDxECMxJPh9ysZYT8na6iH4yr9JTpkYxDup4d0dA1l0= 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:(13230001)(4636009)(366004)(26005)(5660300002)(1076003)(186003)(107886003)(316002)(6512007)(66476007)(54906003)(82960400001)(4744005)(2616005)(6506007)(38100700002)(86362001)(66946007)(66556008)(6486002)(4326008)(6666004)(966005)(8676002)(36756003)(8936002)(508600001)(2906002)(83380400001)(6916009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ssilwzWjRXDoA+axhw1qRGXf/G86?= =?utf-8?q?IxkY/2jZ/zBg2XCFdAz8gqoIcCKB1po+CGeUbO/qE/TtPR+5iMPEjwf+yIkItMOu4?= =?utf-8?q?8BAZ+pe4dnVEN1+AsUT5/ZCgQk5MryADNlbHYG5LEf94gj+PDXlc9gjy0H1Owdqpt?= =?utf-8?q?8B9qXA5XBeHOkGrjFQFXWPfZ//X1Vjq26vn4wRjFE97ur4OyVPI12ESB3C2/4Yk9o?= =?utf-8?q?a3JCF1PfgIqfj+7b4fLt/0yr+Okd1yOfWShit9W81ffOH+2yHyrm9yk7H2iTaPWTD?= =?utf-8?q?FW+NbPfm8uT9iWprPQ7EFfPi1x6KPoqiRwhA0KnHVP18+IYpiQGoJ67tdM7Qrv9TB?= =?utf-8?q?Rv5am045uBThtc5EXY3PtHLyurhFNUZUZ4cfmGd8W9SS6JURvMkm/GXI/xH0KnPlP?= =?utf-8?q?fYMDvhGxAb11U+p/gdHCF+a1+z/bH75BWMXyHxj7+ogcxOzLG9hWvMYo5juytwnD6?= =?utf-8?q?UyRQ+2YWkPSypWX5OVjYRA7f0V9t7YUvUd7lFrGqbMLJwEk16DsOGv0P3yN6mL0kO?= =?utf-8?q?4cccaFkqdeGCeHn8mBHdQkI9vN3wmUBRx30N+dvpaPhf1b0JFb3gg5vQYw6GbLr9W?= =?utf-8?q?YcdvwaqQxayncB4rHUaKQ0G6R8lcXCnsCqGYODkeDOER/UH1C2y/ZZ7F6XxNb22Y7?= =?utf-8?q?NEDeow9ARg6Fi8mk8qQCN+seth4GjWuBO8hrKcQos9jpnNq1BdbXm+DQmEnnDnO9l?= =?utf-8?q?yENgMa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hrKA6lA3m/9td2W5e4zVBcIOSCUchjz9aD5Wr923ESoG8T2vFcC/lgMiYIB5WA?= =?utf-8?q?5/nnRaKwXdLkjdnEmv1naNU/xGx8MIXA=3D=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 193b8be2-7013-4177-db5b-08da34cc4e61 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2022 10:35:32.0136 (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: EAyssV9jbbiEJFcarWZypKSGeBlSnyQkZb07O5hLP4K44AnKI2dyAH//qsnLloRVTT3TZurLoIUvVp7D9R4Tog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2819 Hello, First patch is about exposing MCDT_NO when announced by the hardware. Second patch adds detection in Xen to expose the bit if the family/model/stepping doesn't expose MCDT behavior. Document about the feature can be found at: https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/best-practices/data-operand-independent-timing-isa-guidance.html Thanks, Roger. Roger Pau Monne (2): x86/cpuid: expose MCDT_NO to guests x86/cpuid: set MCDT_NO for non-affected models tools/libs/light/libxl_cpuid.c | 1 + tools/misc/xen-cpuid.c | 1 + xen/arch/x86/cpu/intel.c | 70 +++++++++++++++++++++ xen/arch/x86/cpuid.c | 10 +++ xen/include/public/arch-x86/cpufeatureset.h | 1 + 5 files changed, 83 insertions(+)