From patchwork Wed Feb 23 10:12:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 12756641 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 4876EC433F5 for ; Wed, 23 Feb 2022 10:12:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.277261.473696 (Exim 4.92) (envelope-from ) id 1nModR-0005bS-GO; Wed, 23 Feb 2022 10:12:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 277261.473696; Wed, 23 Feb 2022 10:12:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nModR-0005bL-DK; Wed, 23 Feb 2022 10:12:37 +0000 Received: by outflank-mailman (input) for mailman id 277261; Wed, 23 Feb 2022 10:12:36 +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 1nModQ-0005b9-6s for xen-devel@lists.xenproject.org; Wed, 23 Feb 2022 10:12:36 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1eb8cc47-9491-11ec-8539-5f4723681683; Wed, 23 Feb 2022 11:12:35 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2051.outbound.protection.outlook.com [104.47.12.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-35-edIydqH7MR2OtKPIzJmdsg-1; Wed, 23 Feb 2022 11:12:33 +0100 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by HE1PR04MB3004.eurprd04.prod.outlook.com (2603:10a6:7:1f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Wed, 23 Feb 2022 10:12:32 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::d479:b728:345c:bd65%6]) with mapi id 15.20.5017.022; Wed, 23 Feb 2022 10:12: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: 1eb8cc47-9491-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1645611154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LI5XIykVTVe8uWmfaLRy4nPxEkgSqXOP7UAzhSepRo8=; b=bv1yK9+Ekcbop+xlAZ63wz3H3kdBRWjYJlKb88NCJS1gdGJvZDTwBPusYRH3/GsbyN+Gbi tEqJNjp+4wu0HEwuqS5W5tbvHxoEZVRs0UF6f1hZI80vQJ0Z3syNDMnTUlNepa/XYYjFNX TSmUgB+mOZ7IIrazcFI4Tx/hbh3HlN4= X-MC-Unique: edIydqH7MR2OtKPIzJmdsg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I8cJ3SunquUDnonYw6Ockk+aAATSSc52wp8pvvENqGSgjOVd73W0ccfD2SdVpEEZXJ+IQW10oscfLJmMK41kiFVxbQa+im+x7iLjHjUd2izuQ6O9Kjc5Tyk25MGf9JEElKFJAsg/xj0j4EHuOJ8XGNs+2mzKIJeztzdGYCoRWKn0jRJDql+8nZbdEnjteGnFGwIIcltlwkGj/RfGG0RZJRkbU1ofCJ6XRBSDdYLVf6v9MsTmz6yR6ZF51sBWzuVx/Joz3Dgs0k/OQbaLgKqgtJ+9zLDk2gKxR64Ha0RopRAe9da+kU+28ebcb9vWB4JtKIXTiadZATVoQKwZR6efIA== 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=LI5XIykVTVe8uWmfaLRy4nPxEkgSqXOP7UAzhSepRo8=; b=MQfWo27d7mIgjjnQGS7Z25Qy6FxRjutcbfQLnL2d2TcexSI0PjmJ6mXhirglBBrd68rDlpCoL8Kv9rpZFeDv0gnNhMk3FHN7hGCRxL+ZZ8UhtxqPDf84wigBf5/fJDIjS0gim8i1KQxe7sxAgWzgK6MY6uw3vqAeDlx32qnwvaWc4JxODpo+tRrNmdJG5eX4yPi06p6MaiciIfPneNSlQWy5mv/lma7jaxBxpe8kADGSp1FpZ6F6ub3HLJC2FskxXIcLCgYFVpQKe0r0qEWchFZrktD6vbuJtYvOUdCaB8xNOygSW50JIC85qByucb4yIl0fYQ3D4kmq3q2aMILLFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <96f493ee-a360-ce46-7a61-5f55ca436295@suse.com> Date: Wed, 23 Feb 2022 11:12:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: [PATCH 1/3] x86: drop NOP_DS_PREFIX Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= References: <91935ffd-a270-f1a1-28f1-645fa4167fcd@suse.com> In-Reply-To: <91935ffd-a270-f1a1-28f1-645fa4167fcd@suse.com> X-ClientProxiedBy: AM6P195CA0002.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:81::15) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dfe5c7f8-e711-4ede-e782-08d9f6b5011a X-MS-TrafficTypeDiagnostic: HE1PR04MB3004: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: nJ+6sQlvvNzyDeK2OqB4mBbs6UNNm/RXXDSt1Xwe5XOZ9biLHxAxkUy1Uv/02mevbUaE4AJjnr/s9U3iNM7/JBvOIL8FwTfAXDiyebn6ef7JXVQBsuG0vd/+rMnICktG4GrlQBxTfIPJ6XGyoeWCLVK4c5chvLYENKnUHQROESaTNbQS4xUS5HCCK0FwbbuQbbv05cNXDMJEo7pNMBG6eiFRC2ECq79Bx+XLeTzcOLLjxH6pVtCPlNYBgQKt29soQo6ej2Wkgm2OuZleZ9nPybCtrY1av7m8C4ehLR169d1myCLwgXbARgeHqWov+cGn3ZkWKvt935AgHvSa95qsbkDlM5uvNUd792pqn1WlGKiZ/o/5vK2i+8xFTT2RxtcwAFBauv6QgTkoCqzMBST0F6+Vf97Y6ZuqkpLjI3BERvkU4Et4HodIeytgy2jEmbt9GiAFIm3M0BdxJkEbE2/Ym6AYRkMxEA7ri+zZP7jd3Hl9l0/ZRPjf2G0Q0HPY6+0zv/q4CpZZJiN3K0NM4NwSzmGtsajLMcH7hoxHfkYsvKoNiynx9vz78hhuTGor7ypMwoZdo1r6A6tnin5DG/LklcOVgG505ntQ3cp06AKwCvvZkZ4ot1+YQziEnXSBkaYw661uEgDczJuQf5AnxX6GB6rhJiI1yG81xME7M5iJytv97xgElOSqORaQoX5kfIv7zbmKsgRqiwWbM2eqHxJXo5OEXNWLM6WKNS0IEWujGR1/xIHdNDivuHXoE4BQpUia X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(8936002)(54906003)(8676002)(6916009)(508600001)(38100700002)(2906002)(2616005)(86362001)(5660300002)(186003)(26005)(31696002)(4326008)(66476007)(66556008)(66946007)(6512007)(6506007)(6666004)(31686004)(6486002)(36756003)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DVeVLiglGyzkyZ6oeRLdFlcLAXoc?= =?utf-8?q?/GB06z9Aihm8Hz6CRCaWaUvl0dihgK0zcDKhWVux/oFFH0xIwbd0RukFxo8R3DEYn?= =?utf-8?q?XpVmCEVkl283WmI75POWZto6LTb1X0CVTKZJshXpoAMI2yIy0szONmu4cB5rF8NoA?= =?utf-8?q?BKGzoRwE6x/MaQKioCjmHKFXbpFqoBOoLH7gNhcoHMW0C+fP5d2zZTvtCgGKVxSip?= =?utf-8?q?LCrKKtijTDpWwyk0J/g9xUV9S3Hd9Dufv1oRi/6jRrcTuC9/kKQgyqhx51/k0HSew?= =?utf-8?q?x84msfe4ewDzONFHMZz2+9D3x9cJOH1bek7cjO/Nfc31QDsnIT8EeFKLFPmIOW0Aq?= =?utf-8?q?OLUP63ojP+2yw+1pQ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c0yfPcROCD7viCTrAwVUBv8DgF8y45fgj3pG1G+JEStly?= =?utf-8?q?CSyuEGGyeFOrM/+KJdqnM0puqCZtFYRLkLnzG9inEpiHR4M1h5Xnbqrypv12Hvzpj?= =?utf-8?q?6+Ht8gnYhay0ukz4yTv4SScZC7zuZqJ5X9TA5jLByMIpqIkbUKwO6xV11lPgyC3Qw?= =?utf-8?q?3V5zFxWaVG9jU33pVsvLAOyEJQmfF1wq/ikAAR0hWrfpu6LMnVKPrioxN61VA/vrX?= =?utf-8?q?kWUtZ5tbxiLB5zD/BEu7n3EVkLjbrlEHYoEpTFp3tCd4zVOPLRpzGckYTh1f4xlKS?= =?utf-8?q?3Z307gbqjNBCNbxnnrDsgkSj28rw4BN+1ULUuIrNqVJt+X+I6d8yyDk=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfe5c7f8-e711-4ede-e782-08d9f6b5011a X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2022 10:12:31.9720 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4hi36XRmL0zsmTTDijtBhNBLeIhmg+9KlJ7pPxnBqnMro7Z4pp0dKWd4ijLCMcrcgvX3LGEgMTlQ+UlixTv7Fg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB3004 This wasn't really necessary to introduce: The binutils change permitting use of standalone "ds" (and "cs") in 64-bit code predates the minimum binutils version we support. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- In fact we could patch _just_ the opcode prefix in flush_area_local(). --- a/xen/arch/x86/flushtlb.c +++ b/xen/arch/x86/flushtlb.c @@ -247,8 +247,7 @@ unsigned int flush_area_local(const void { alternative("", "sfence", X86_FEATURE_CLFLUSHOPT); for ( i = 0; i < sz; i += c->x86_clflush_size ) - alternative_input(".byte " __stringify(NOP_DS_PREFIX) ";" - " clflush %0", + alternative_input("ds; clflush %0", "data16 clflush %0", /* clflushopt */ X86_FEATURE_CLFLUSHOPT, "m" (((const char *)va)[i])); @@ -298,11 +297,11 @@ void cache_writeback(const void *addr, u # define INPUT(addr) "a" (addr), BASE_INPUT(addr) #endif /* - * Note regarding the use of NOP_DS_PREFIX: it's faster to do a clflush + * Note regarding the "ds" prefix use: it's faster to do a clflush * + prefix than a clflush + nop, and hence the prefix is added instead * of letting the alternative framework fill the gap by appending nops. */ - alternative_io_2(".byte " __stringify(NOP_DS_PREFIX) "; clflush %[p]", + alternative_io_2("ds; clflush %[p]", "data16 clflush %[p]", /* clflushopt */ X86_FEATURE_CLFLUSHOPT, CLWB_ENCODING, --- a/xen/arch/x86/include/asm/nops.h +++ b/xen/arch/x86/include/asm/nops.h @@ -5,8 +5,6 @@ * Define nops for use with alternative(). */ -#define NOP_DS_PREFIX 0x3e - /* * Opteron 64bit nops * 1: nop