arm: Upgrade guest barriers to Outer-Shareable. Enable Protected Table Walk.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 3 Jul 2012 09:52:27 +0000 (10:52 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 3 Jul 2012 09:52:27 +0000 (10:52 +0100)
Upgrading barriers is conservative and may not be necessary.

Protected Table Walk traps stage 1 page tables which refer to device memory
(per stage 2) using a non-device mapping. This generally indicates a guest
error but trapping it as a fault for now helps us know if something odd is
going on.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/domain_build.c
xen/include/asm-arm/processor.h

index 1b19e54f3d43953b28ba8083b6be6165451bd439..a9e7f43eb76d510a533d117fc39c66fb38b909a8 100644 (file)
@@ -333,7 +333,7 @@ int construct_dom0(struct domain *d)
 
     WRITE_CP32(SCTLR_BASE, SCTLR);
 
-    WRITE_CP32(HCR_AMO|HCR_IMO|HCR_VM, HCR);
+    WRITE_CP32(HCR_PTW|HCR_BSU_OUTER|HCR_AMO|HCR_IMO|HCR_VM, HCR);
     isb();
 
     local_abort_enable();
index 81924a4b0fee9321a9e6495dde65b0845486fd94..9b3c9ddd1ad4e10ecef3e675627ed0fa871e8854 100644 (file)
 #define HCR_TWI         (1<<13)
 #define HCR_DC          (1<<12)
 #define HCR_BSU_MASK    (3<<10)
+#define HCR_BSU_NONE     (0<<10)
+#define HCR_BSU_INNER    (1<<10)
+#define HCR_BSU_OUTER    (2<<10)
+#define HCR_BSU_FULL     (3<<10)
 #define HCR_FB          (1<<9)
 #define HCR_VA          (1<<8)
 #define HCR_VI          (1<<7)