Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp871817ybg; Mon, 27 Jul 2020 01:39:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZJx9P639ttS70YnZTadn5r+K9tog+6xRWhJ7a16y5wc/6nFUKt+vPGOgHPaNgZm6y/kZP X-Received: by 2002:a50:fc8d:: with SMTP id f13mr2846284edq.380.1595839154122; Mon, 27 Jul 2020 01:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595839154; cv=none; d=google.com; s=arc-20160816; b=z/l7zZ0mhvCjt7ylqEI9I9aoYVrfYfJrVRMqTGFxH8hESOk2yvl2Xokt6LvoIC+6jc fDlzuSPvI/YgXjaqK8orOhNBhQsTG8RTcNfLv6rloIS4zIsmbYispiDu/Y1fHZLtWfpO ethjhnZkOY9QX22izP92oMVgLoMgCn5NKGIZ3oAgI7vvVvxFSO/sxva75WtQx3GGU4zW bNUK8szxKlBz3XtpLeVTk6HIDQjlzTBsvUlM7pm09/D4jsnyjT8zqOjm/8NcwXE2szAp 7ucw7CdckbH8nLi1NDqw1Sb2aGhJCPd34CCwuCgIHb6tvKuLUdmFAEdjJjlQ6WpLZGrW 6/iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3jHDYPNEyZSDNf8t0KwCcgaWouvTTdLYFPAan9XpiKk=; b=zmsQ702zdswP6tiknYfwoI2rE4h5CMr9E/3vur2a0urlYKaAmJ5v+q0lxu/Prm88SS ZvbHfHh66SYOkMgcVW5ZwOVXsaAzn+UVBAp3ixjkT/b/YJ8WMflwzsNMoHIjx3GwaEiO clC0JDgUitBg0YH9iEG7iZsuelr2NXJYEB796iERs/NCbGVr1KLHo3ysa0F9zHYpMJgO YXBnPyq075TzbJAnSii6LGo65C5GajGjKZ27A6T2WQ5xZsscdLkonvPTWI2JwSiK8k/P b/R/2DDEk+uloUDO/J5LHFcI/GbsNuu0VZdHiTTUM5K1I30E4TIpfayTrsVfuExW3vPE P1Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=lZUCBhCd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si5042592edy.147.2020.07.27.01.38.52; Mon, 27 Jul 2020 01:39:14 -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=@infradead.org header.s=casper.20170209 header.b=lZUCBhCd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726443AbgG0Igf (ORCPT + 99 others); Mon, 27 Jul 2020 04:36:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbgG0Igf (ORCPT ); Mon, 27 Jul 2020 04:36:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35293C061794; Mon, 27 Jul 2020 01:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3jHDYPNEyZSDNf8t0KwCcgaWouvTTdLYFPAan9XpiKk=; b=lZUCBhCdH3I6A6wocrCmJymCJP Fkb1/ZtOrqdP7f+wjkm51CuCM55nKeuek7tPVOf0F/G86vyUCb4ivpVLrzze+e/Tetrd1q6pxGLX2 KpnoCQ1LBM7CsEWFUeuJIwdKSSvKrYgK94wISM+s1KD2+0VMUJYYPoGQl4+LfWo55RqoBUSYFJp7b Y/tTjW7zFdAuYcWRcGciwN6B8wXRJmshlcvShtzQs3EIk78TxBilCNwFAuBqcfmFYRA9Nv2a84qDF tMYs5w0u9G7sz+yZT7/QRlO9oLJWMWw/gJNi5ZYWL46fBrO5CitPmos/2nnn5oZQQzpNL+EvGeGWi oBy3TJ4w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzycP-0003Lm-5n; Mon, 27 Jul 2020 08:36:22 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 3B81530411F; Mon, 27 Jul 2020 10:36:20 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id F0CB52B73BB17; Mon, 27 Jul 2020 10:36:19 +0200 (CEST) Date: Mon, 27 Jul 2020 10:36:19 +0200 From: peterz@infradead.org To: hpa@zytor.com 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 Subject: Re: [PATCH 4/4] x86/cpu: Use SERIALIZE in sync_core() when available Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 26, 2020 at 10:55:15PM -0700, hpa@zytor.com wrote: > For a really overenginered solution, but which might perform > unnecessary poorly on existing hardware: > > asm volatile("1: .byte 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. The simple alternative() seems like a much simpler approach.