[PATCH kvm-unit-tests v3 09/11] s390x: enable DAT in PGM interrupt handler

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

 



Configure it in setup_vm().

Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
---
 lib/s390x/mmu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/s390x/mmu.c b/lib/s390x/mmu.c
index f0ec7c3..288f835 100644
--- a/lib/s390x/mmu.c
+++ b/lib/s390x/mmu.c
@@ -30,6 +30,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;
 
@@ -39,6 +40,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)
-- 
2.14.3




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux