[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a52a8d1058ab6752c3d0402076f831b52c7844d7.camel@intel.com>
Date: Fri, 4 Oct 2019 19:12:39 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"keescook@...omium.org" <keescook@...omium.org>,
"Christopherson, Sean J" <sean.j.christopherson@...el.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"x86@...nel.org" <x86@...nel.org>,
"luto@...nel.org" <luto@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"Hansen, Dave" <dave.hansen@...el.com>
CC: "kristen@...ux.intel.com" <kristen@...ux.intel.com>,
"Dock, Deneen T" <deneen.t.dock@...el.com>
Subject: Re: [RFC PATCH 12/13] mmap: Add XO support for KVM XO
On Fri, 2019-10-04 at 09:34 +0200, Paolo Bonzini wrote:
> On 03/10/19 23:23, Rick Edgecombe wrote:
> > +
> > + protection_map[4] = PAGE_EXECONLY;
> > + protection_map[12] = PAGE_EXECONLY;
>
> Can you add #defines for the bits in protection_map? Also perhaps you
> can replace the p_xo/p_xr/s_xo/s_xr checks with just with "if
> (pgtable_kvmxo_enabled()".
>
> Paolo
PAGE_EXECONLY is not known at compile time since the NR bit position depends
on the number of physical address bits. So it can't be set the way the other
ones are in protection_map[], if thats what you are saying.
I didn't love the p_xo/p_xr/s_xo/s_xr checks, but since mm/mmap.c is cross arch
it seemed the best option. Maybe a cross arch helper like
non_pkey_xo_supported() instead?
Powered by blists - more mailing lists