c/s 4c5d78a10 was accidentally buggy when handling Protection Keys. Protection keys applies to all user translations, not just accesses which originate from user mode.
Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Tim Deegan <t...@xen.org> CC: George Dunlap <george.dun...@eu.citrix.com> CC: Julien Grall <julien.gr...@arm.com> This regression was introducing during the 4.9 timeframe, so really should be fixed before 4.9 ships. --- xen/arch/x86/mm/guest_walk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/guest_walk.c b/xen/arch/x86/mm/guest_walk.c index 32d818e..ba72432 100644 --- a/xen/arch/x86/mm/guest_walk.c +++ b/xen/arch/x86/mm/guest_walk.c @@ -408,7 +408,7 @@ guest_walk_tables(struct vcpu *v, struct p2m_domain *p2m, * N.B. In the case that the walk ended with a superpage, the fabricated * gw->l1e contains the appropriate leaf pkey. */ - if ( (walk & PFEC_user_mode) && !(walk & PFEC_insn_fetch) && + if ( (ar & _PAGE_USER) && !(walk & PFEC_insn_fetch) && guest_pku_enabled(v) ) { unsigned int pkey = guest_l1e_get_pkey(gw->l1e); -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel