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

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


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 20 Aug 2021 11:32:59 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X59e0mJqxVEuvjXukbl552wx329qsWJw13VdK4933r4=; b=NKq7pqaZjOg2eESNyO0bgf5PfB+x7BMvVo5VR6sM9DmbU9BxAotAqhheYx8pvEn7gp+b3mA+EHipvQaeGxKIo5BG+GR9o4VCDYmsnDnsNFpDl8gzJAKpmLNgKGw+E2xS53hLGuz7Q7f5NjQC0KBOGXzgvzGobMxJ0yasLk3f/mEf2BDd7Srp7ttsQM3h7zyrBhATi6U9NY1KZV7407Q21wRFK9vPa8oHLbRBYtjmCxDLYZoDIwmEvDnk3VvgNhBrYtj8TXQMBgaypgXQgMf2kw7Z3H/DgzvWRKAykQKqzX8C0u23aKYagKmMF8BwTTBsi9jo23/dd42TY0FE6OuCug==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EwMteZEuBc7WnloyNl/Ivp/4hL6fJckfGhSPTTTKHONnzck36GCCxuCtiEWB/E9/Ts6KLC0qwhnSHEpZenDahWSp2mPeCHMH2eNLlhrDsM0gXcUJkZMP8e3oZ1BcqVe+3KoE4MhDraMBTcmExWojibhccFHGEmdnpelUOxl6g2qQjws6HWSg/GkNoNBI6LlueIE7k6nEByxhdg9URylp3jv9eBaaHJ0oXgf1mvDYWmotOyaQJQ9gIfKQS5mokXhOdpUvo4ixIxMQwJO7a3NeZUhbLAoI5KN/U5wOQOycISu973Pmu7iYveTtSj3rdRKkKqKwgdXX1VRw6iHgsSbUUg==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 20 Aug 2021 09:33:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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>
---
v2: Also adjust respective comment.

--- 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_rdon
 
         /*
          * 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;




 


Rackspace

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