From patchwork Wed Jan 10 21:53:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10156205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 73AC560231 for ; Wed, 10 Jan 2018 21:54:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65AE3285CB for ; Wed, 10 Jan 2018 21:54:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A5DF285E1; Wed, 10 Jan 2018 21:54:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09862285CB for ; Wed, 10 Jan 2018 21:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbeAJVyB (ORCPT ); Wed, 10 Jan 2018 16:54:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34508 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbeAJVx7 (ORCPT ); Wed, 10 Jan 2018 16:53:59 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C7E2E356E3; Wed, 10 Jan 2018 21:53:59 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-128.ams2.redhat.com [10.36.117.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03A3A8D647; Wed, 10 Jan 2018 21:53:57 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , David Hildenbrand Subject: [PATCH kvm-unit-tests 2/9] s390x: use highest addresses for PGM_ADDRESSING errors Date: Wed, 10 Jan 2018 22:53:41 +0100 Message-Id: <20180110215348.315-3-david@redhat.com> In-Reply-To: <20180110215348.315-1-david@redhat.com> References: <20180110215348.315-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 10 Jan 2018 21:53:59 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Thomas Huth --- 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); }