From patchwork Mon Jun 26 16:15:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 9810045 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 3410D603D7 for ; Mon, 26 Jun 2017 16:15:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3471D2857E for ; Mon, 26 Jun 2017 16:15:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28147285D8; Mon, 26 Jun 2017 16:15:24 +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 BD48E2857E for ; Mon, 26 Jun 2017 16:15:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752288AbdFZQPW (ORCPT ); Mon, 26 Jun 2017 12:15:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47868 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230AbdFZQPU (ORCPT ); Mon, 26 Jun 2017 12:15:20 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6382AC054C5A for ; Mon, 26 Jun 2017 16:15:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6382AC054C5A Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=david@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6382AC054C5A Received: from t460s.redhat.com (unknown [10.36.118.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B9DE627DB; Mon, 26 Jun 2017 16:15:17 +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 , david@redhat.com Subject: [kvm-unit-tests PATCH v1 2/2] s390x: use inline assembly to test for addressing exceptions Date: Mon, 26 Jun 2017 18:15:09 +0200 Message-Id: <20170626161509.18873-3-david@redhat.com> In-Reply-To: <20170626161509.18873-1-david@redhat.com> References: <20170626161509.18873-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 26 Jun 2017 16:15:20 +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 GCC is free to generate multiple stores instead of just one (e.g. observed by switching to -O0), making the test fail. Make sure we really only have one store. Signed-off-by: David Hildenbrand Reviewed-by: Thomas Huth --- s390x/selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390x/selftest.c b/s390x/selftest.c index 87eb934..1c8d16a 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(); - *((unsigned int*)-1) = 1; + asm volatile(" stg %0,0(%0)\n" : : "r"(-1)); check_pgm_int_code(PGM_INT_CODE_ADDRESSING); }