All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"David Hildenbrand" <david@redhat.com>
Subject: [PATCH kvm-unit-tests v2 09/11] s390x: enable DAT in PGM interrupt handler
Date: Fri, 12 Jan 2018 15:34:15 +0100	[thread overview]
Message-ID: <20180112143417.16743-10-david@redhat.com> (raw)
In-Reply-To: <20180112143417.16743-1-david@redhat.com>

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(+)

diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h
index f934120..ac3754e 100644
--- a/lib/s390x/asm/arch_def.h
+++ b/lib/s390x/asm/arch_def.h
@@ -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 */
diff --git a/lib/s390x/mmu.c b/lib/s390x/mmu.c
index 9febb18..be0358f 100644
--- a/lib/s390x/mmu.c
+++ b/lib/s390x/mmu.c
@@ -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)
-- 
2.14.3

  parent reply	other threads:[~2018-01-12 14:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 14:34 [PATCH kvm-unit-tests v2 00/11] s390x: vmalloc support David Hildenbrand
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 01/11] s390x: fix TEST BLOCK tests David Hildenbrand
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 02/11] s390x: use highest addresses for PGM_ADDRESSING errors David Hildenbrand
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 03/11] s390x: set initital stack pointer to stackptr, not stacktop David Hildenbrand
2018-01-12 16:04   ` Thomas Huth
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 04/11] s390x: add missing sclp definitions from QEMU David Hildenbrand
2018-01-15 10:46   ` Thomas Huth
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 05/11] s390x: rename sclp_setup() to sclp_ascii_setup() David Hildenbrand
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 06/11] s390x: detect installed memory David Hildenbrand
2018-01-15 10:56   ` Thomas Huth
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 07/11] s390x: initialize the physical allocator David Hildenbrand
2018-01-15 10:16   ` Andrew Jones
2018-01-15 10:21     ` David Hildenbrand
2018-01-15 10:31       ` Paolo Bonzini
2018-01-15 10:35         ` David Hildenbrand
2018-01-15 10:38     ` Paolo Bonzini
2018-01-15 10:50       ` Andrew Jones
2018-01-15 10:42     ` David Hildenbrand
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 08/11] s390x: add vmalloc support David Hildenbrand
2018-01-12 14:34 ` David Hildenbrand [this message]
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 10/11] s390x: add test for (v)malloc David Hildenbrand
2018-01-15 10:58   ` Thomas Huth
2018-01-12 14:34 ` [PATCH kvm-unit-tests v2 11/11] s390x: add sieve test David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180112143417.16743-10-david@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.