Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1619591rdb; Sat, 10 Feb 2024 09:22:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdRDMWY7KwfDavA9pZxgrJC7IN+BWWvsKikFscB2fweKiAFViD4q+Ko9Hy4iP7hkYfqFuw X-Received: by 2002:a0c:aada:0:b0:68c:cb57:72ba with SMTP id g26-20020a0caada000000b0068ccb5772bamr2882100qvb.29.1707585739190; Sat, 10 Feb 2024 09:22:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVptOdhIcNXy5dsmA/rl1lqgySCWBTsxjL/XdZAw9VnZElZMaQ2oLFSFwq/A8Hk39kSfdMASBanJQTFfHoHUB0AwDRv0kvxMnJT3F2ahA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jz14-20020a0562140e6e00b0068cab7f4d3bsi4530114qvb.181.2024.02.10.09.22.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 09:22:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60495-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-60495-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60495-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EC8BB1C211AF for ; Sat, 10 Feb 2024 17:22:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0B955CDEE; Sat, 10 Feb 2024 17:22:12 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 674045BAF7 for ; Sat, 10 Feb 2024 17:22:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.85.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707585732; cv=none; b=lx2TSGJ5EcGrZi8MFQC4JSHhybgRpZl5cHZj2KdRZJOZ7zr6q7JeZ4LXjMkZbFEdjI1ZbS7vaYtlGhkFZ6g/GvNXu18jwv6jBOW1GhVDNCogWNBYzI1UW85SIcDEQenXk2TUGpNb8nhDt+0dK21bDKz4i+ZjnjmqFDmt7lT81yI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707585732; c=relaxed/simple; bh=rbqMNhAMKFifaFYV+ZaFMyKtvq2I6Yd+9RUVEQM8R/E=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=XCTpmBi5+/5lvJnsJIujXC0+AhXj2XckuHYsSbspo0YToGtuLDaMy+9g1+9mMgYI1WtYNrZCSRu7Q6kAdQpZdj1VOo5SlbArBmjqKxr4BC6dXQZA92uSTDGc3Se2Je7fsTEy7dmXgW/47dio/dSZZD52IhyqWvuZ18d87ocIw6c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.85.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-232-dhyRpcqeMt6KzxuBy0ecIw-1; Sat, 10 Feb 2024 17:22:06 +0000 X-MC-Unique: dhyRpcqeMt6KzxuBy0ecIw-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 10 Feb 2024 17:21:45 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sat, 10 Feb 2024 17:21:45 +0000 From: David Laight To: 'Sean Christopherson' , Linus Torvalds CC: Nick Desaulniers , Uros Bizjak , Jakub Jelinek , "Andrew Pinski (QUIC)" , "linux-kernel@vger.kernel.org" , Masahiro Yamada , "Peter Zijlstra" , "kvm@vger.kernel.org" Subject: RE: [PATCH] Kconfig: Explicitly disable asm goto w/ outputs on gcc-11 (and earlier) Thread-Topic: [PATCH] Kconfig: Explicitly disable asm goto w/ outputs on gcc-11 (and earlier) Thread-Index: AQHaW6GAqckjYnd4VEGhBeXgBOKGT7ED0v0Q Date: Sat, 10 Feb 2024 17:21:45 +0000 Message-ID: <9ba89b70e48143a69f76f6e0f276f149@AcuMS.aculab.com> References: <20240208220604.140859-1-seanjc@google.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Sean Christopherson > Sent: 09 February 2024 21:47 >=20 > On Fri, Feb 09, 2024, Linus Torvalds wrote: > > Sean? Does this work for the case you noticed? >=20 > Yep. You can quite literally see the effect of the asm(""). A "good" se= quence > directly propagates the result from the VMREAD's destination register to = its > final destination >=20 > <+1756>: mov $0x280e,%r13d > <+1762>: vmread %r13,%r13 > <+1766>: jbe 0x209fa > <+1768>: mov %r13,0xe8(%rbx) >=20 > whereas the "bad" sequence bounces through a different register. >=20 > <+1780>: mov $0x2810,%eax > <+1785>: vmread %rax,%rax > <+1788>: jbe 0x209e4 > <+1790>: mov %rax,%r12 > <+1793>: mov %r12,0xf0(%rbx) .. Annoying, but I doubt it is measurable in this case. Firstly it could easily be a 'free' register rename. Secondly isn't vmread horribly slow anyway, so an extra clock or two won't matter? The double register move that OPTIMER_HIDE_VAR() often generates is another matter entirely :-) In the old days the peephole optimiser would (should?) have removed most of these. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)