[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86: simplify is_guest_l2_slot()
commit 8cf225013582723275f0d60f1107319f5963af7f Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Sep 4 10:59:33 2020 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Sep 4 10:59:33 2020 +0200 x86: simplify is_guest_l2_slot() is_pv_32bit_domain() has become expensive, and its use here is redundant: Only 32-bit guests would ever get PGT_pae_xen_l2 set on their L2 page table pages anyway. (If some other error does lead to PGT_pae_xen_l2 ending up anywhere else, we still don't want to allow a guest to control the entries.) Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/include/asm-x86/x86_64/page.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/include/asm-x86/x86_64/page.h b/xen/include/asm-x86/x86_64/page.h index 26621f9519..60db28f4e7 100644 --- a/xen/include/asm-x86/x86_64/page.h +++ b/xen/include/asm-x86/x86_64/page.h @@ -106,8 +106,7 @@ typedef l4_pgentry_t root_pgentry_t; #define l4_linear_offset(_a) (((_a) & VADDR_MASK) >> L4_PAGETABLE_SHIFT) #define is_guest_l2_slot(_d, _t, _s) \ - ( !is_pv_32bit_domain(_d) || \ - !((_t) & PGT_pae_xen_l2) || \ + ( !((_t) & PGT_pae_xen_l2) || \ ((_s) < COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(_d)) ) #define is_guest_l4_slot(_d, _s) \ ( is_pv_32bit_domain(_d) \ -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |