From patchwork Mon Jul 25 14:05:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 593280 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp2715975mab; Mon, 25 Jul 2022 07:16:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1so5ORVKRi9GFP8623BezWzTUmZpU5i+MDvs5D8CYLFaGxxHrAeR0gzrzRplgLluevukwWZ X-Received: by 2002:a05:6102:5585:b0:357:7b42:2113 with SMTP id dc5-20020a056102558500b003577b422113mr3655254vsb.34.1658758576354; Mon, 25 Jul 2022 07:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658758576; cv=none; d=google.com; s=arc-20160816; b=SRIWyv4mrlLFqoiOphS2fBh2y3Ex8eVlAWImbljS5FSKWni3bfGWnqToeqWK89tHcv cBApGBR/jJvKswvHC0R4UpGbUuOWGAJx/GilqCKF/q0aaTmN6ZKJ+kvVLnuCc7kF3Nxi OGyfhmd/XMzruFyLv3tH1at8X7GKZ9c39jtXpFIK/SYQwTCy/3JXzBWqTcm3+IV06Fpa ileWoN35Stb9rEt/xAEigOEN2UePoXXNsbhe1kadTvSt1GDw0UBOvAWDC+kMMXVml5/a Q1wsSCau7O5OGKYsoJh275zpZamXF7b1d0Nm0GakRHQAtge8YSpg/vuJC0a8O/fvgIJd Tj4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=EGKWzbJpxSE7HiTZyXMtfn9M+E4PoKaBdw7zu5bexRW7DAhs3iZHNVJHbzPjcaLPqd UV22knF5i5hvdmSgyXG53NifK+qxTu/eGzLVDgtR/sILaNLmR8bGZOlL/QMVPcdbNRqV Y4m/YjXhr2tqiSv3rYBUiJgbe0sVs0ft5PkY3VcTUtykeUmneyq6hAhw11ZkwZITKmRG qKYY/8ou34u8Vvd4hkx4dyKmnRm77+ClbW/f3YPKziCdxcEV6Nb+ei0WtK5Ao9zRZbps rfJ6c5L1/6yfLPjh34szYJhhBkqS9UgHKslCcWyWAejv1MRtfKSPigLzFMqBTW3nXQOe efCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C1yuYhU5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bn9-20020a056130080900b003849c888f97si349587uab.113.2022.07.25.07.16.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jul 2022 07:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C1yuYhU5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFysZ-00045L-PD for patch@linaro.org; Mon, 25 Jul 2022 10:16:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFyiJ-00010W-Ol for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:41 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:44997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFyiI-0000HC-4n for qemu-devel@nongnu.org; Mon, 25 Jul 2022 10:05:39 -0400 Received: by mail-wr1-x42a.google.com with SMTP id l15so12068188wro.11 for ; Mon, 25 Jul 2022 07:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=C1yuYhU5QO5UZVFdO3t6O30s8OBCLP1/aEPMBFOMsn6Y1qzoP+ytnBlPetAs+cTVFk OHti8eKnVkTUdqcpt151Q0d9pDpUw8TosckUFAKnBZ4Z3qCE5XzbF+Yrzo6w0MS+niDo eQdnjlppCuCPbRBxK6CV3PmTU2ks5dlkCLyfya88SOxC62mK1/Am3efPpOWVEtqVA9qC GFKF2eRvfVm0KsLD5Ch+v6AyzdXFEc+6xNuwdZF8QpR03/rCpUxcQcXETy9ox7jAUmsn f1Iv/Hjc/93Uu5WxNw+gpC89VgjotZHDlEdoqZ52cJgzUkDmZJt0dpJwd53p04yaoZEU +e2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QVFXqQSL3k1U0tR1HBqjNVeAN73t7swh868mXq6OAM8=; b=2kI9v/e9ZFul8fURxa7CdwcKFhV+1MyGATw2HfR8OpPR13J6RjRAthZtkFIxiWlbyQ z1hI7yUgpJynFylRYHmJUDAaTnEt4u5mTsDioj2bv9zlBRyMKrXv/vYkeHmzYWMS9nqv J6vpK7yelMMz/7WhDknJ2qxEWDMsM0jbK3B9K9i6tyaW8TIb43DO+a1/du4Uxok6U6EH UuC6UIh7V0lifmrjRyWqagq9mvl/+NB03PMoHkA+A0sV0g0ECKV8egBKHr/tlJQSbstF tfb9hjvTvpbrpEsp50bUdDlXkmhhjYwj3vAh+9xdoCOFrSsgly+QdqsdbVpwsoEmniWH jIkg== X-Gm-Message-State: AJIora+Q/vrg5eCL7gVsyPB5HuQjRYBZNq4lboaHhxc05xMchhJ1gOke Q4LRtt5ajNtVzMQVfFKKff7+KA== X-Received: by 2002:a05:6000:178f:b0:21e:98ee:f1e6 with SMTP id e15-20020a056000178f00b0021e98eef1e6mr324527wrg.405.1658757936685; Mon, 25 Jul 2022 07:05:36 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id bg42-20020a05600c3caa00b003a31b79dc0esm40292263wmb.1.2022.07.25.07.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 07:05:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8B9761FFC3; Mon, 25 Jul 2022 15:05:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, peter.maydell@linaro.org, Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , David Hildenbrand , Cornelia Huck , Thomas Huth , qemu-s390x@nongnu.org (open list:S390 TCG CPUs) Subject: [PATCH v1 11/13] tests/tcg/s390x: Test unaligned accesses to lowcore Date: Mon, 25 Jul 2022 15:05:18 +0100 Message-Id: <20220725140520.515340-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725140520.515340-1-alex.bennee@linaro.org> References: <20220725140520.515340-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Ilya Leoshkevich Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Message-Id: <20220722233614.7254-3-iii@linux.ibm.com> Signed-off-by: Alex Bennée Acked-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 9 +++++++++ tests/tcg/s390x/unaligned-lowcore.S | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/tcg/s390x/Makefile.softmmu-target create mode 100644 tests/tcg/s390x/unaligned-lowcore.S diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.softmmu-target new file mode 100644 index 0000000000..a34fa68473 --- /dev/null +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -0,0 +1,9 @@ +S390X_SRC=$(SRC_PATH)/tests/tcg/s390x +VPATH+=$(S390X_SRC) +QEMU_OPTS=-action panic=exit-failure -kernel + +%: %.S + $(CC) -march=z13 -m64 -nostartfiles -static -Wl,-Ttext=0 \ + -Wl,--build-id=none $< -o $@ + +TESTS += unaligned-lowcore diff --git a/tests/tcg/s390x/unaligned-lowcore.S b/tests/tcg/s390x/unaligned-lowcore.S new file mode 100644 index 0000000000..246b517f11 --- /dev/null +++ b/tests/tcg/s390x/unaligned-lowcore.S @@ -0,0 +1,19 @@ + .org 0x1D0 /* program new PSW */ + .quad 0x2000000000000, 0 /* disabled wait */ + .org 0x200 /* lowcore padding */ + + .globl _start +_start: + lctlg %c0,%c0,_c0 + vst %v0,_unaligned + lpswe quiesce_psw + + .align 8 +quiesce_psw: + .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ +_c0: + .quad 0x10060000 /* lowcore protection, AFP, VX */ + + .byte 0 +_unaligned: + .octa 0