Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1728016iog; Thu, 16 Jun 2022 12:29:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1seSwXkoDOAd/yqzilljlggB43DkxQoprFwxliJa8fE7QsyJBUvEsTXs60R4Y7ufU1bc3om X-Received: by 2002:a05:6402:b03:b0:42d:ce84:387a with SMTP id bm3-20020a0564020b0300b0042dce84387amr8412490edb.3.1655407759478; Thu, 16 Jun 2022 12:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655407759; cv=none; d=google.com; s=arc-20160816; b=Yv3m8ff2ms/mA47B01DwXUShoVylndiN0cUaOat+/wN5yngx/HKwumnF7o1qJMn47s x8CBxmqp+pKWxbAp1IDA1150xFRTA/MzXMnBFcNeLAIQwYtMEHoDbFgHHu11NvfgXaHm xvZFRPM8NoGMJOEcEhVDl3qKc1Se3hQ2jZWHn6xFu7lb0DBO1uaagftHs3mC1xmIlkeU 7C2/KWjmYyvgShWM6HaD5JCsPVvnROFh+jw1SPaDaEwP4duz/6xoxt+xUBVMwBmu0a69 k6r8bfT17+MRRuzolK3qOQ6MNPvxL3eDBFQQrxh7tpRxbIatGYndmmNro4fMSpVYXp6v sbLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:cc:to:subject:message-id :from:content-transfer-encoding:date:dkim-signature:mime-version; bh=Vyq1QaJNcPGeZXUPChWIIfLLby0vd/A5lJq5m22MfDI=; b=neJiV+4CY9z018ibBEyKOxkSypGoSbvJdZb7Un3yiOzSHGmtIG3UWyGYs1abmwE9Jg K7xSlHqODmHdKQCfd6xTWunPSZmTL3N2DRtC8WKbayxUKHIsv+K7SEcCeW4FV2cIba7+ lvLfnMrRHru53oSw5kqlUPEIUtPWKF0+2olMp1ThM8cM9yG43mb6j8YcFVat9c/DZzou 6cRIDf6Wc2bGnqhEuvSNwtEOL9nLommZfrWZ28UUrV6cfsI0fqqQr/aJgGSwI03dud76 lrtFpVmLixC9Jx3PztNT/RX3UqjWOTJEA4YfFO3/Bx8av/u79N9XHd9PzKa/svQFJj3V qlKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=F77myjhP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt13-20020a170907728d00b006fee28c47a7si2661017ejc.9.2022.06.16.12.28.50; Thu, 16 Jun 2022 12:29:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=F77myjhP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377715AbiFPSo6 (ORCPT + 99 others); Thu, 16 Jun 2022 14:44:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbiFPSo6 (ORCPT ); Thu, 16 Jun 2022 14:44:58 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1AFA2C132; Thu, 16 Jun 2022 11:44:56 -0700 (PDT) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1655405094; 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=Vyq1QaJNcPGeZXUPChWIIfLLby0vd/A5lJq5m22MfDI=; b=F77myjhPBWu0h7ouFKKj0XC9PilN0M7a9ouW2YaFoSXdgN8CVJ+CDau2RV6XCwtnnBluRB ayIgk0cX5PRFYRmiToLFeK4mXWHDK2B5vHwt7UBftBK/BrEqJCGKICgjanti1ZbxByX7Lp ULHroYgZFgfrGwnb1buKFIR5ktUxAfo= Date: Thu, 16 Jun 2022 18:44:53 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: oliver.upton@linux.dev Message-ID: <7b1040c48bc9b2986798322c336660ab@linux.dev> Subject: Re: [PATCH] selftests: KVM: Handle compiler optimizations in ucall To: "David Laight" Cc: "Raghavendra Rao Ananta" , "Marc Zyngier" , "James Morse" , "Alexandru Elisei" , "Suzuki K Poulose" , "Paolo Bonzini" , "Catalin Marinas" , "Will Deacon" , "Peter Shier" , "Ricardo Koller" , "Oliver Upton" , "Reiji Watanabe" , "Jing Zhang" , "Colton Lewis" , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, "Andrew Jones" In-Reply-To: <3e73cb07968d4c92b797781b037c2d45@AcuMS.aculab.com> References: <3e73cb07968d4c92b797781b037c2d45@AcuMS.aculab.com> <20220615185706.1099208-1-rananta@google.com> <20220616120232.ctkekviusrozqpru@gator> <33ca91aeb5254831a88e187ff8d9a2c2@AcuMS.aculab.com> <20220616162557.55bopzfa6glusuh5@gator> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org June 16, 2022 11:48 AM, "David Laight" wrote:= =0A> No wonder I was confused.=0A> It's not surprising the compiler optim= ises it all away.=0A> =0A> It doesn't seem right to be 'abusing' WRITE_ON= CE() here.=0A> Just adding barrier() should be enough and much more descr= iptive.=0A=0AI had the same thought, although I do not believe barrier() = is sufficient=0Aon its own. barrier_data() with a pointer to uc passed th= rough=0Ais required to keep clang from eliminating the dead store.=0A=0A-= -=0AThanks,=0AOliver