From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyqGd-0004zS-Gf for qemu-devel@nongnu.org; Tue, 17 Nov 2015 19:06:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyqGa-0006zq-Am for qemu-devel@nongnu.org; Tue, 17 Nov 2015 19:06:31 -0500 Message-ID: <1447805175.3729.51.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Wed, 18 Nov 2015 11:06:15 +1100 In-Reply-To: <1447669296.3081.96.camel@kernel.crashing.org> References: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> <1447201710-10229-14-git-send-email-benh@kernel.crashing.org> <20151116053405.GH2747@voom.fritz.box> <1447669296.3081.96.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 13/77] ppc: tlbie, tlbia and tlbisync are HV only List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Mon, 2015-11-16 at 21:21 +1100, Benjamin Herrenschmidt wrote: > > Ah you are right. I do have second thoughts about that previous patch > now that you mention it however. In the real MSR, HV and PR are > independant, I wonder if I'm better off making the check explicit... > > The reason I did it this way is that afaik, there is no such thing > as a usermode hypervisor resource in the architecture, so any > hypervisor resource is also a supervisor mode one, but having > ctx->hv be 0 when MSR:HV=1 + MSR:PR=1 might make it easy to write > incorrect code in other places when deciding for example how to > direct > interrupts. > > I'll need to think a bit more about this one. So I took out that bit in the previous patch, since we already seem to check ctx.pr explicitly in most places anyway. There was one where we didn't which I fixed (in the SMT ops). Cheers, Ben.