Received: by 10.192.165.148 with SMTP id m20csp4869259imm; Tue, 1 May 2018 05:25:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp/rciY7e0rMdjeR3gYLRjZc9kvSfwafDCwYOx/gZASkc4WT2lqlP24Y210HafVwRNP8Gs5 X-Received: by 2002:a65:66c6:: with SMTP id c6-v6mr12794409pgw.127.1525177548474; Tue, 01 May 2018 05:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525177548; cv=none; d=google.com; s=arc-20160816; b=1EcrLt2JlfTYMWLngYcFcjh+vcql9O/bWN3E/b2yQbx6sIEPGD9CFviEmNvn83zzDf Yk66tQuT3a1lna+ovOGVzdVVq0SLObVOt+lIuWuRBb0Kr7ac4a3Sx8FaOuP8ohQ8DopK iBORC9fThMY6YKiI0MZn0Jthox2X+Zq4Pe0YuYptQsLx0lLFhml/cpLiF8idQfWdoQZJ AsFppPhieOuKAh5LABQXsaQYiALkNAyQkWNJeMYrnl8CSCHpR3lzQsWNWi5+2FoWfaUH i+1dJawaNoJ85pbMpYeK2vTXsBljQcr7Al50XFW6gyXWBtuMiX59qVa3GO0/Ut4bz8xv ex+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=BXzVKjIlYDxmEoB1BJ/nP7dlSpo3b8eNXZfjHzGU28Y=; b=VKAuw8JcYDGAx3Y8g/pEK4KSDnjVNTM4xq1EdALw6FKxe0YG5X1MazCZFgoxZWR6EX G2FaLkaZZFzArUtcTViWdT3/+DdChb7/G4OZuxY05TIyI4Srw3Fj6tPhczqRTVkX5adz Se50qYBLDK6j7VV+ET90+YU4W3UgVD0Q4+LBvTX+w+0ay6dQoUEAxk5a8WN4TDj+Oul4 Db2ZY+E23rhmoM8EFxsBFAuS6y6iFMdtAL0bYIQtgqXBJ2T4Rh2c7Hjd0WTmWLCT/wzS m9mjrtQkX4xIgvCpiizUJhcNSHhn5ELKpUtjjTZdi6Gbp43LneIlU4iuYXGv5K0Yhkxk meoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c196-v6si7925314pga.494.2018.05.01.05.25.34; Tue, 01 May 2018 05:25:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755259AbeEAMZW convert rfc822-to-8bit (ORCPT + 99 others); Tue, 1 May 2018 08:25:22 -0400 Received: from ozlabs.org ([203.11.71.1]:42103 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755068AbeEAMZV (ORCPT ); Tue, 1 May 2018 08:25:21 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40b0ww0vv6z9s2k; Tue, 1 May 2018 22:25:20 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Michal =?utf-8?Q?Such=C3=A1nek?= Cc: linuxppc-dev@ozlabs.org, npiggin@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6] powerpc/64s: Add support for ori barrier_nospec patching In-Reply-To: <20180426181042.38971664@kitsune.suse.cz> References: <20180424041559.32410-1-mpe@ellerman.id.au> <20180424041559.32410-2-mpe@ellerman.id.au> <20180426181042.38971664@kitsune.suse.cz> Date: Tue, 01 May 2018 22:25:14 +1000 Message-ID: <87sh7br2ad.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Suchánek writes: > On Tue, 24 Apr 2018 14:15:55 +1000 > Michael Ellerman wrote: > >> From: Michal Suchanek >> >> Based on the RFI patching. This is required to be able to disable the >> speculation barrier. > > why do you not patch the nospec barrier which is included as part of > the RFI flush code? We didn't want to put it in the asm like you had, because not all RFI flush types need the spec barrier. So it's more complicated than just patching in the spec barrier, we'd need to only patch it in if the configured RFI flush also needed it. > I think when debugging the code it would make more sense if RFI is > patched by RFI patcher and nospec by nospec patcher. True. I think what I'm saying is that the spec barrier in the RFI flush is not a nospec barrier, it's part of that RFI flush type. > A separate question is if the RFI flush would break without the nospec > barrier. The ORI flush requires it, but the others don't. cheers