Comment 2 for bug 1581420

Revision history for this message
Philipp Hahn (pmhahn) wrote :

xen-4.3 dropped support for x86-32 bit.
As such compilation fails for 4.1 on i386::
> guest_walk.c: In function 'mandatory_flags':
> guest_walk.c:66:40: error: '_PAGE_INVALID_BIT' undeclared (first use in this function)
> guest_walk.c:66:40: note: each undeclared identifier is reported only once for each function it appears in
> guest_walk.c: In function 'guest_walk_tables_2_levels':
> guest_walk.c:146:30: error: '_PAGE_INVALID_BIT' undeclared (first use in this function)
> guest_walk.c: In function 'mandatory_flags':
> guest_walk.c:67:1: error: control reaches end of non-void function [-Werror=return-type]

Define _PAGE_INVALID_BIT for x86-32 too, for which support was dropped in xen-4.3:

diff --git a/xen/include/asm-x86/x86_32/page.h b/xen/include/asm-x86/x86_32/page.h
index ca6988c..a2cd306 100644
--- a/xen/include/asm-x86/x86_32/page.h
+++ b/xen/include/asm-x86/x86_32/page.h
@@ -135,6 +135,12 @@ extern unsigned int PAGE_HYPERVISOR_NOCACHE;
                           : BASE_DISALLOW_MASK)
 #define L3_DISALLOW_MASK 0xFFFFF1FEU /* must-be-zero */

+/*
+ * Bit 24 of a 24-bit flag mask! This is not any bit of a real pte,
+ * and is only used for signalling in variables that contain flags.
+ */
+#define _PAGE_INVALID_BIT (1U<<24)
+
 #endif /* __X86_32_PAGE_H__ */

 /*

Waiting on confirmation from xen-devel that using bit 24 on x86-32 is okay.