> -----Original Message----- > From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Wednesday, November 18, 2015 6:11 PM > To: Wu, Feng <feng...@intel.com>; Jan Beulich <jbeul...@suse.com> > Cc: Tian, Kevin <kevin.t...@intel.com>; wei.l...@citrix.com; > ian.campb...@citrix.com; stefano.stabell...@eu.citrix.com; > george.dun...@eu.citrix.com; ian.jack...@eu.citrix.com; xen- > de...@lists.xen.org; Nakajima, Jun <jun.nakaj...@intel.com>; Han, > Huaitong <huaitong....@intel.com>; k...@xen.org > Subject: Re: [Xen-devel] [PATCH 00/10] x86/hvm: pkeys, add memory > protection-key support > > On 18/11/15 09:12, Wu, Feng wrote: > > > >> -----Original Message----- > >> From: xen-devel-boun...@lists.xen.org [mailto:xen-devel- > >> boun...@lists.xen.org] On Behalf Of Jan Beulich > >> Sent: Tuesday, November 17, 2015 6:26 PM > >> To: Andrew Cooper <andrew.coop...@citrix.com> > >> Cc: Tian, Kevin <kevin.t...@intel.com>; wei.l...@citrix.com; > >> ian.campb...@citrix.com; stefano.stabell...@eu.citrix.com; > >> george.dun...@eu.citrix.com; ian.jack...@eu.citrix.com; xen- > >> de...@lists.xen.org; Nakajima, Jun <jun.nakaj...@intel.com>; Han, > >> Huaitong <huaitong....@intel.com>; k...@xen.org > >> Subject: Re: [Xen-devel] [PATCH 00/10] x86/hvm: pkeys, add memory > >> protection-key support > >> > >>>>> On 16.11.15 at 18:45, <andrew.coop...@citrix.com> wrote: > >>> Furthermore, it is unclear (given the unwritten ABI) whether it is even > >>> safe to move _PAGE_GNTTAB out of the way, as this is visible to a PV > guest. > >> It seems pretty clear to me that this would be unsafe: It being > >> part of L1_DISALLOW_MASK, if it moved and a guest used the > >> bit for its own purposes, the guest would break. I guess we'll > >> need an ELF note by which the guest can advertise which of the > >> available bits it doesn't care about itself. > > Actually, we don't expose this feature to PV guest, we only expose it > > to HVM. In that case, is there still issues like you discussed above? > > You have turned on CR4.PKE, and _PAGE_GNTTAB is bit 62 in a PTE.
Oh, yes, actually, we shouldn't turn on CR4.PKE for Xen, since we don't actually enable it for Xen itself (No such usage model). > Futhermore, you don't prevent/audit a PV guest's use of the PK bits. I think the guest (HVM or PV) should use the PK bits only when Pkey is enabled (CR4.PKE set) by the kernel, Xen cannot control it, right? Thanks, Feng > > This makes it usable by PV guests, even if the feature isn't advertised. > > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel