[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKTCnzkUQRVGrJyWwQM-SQGTxENzoYVPWLMWBUruKpb8t5Jnkg@mail.gmail.com>
Date: Fri, 14 Jul 2017 07:30:46 +1000
From: Balbir Singh <bsingharora@...il.com>
To: Ram Pai <linuxram@...ibm.com>
Cc: "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)"
<linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
linux-kselftest@...r.kernel.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
Aneesh Kumar KV <aneesh.kumar@...ux.vnet.ibm.com>,
Dave Hansen <dave.hansen@...el.com>,
"Haren Myneni/Beaverton/IBM" <hbabu@...ibm.com>,
Arnd Bergmann <arnd@...db.de>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [RFC v5 14/38] powerpc: initial plumbing for key management
On Fri, Jul 14, 2017 at 6:37 AM, Ram Pai <linuxram@...ibm.com> wrote:
> On Thu, Jul 13, 2017 at 12:45:00AM -0700, Ram Pai wrote:
>> On Wed, Jul 12, 2017 at 01:28:25PM +1000, Balbir Singh wrote:
>> > On Wed, 5 Jul 2017 14:21:51 -0700
>> > Ram Pai <linuxram@...ibm.com> wrote:
>> >
>> > > Initial plumbing to manage all the keys supported by the
>> > > hardware.
>> > >
>> > > Total 32 keys are supported on powerpc. However pkey 0,1
>> > > and 31 are reserved. So effectively we have 29 pkeys.
>> > >
>> > > This patch keeps track of reserved keys, allocated keys
>> > > and keys that are currently free.
>> >
>> > It looks like this patch will only work in guest mode?
>> > Is that an assumption we've made? What happens if I use
>> > keys when running in hypervisor mode?
>>
>> It works in supervisor mode, as a guest aswell as a bare-metal
>> kernel. Whatever needs to be done in hypervisor mode
>> is already there in power-kvm.
>
> I realize i did not answer your question accurately...
> "What happens if I use keys when running in hypervisor mode?"
>
> Its not clear what happens. As far as I can tell the MMU does
> not check key violation when in hypervisor mode. So effectively
> I think, keys are ineffective when in hypervisor mode.
keys are honored in hypervisor mode. I was just
stating that we need a mechanism used by the hypervisor
to partition the key space between guests and hypervisor.
Balbir Singh
Powered by blists - more mailing lists