From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wBF464MfRzDq5W for ; Mon, 24 Apr 2017 15:18:30 +1000 (AEST) Received: by mail-it0-x234.google.com with SMTP id 70so44212873ita.0 for ; Sun, 23 Apr 2017 22:18:30 -0700 (PDT) Date: Mon, 24 Apr 2017 15:18:07 +1000 From: Nicholas Piggin To: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Mahesh Salgaonkar Subject: Re: [PATCH] powerpc/powernv: Fix opal entry/exit MSR_RI coverage Message-ID: <20170424151807.7e12b7cb@roar.ozlabs.ibm.com> In-Reply-To: <1493010542.25766.201.camel@kernel.crashing.org> References: <20170330121004.11991-1-npiggin@gmail.com> <1492998468.25766.195.camel@kernel.crashing.org> <20170424145500.7a3cb11b@roar.ozlabs.ibm.com> <1493010542.25766.201.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 24 Apr 2017 15:09:02 +1000 Benjamin Herrenschmidt wrote: > On Mon, 2017-04-24 at 14:55 +1000, Nicholas Piggin wrote: > > On Mon, 24 Apr 2017 11:47:48 +1000 > > > Benjamin Herrenschmidt wrote: > > > > > On Thu, 2017-03-30 at 22:10 +1000, Nicholas Piggin wrote: > > > > There are some windows in opal entry/exit that can not recover from a > > > > re-entrant interrupt (e.g., machine check) due to using SRR registers, > > > > but they currently do not have MSR_RI clear. > > > > > > > > These were found by machine check injection coverage tests using the > > > > powerpc system simulator (Mambo).   > > > > > > So you make us enter/exit OPAL with RI off with your patch. > > > > It should hrfid to opal with MSR_RI set. It seems to be doing the right > > thing when stepping through it with the simulator. > > Ok, it's me mis-reading it... > > I am not fan of changing FIXUP_ENDIAN but I suppose we don't have much > choice. This will slow down OPAL entry/exit further...maybe we should > use HSRR0/1 instead ? That way we don't have to touch RI ... I'll see if I can make that work.