@@ -15,6 +15,8 @@ struct psw {
uint64_t addr;
};
+#define PSW_MASK_DAT 0x0400000000000000UL
+
struct lowcore {
uint8_t pad_0x0000[0x0080 - 0x0000]; /* 0x0000 */
uint32_t ext_int_param; /* 0x0080 */
@@ -47,6 +47,7 @@ void configure_dat(int enable)
static void mmu_enable(pgd_t *pgtable)
{
+ struct lowcore *lc = NULL;
const uint64_t asce = __pa(pgtable) | ASCE_DT_REGION1 |
REGION_TABLE_LENGTH;
@@ -56,6 +57,9 @@ static void mmu_enable(pgd_t *pgtable)
/* enable dat (primary == 0 set as default) */
configure_dat(1);
+
+ /* we can now also use DAT unconditionally in our PGM handler */
+ lc->pgm_new_psw.mask |= PSW_MASK_DAT;
}
static pteval_t *get_pte(pgd_t *pgtable, uintptr_t vaddr)
Configure it in setup_vm(). Signed-off-by: David Hildenbrand <david@redhat.com> --- lib/s390x/asm/arch_def.h | 2 ++ lib/s390x/mmu.c | 4 ++++ 2 files changed, 6 insertions(+)