From patchwork Fri Apr 26 04:07:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Andryuk X-Patchwork-Id: 13645263 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 84B95C4345F for ; Fri, 26 Apr 2024 18:55:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.713059.1114031 (Exim 4.92) (envelope-from ) id 1s0Qj7-0005Zp-Rp; Fri, 26 Apr 2024 18:55:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 713059.1114031; Fri, 26 Apr 2024 18:55:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s0Qj7-0005Zi-Or; Fri, 26 Apr 2024 18:55:17 +0000 Received: by outflank-mailman (input) for mailman id 713059; Fri, 26 Apr 2024 18:55:17 +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 1s0Qj7-0005Za-3I for xen-devel@lists.xenproject.org; Fri, 26 Apr 2024 18:55:17 +0000 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on20600.outbound.protection.outlook.com [2a01:111:f403:2407::600]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 83c9b805-03fe-11ef-b4bb-af5377834399; Fri, 26 Apr 2024 20:55:15 +0200 (CEST) Received: from BN0PR02CA0013.namprd02.prod.outlook.com (2603:10b6:408:e4::18) by SJ1PR12MB6124.namprd12.prod.outlook.com (2603:10b6:a03:459::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Fri, 26 Apr 2024 18:55:10 +0000 Received: from BN1PEPF00004688.namprd05.prod.outlook.com (2603:10b6:408:e4:cafe::64) by BN0PR02CA0013.outlook.office365.com (2603:10b6:408:e4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.29 via Frontend Transport; Fri, 26 Apr 2024 18:55:09 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by BN1PEPF00004688.mail.protection.outlook.com (10.167.243.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Fri, 26 Apr 2024 18:55:08 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 26 Apr 2024 13:55:08 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 26 Apr 2024 11:55:07 -0700 Received: from fedora.mshome.net (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Fri, 26 Apr 2024 13:55:07 -0500 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: 83c9b805-03fe-11ef-b4bb-af5377834399 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kHtMGRB8L9LtTXkIEP3clluLnXyYPqSqNAzqLR6f1GGfneDC7+yQxaXg6Mh/Iv2BboaBnPO3d9P+7O/woIoC9VAGJbTVPp27fbsVNBt4ISFcml5X3QTSo0d6xYKrUdc/8jZo1DLLbzBXMoMUfbimM4V0jF6Rw4PqNZYf03Z9zGvFomEBVk8tCKIplPNlgiynrTZz0GX0pQ9yWHLdaVj4dYJMwqJeIU1eLpisZ36/2dEKSpBcclvb7f2HyreuGMuQi0WFvjEp63itVV5vGUajVxFMCigvymlPRYT422TQRXnpLUxoPg+drMf9GYOqmWg9nMmIZYBJVZsob7q4req+bQ== 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=+xRYTy8jRKTfWnehr4ShnCN0JVJhIZe/kzc3UMDV5SY=; b=hk8yzOCu2L0v28d3lBgOLdCUrBzf8czor4EsIBZUrSg7P3rWXfKMIabmXERqA94Xwz0vGShMitUaaMyiKrFrY6n/MsCIURtDav4JHBUQtVKJ8co0Fnr/CT9bojsxp82A4DnD1P8FH5Yu8wtv5vpIEkjQQaxjMjwXPOvs6GMu2T4d67DF5BGwv+gM6pCA6+fy9mxo/gIprq9pk0PT19DInZo55y/nkWHwSAwRjPMk4EezglxiSP65IrHGfPkFliyAf6vHVQm6jrWVFa+mLOTu8fWEA2zbEElhf0P9FJeBVqCqExv5AYGERCIHnZaTc7va6c3q/KygPce7x+nZORM5eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+xRYTy8jRKTfWnehr4ShnCN0JVJhIZe/kzc3UMDV5SY=; b=mLjyGUMn5DfgccrDRuWpJIUulhczruF3Nlo1N9QYZXWZqnbp3SfmzVsOPIXFy4bPLYOXHqjSTWE71G0IFF0vBMfGRhfn/yckry4qtWib7Z3GoB38Uvu24zl4lzXAooPM+VgRiJ7VBlqUxpXWWPDeGTR1KYl454hfq1gZ3E9K40o= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Jason Andryuk To: CC: Jason Andryuk , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH] xen/x86: Fix Syntax warning in gen-cpuid.py Date: Fri, 26 Apr 2024 00:07:16 -0400 Message-ID: <20240426040716.52126-1-jason.andryuk@amd.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004688:EE_|SJ1PR12MB6124:EE_ X-MS-Office365-Filtering-Correlation-Id: b2e2df2e-3de9-482b-9db3-08dc66226507 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9a+pmTLtN9cWtpAaam26fo9Wn85x1LIXYiD9QMkWy1mpiHpbe9yRDMUAiC4b6fnZ3fFCeLFvYKy39h4H7Yq6jsnG9heV6tKoQ5synMAbjTWI/2k1wbmLmszmi+pCNkg1DGjxQy5An791d1Y5XMTIwGKzq4SkgDMvdECEvQ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yrBTHWYNBiXNn4TdpjtdGO9Mr6YE6dkVi/us8ZjyBgKMkGx0bkKs2W1EOS+JnvOraIxBJEm2SwV0grhTSMxnkL8qOsbNXfX6RI5p/qJ1RQXgnO/+/gBbUgkUwYFWWUOAGyrJ+e2rbxNvPBUsHEmJwbstKQnnez2gjotXenciq5WT+1w9dRN X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(376005)(82310400014)(36860700004)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2024 18:55:08.7811 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2e2df2e-3de9-482b-9db3-08dc66226507 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004688.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6124 Python 3.12.2 warns: xen/tools/gen-cpuid.py:50: SyntaxWarning: invalid escape sequence '\s' "\s+([\s\d]+\*[\s\d]+\+[\s\d]+)\)" xen/tools/gen-cpuid.py:51: SyntaxWarning: invalid escape sequence '\s' "\s+/\*([\w!]*) .*$") Specify the strings as raw strings so '\s' is read as literal '\' + 's'. This avoids escaping all the '\'s in the strings. Signed-off-by: Jason Andryuk Acked-by: Andrew Cooper --- xen/tools/gen-cpuid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py index bf3f9ec01e..dadeb33080 100755 --- a/xen/tools/gen-cpuid.py +++ b/xen/tools/gen-cpuid.py @@ -47,8 +47,8 @@ def parse_definitions(state): """ feat_regex = re.compile( r"^XEN_CPUFEATURE\(([A-Z0-9_]+)," - "\s+([\s\d]+\*[\s\d]+\+[\s\d]+)\)" - "\s+/\*([\w!]*) .*$") + r"\s+([\s\d]+\*[\s\d]+\+[\s\d]+)\)" + r"\s+/\*([\w!]*) .*$") word_regex = re.compile( r"^/\* .* word (\d*) \*/$")