[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/PV: account for 32-bit Dom0 in mark_pv_pt_pages_rdonly()'s ASSERT()s



commit 9ee27aa7a2bab460769a6621895898ba3a7fb445
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Aug 20 12:28:07 2021 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Aug 20 12:28:07 2021 +0200

    x86/PV: account for 32-bit Dom0 in mark_pv_pt_pages_rdonly()'s ASSERT()s
    
    Clearly I neglected the special needs here, and also failed to test the
    change with a debug build of Xen.
    
    Fixes: 6b1ca51b1a91 ("x86/PV: assert page state in 
mark_pv_pt_pages_rdonly()")
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/pv/dom0_build.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 6145d4320b..d7f9e04b28 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -61,13 +61,14 @@ static __init void mark_pv_pt_pages_rdonly(struct domain *d,
 
         /*
          * Verify that
-         * - all pages have a valid L1...Ln page table type and
+         * - all pages have a valid L1...Ln page table type (including the PAE
+         *   sub-flavor of L2) and
          * - no other bits are set, in particular the type refcount is still
          *   zero.
          */
         ASSERT((page->u.inuse.type_info & PGT_type_mask) >= PGT_l1_page_table);
         ASSERT((page->u.inuse.type_info & PGT_type_mask) <= 
PGT_root_page_table);
-        ASSERT(!(page->u.inuse.type_info & ~PGT_type_mask));
+        ASSERT(!(page->u.inuse.type_info & ~(PGT_type_mask | PGT_pae_xen_l2)));
 
         /* Read-only mapping + PGC_allocated + page-table page. */
         page->count_info         = PGC_allocated | 3;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.