public inbox for kvm@vger.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 2/9] s390x: use highest addresses for PGM_ADDRESSING errors
Date: Wed, 10 Jan 2018 22:53:41 +0100	[thread overview]
Message-ID: <20180110215348.315-3-david@redhat.com> (raw)
In-Reply-To: <20180110215348.315-1-david@redhat.com>

Without the UL, we get 32 bit addresses, resulting in different memory
addresses. This is necessary for enabling the MMU.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 s390x/intercept.c | 10 +++++-----
 s390x/selftest.c  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/s390x/intercept.c b/s390x/intercept.c
index 99dde0d..b6027b2 100644
--- a/s390x/intercept.c
+++ b/s390x/intercept.c
@@ -46,7 +46,7 @@ static void test_stpx(void)
 	check_pgm_int_code(PGM_INT_CODE_SPECIFICATION);
 
 	expect_pgm_int();
-	asm volatile(" stpx 0(%0) " : : "r"(-8));
+	asm volatile(" stpx 0(%0) " : : "r"(-8UL));
 	check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
 }
 
@@ -78,7 +78,7 @@ static void test_spx(void)
 	check_pgm_int_code(PGM_INT_CODE_SPECIFICATION);
 
 	expect_pgm_int();
-	asm volatile(" spx 0(%0) " : : "r"(-8));
+	asm volatile(" spx 0(%0) " : : "r"(-8UL));
 	check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
 }
 
@@ -101,7 +101,7 @@ static void test_stap(void)
 	check_pgm_int_code(PGM_INT_CODE_SPECIFICATION);
 
 	expect_pgm_int();
-	asm volatile ("stap 0(%0)\n" : : "r"(-8));
+	asm volatile ("stap 0(%0)\n" : : "r"(-8UL));
 	check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
 }
 
@@ -126,7 +126,7 @@ static void test_stidp(void)
 	check_pgm_int_code(PGM_INT_CODE_SPECIFICATION);
 
 	expect_pgm_int();
-	asm volatile ("stidp 0(%0)\n" : : "r"(-8));
+	asm volatile ("stidp 0(%0)\n" : : "r"(-8UL));
 	check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
 }
 
@@ -155,7 +155,7 @@ static void test_testblock(void)
 	check_pgm_int_code(PGM_INT_CODE_PROTECTION);
 
 	expect_pgm_int();
-	asm volatile (" .insn	rre,0xb22c0000,0,%0\n" : : "r"(-4096));
+	asm volatile (" .insn	rre,0xb22c0000,0,%0\n" : : "r"(-4096UL));
 	check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
 }
 
diff --git a/s390x/selftest.c b/s390x/selftest.c
index 1c8d16a..76ed4bf 100644
--- a/s390x/selftest.c
+++ b/s390x/selftest.c
@@ -33,7 +33,7 @@ static void test_pgm_int(void)
 	check_pgm_int_code(PGM_INT_CODE_OPERATION);
 
 	expect_pgm_int();
-	asm volatile("	stg %0,0(%0)\n" : : "r"(-1));
+	asm volatile("	stg %0,0(%0)\n" : : "r"(-1UL));
 	check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
 }
 
-- 
2.14.3

  parent reply	other threads:[~2018-01-10 21:53 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 21:53 [PATCH kvm-unit-tests 0/9] s390x: vmalloc support David Hildenbrand
2018-01-10 21:53 ` [PATCH kvm-unit-tests 1/9] s390x: fix TEST BLOCK tests David Hildenbrand
2018-01-11  8:51   ` Thomas Huth
2018-01-11 15:56     ` Christian Borntraeger
2018-01-11 16:00       ` David Hildenbrand
2018-01-11 17:54         ` Andreas Krebbel
2018-01-11 19:11           ` David Hildenbrand
2018-01-11 20:33             ` Andreas Krebbel
2018-01-10 21:53 ` David Hildenbrand [this message]
2018-01-11  8:57   ` [PATCH kvm-unit-tests 2/9] s390x: use highest addresses for PGM_ADDRESSING errors Thomas Huth
2018-01-12  9:55     ` David Hildenbrand
2018-01-10 21:53 ` [PATCH kvm-unit-tests 3/9] s390x: increase the stack size David Hildenbrand
2018-01-11  9:19   ` Thomas Huth
2018-01-12  9:58     ` David Hildenbrand
2018-01-10 21:53 ` [PATCH kvm-unit-tests 4/9] s390x: add missing sclp definitions from QEMU David Hildenbrand
2018-01-11  9:31   ` Thomas Huth
2018-01-12 10:00     ` David Hildenbrand
2018-01-10 21:53 ` [PATCH kvm-unit-tests 5/9] s390x: rename sclp_setup() to sclp_ascii_setup() David Hildenbrand
2018-01-11  9:35   ` Thomas Huth
2018-01-10 21:53 ` [PATCH kvm-unit-tests 6/9] s390x: detect installed memory David Hildenbrand
2018-01-11 10:23   ` Thomas Huth
2018-01-12 10:06     ` David Hildenbrand
2018-01-11 20:54   ` David Hildenbrand
2018-01-10 21:53 ` [PATCH kvm-unit-tests 7/9] s390x: initialize the physical allocator David Hildenbrand
2018-01-11 10:29   ` Thomas Huth
2018-01-11 14:00     ` Paolo Bonzini
2018-01-11 15:16       ` Thomas Huth
2018-01-11 15:49         ` Paolo Bonzini
2018-01-11 21:08           ` David Hildenbrand
2018-01-10 21:53 ` [PATCH kvm-unit-tests 8/9] s390x: add vmalloc support David Hildenbrand
2018-01-11 11:51   ` Thomas Huth
2018-01-11 12:07     ` David Hildenbrand
2018-01-11 12:24       ` Thomas Huth
2018-01-11 14:03         ` Paolo Bonzini
2018-01-11 14:02       ` Paolo Bonzini
2018-01-11 20:08         ` David Hildenbrand
2018-01-11 14:01   ` Paolo Bonzini
2018-01-12 14:07     ` David Hildenbrand
2018-01-12 14:15     ` David Hildenbrand
2018-01-12 10:10   ` Paolo Bonzini
2018-01-12 10:33     ` David Hildenbrand
2018-01-12 12:17       ` Andrew Jones
2018-01-12 12:18         ` Paolo Bonzini
2018-01-10 21:53 ` [PATCH kvm-unit-tests 9/9] s390x: add test for (v)malloc David Hildenbrand
2018-01-11 12:09   ` Thomas Huth
2018-01-11 12:13     ` David Hildenbrand
2018-01-11 10:43 ` [PATCH kvm-unit-tests 0/9] s390x: vmalloc support Paolo Bonzini
2018-01-11 20:30   ` 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=20180110215348.315-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox