Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1014078ybg; Mon, 27 Jul 2020 05:51:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdohiEFowUtW+7I0zyJ0J1hnffXctS4jSc6+JQQkV9DTNAJZVKQNjGmsSRJbCRGM6DOm7F X-Received: by 2002:a05:6402:3102:: with SMTP id dc2mr898410edb.152.1595854264707; Mon, 27 Jul 2020 05:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595854264; cv=none; d=google.com; s=arc-20160816; b=PvDF5RWPiqlghoqFFK2G169ySbHCIZp+N53OTt8ZYn3QABVAl7bodVxBke6BhyVfbn TiqzG3Qj5JZf0yRMCNHqma38/HPwu60hVwK76cReEz3Wv3LFmq56FEZeljxv3htPqC9o yNT8lSl69frmwClEICLl8aWUapxJzPozq8m/ufN0GSF53IRmt5ARH4qmvIwZBIl7gtrd RpxnJU6cdiSfm4/ghZyXyGefxe5b+weSKDsanyFyqDEsdjNGWM/4HnfuiQu+dXjkboZC 7OFw/pW/yHlDVGI5g7z8HHv5iFxtb/mnLpxANo4sxjeZHCLc7hH5UtMLvU6ox3uDUxRE laNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature:dkim-filter; bh=vqJmEWTLIAFzkX9WqOPjctwd6uSnDgeS6aq26YK3uHw=; b=B9PrrjNjCxAti6klp4O6Kfm61epUdMtJ9pyaJ7N8DBaGUXW+tOq056ql7dQGmYlTxC +py+9XZBM8S5PzKWIcNz3ECffow/e80Q4bc05VHRuMFrWKyc9F/eygLkWH37q4/TBcWb VOhr3mpD6CnrmIh3YP1+pgrh4o5ToVswqfJVAdkCYxuQXLFVG3olItxXjx/JjdRhIrL2 zx3B03NCTM+k6dIdKwS8/ncWiKMS6MVz73i9L696+LsgxuRl4cum4OOzYQCadBXkY4aP JIs7vys/CUx01CAmYZuT4ZYZ46b2oRXlVdzfFJuCsFqR2IHuHCE7ESgrdLNsQJXcoFfB SBEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@zytor.com header.s=2020072401 header.b=DHZId3Pf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si5385640eds.407.2020.07.27.05.50.42; Mon, 27 Jul 2020 05:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@zytor.com header.s=2020072401 header.b=DHZId3Pf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728514AbgG0Mto (ORCPT + 99 others); Mon, 27 Jul 2020 08:49:44 -0400 Received: from terminus.zytor.com ([198.137.202.136]:44583 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728128AbgG0Mtn (ORCPT ); Mon, 27 Jul 2020 08:49:43 -0400 Received: from [IPv6:2601:646:8600:3281:d01e:b6c6:1a24:9007] ([IPv6:2601:646:8600:3281:d01e:b6c6:1a24:9007]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id 06RCnamc2000926 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 27 Jul 2020 05:49:36 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 06RCnamc2000926 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2020072401; t=1595854177; bh=vqJmEWTLIAFzkX9WqOPjctwd6uSnDgeS6aq26YK3uHw=; h=Date:In-Reply-To:References:Subject:To:CC:From:From; b=DHZId3PfHW7adFBQlkx07EAPJj0i99u0/lZgeMGbEOQOLOY2y3eUG24zclNKQ49N6 U6Q9We1ne+4bqiyKC2QCK4Cd9dOiiJJCaOYK6vZYns/h494qbqiN/VPuk/4dkGRMUe riQwxOMPJR4A9Ch/aQTRIvQ3IpZwdNLjp3+7X+tUF8Ehve92rkIxiorzOTnaArikqw MpDE0clQIJMsU9nZXXCJyGr6VeEzkG86jubXjeOpNgov1KxfyMah/qcGOn50CNUA7S J/Aq0iiNVowx68QPx+9eqQIpBH4/VbHKyeMaQFs/Kq8YTYpwFvaGlXvrI07p49GWt6 bLYufSNj/qGnQ== Date: Mon, 27 Jul 2020 05:49:28 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20200727083619.GF119549@hirez.programming.kicks-ass.net> References: <20200727043132.15082-1-ricardo.neri-calderon@linux.intel.com> <20200727043132.15082-5-ricardo.neri-calderon@linux.intel.com> <20200727083619.GF119549@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 4/4] x86/cpu: Use SERIALIZE in sync_core() when available To: peterz@infradead.org CC: Ricardo Neri , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , x86@kernel.org, Dave Hansen , Tony Luck , Cathy Zhang , Fenghua Yu , Kyung Min Park , "Ravi V. Shankar" , Sean Christopherson , linux-kernel@vger.kernel.org, Ricardo Neri , Dave Hansen , linux-edac@vger.kernel.org From: hpa@zytor.com Message-ID: <49251CFA-8AC3-462D-A60F-0337593BE9CD@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On July 27, 2020 1:36:19 AM PDT, peterz@infradead=2Eorg wrote: >On Sun, Jul 26, 2020 at 10:55:15PM -0700, hpa@zytor=2Ecom wrote: >> For a really overenginered solution, but which might perform >> unnecessary poorly on existing hardware: >>=20 >> asm volatile("1: =2Ebyte 0xf, 0x1, 0xe8; 2:" >> _ASM_EXTABLE(1b,2b)); > >Ha! cute, you take an #UD ? > >We could optimize the #UD exception handler for this I suppose, but >that >makes it an even worse hack=2E The simple alternative() seems like a much >simpler approach=2E If this is in any way performance critical, then no :) Taking the #UD has = the cute property that we end up IRET on the way back, so we don't even nee= d a fix-up path=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E