From nobody Thu May 16 09:08:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1658533251; cv=none; d=zohomail.com; s=zohoarc; b=Wawgl2lqLRch0wAvF/PHMfXRuGJqt98RhDFQ8YATqqd0FlWnixu7usSXoQNyP+9YrHWj0jErJraYKvbjAoHMEhZ8C1b1DxuexLyCNdc2WAPDBJzaRfS40k5jQUnpScsWhz2zvBPVRdUolml+5P4EB/zz7HP1FWrrbWdv2PawLV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658533251; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Q/6mxlrKiyT7katCiArn1CvX1SDwfhhyRf6fi1Tkyqo=; b=cFmyi6fb3GHJN/6JGEAAFGp4l99C42V7ov9yz6t3w3VG0ejxjB937bp+H21XRJeHUf+S3sesQL29Ro5kO1wXRRxV3AjXo2kaZd+SmJYebZ5HVbAcvIEkAwkh3DUtcpEMCLbSoqJrijscRddLayQO13edj195kAP3+YEv/flOyss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658533251262158.28697189785873; Fri, 22 Jul 2022 16:40:51 -0700 (PDT) Received: from localhost ([::1]:60434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oF2GH-00019i-1D for importer@patchew.org; Fri, 22 Jul 2022 19:40:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF2CJ-0006mm-5p; Fri, 22 Jul 2022 19:36:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:1542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF2CH-0004fw-Cg; Fri, 22 Jul 2022 19:36:42 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26MMjRPS007200; Fri, 22 Jul 2022 23:36:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hg4y78w0j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Jul 2022 23:36:38 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 26MNPrWQ015160; Fri, 22 Jul 2022 23:36:38 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hg4y78vyp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Jul 2022 23:36:38 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 26MNZ7nn009891; Fri, 22 Jul 2022 23:36:35 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04ams.nl.ibm.com with ESMTP id 3hbmy90s6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Jul 2022 23:36:35 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 26MNajAM26870252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 23:36:45 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5AAE34C044; Fri, 22 Jul 2022 23:36:32 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DDE584C040; Fri, 22 Jul 2022 23:36:31 +0000 (GMT) Received: from heavy.lan (unknown [9.171.90.71]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 22 Jul 2022 23:36:31 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Q/6mxlrKiyT7katCiArn1CvX1SDwfhhyRf6fi1Tkyqo=; b=KmYNJwC96TenJvJ4znC+a9/a35JB0f0lS/lqMlCvATd5DpisnUbVRisygYb3fAnreRRr nIHJ1NyCqhTRjXuLrsRBGLJ5xx76bVUbOyZ2eexZ0k+JebQTot8RpGRwhg+5jQa/YE65 j+7D4Zr8kkW4ZGk++08d0LDbtKjavQubnUDUERbFDqxYGclKOgSUbq5oNl3ToV4RO2Pd Q35lVfkAezA/dhk1Z3aTUKn2YFZO8jMwspD6b5ElvoAmaD7b9dffGPJ1fbgYm2K1aiEF njxoukpINStM9XWGPnaTQW4OWpdUefG605DfnsfG0cx7+Lmv0kxnfkfOpVGAqC7zGkkE vg== From: Ilya Leoshkevich To: Richard Henderson , David Hildenbrand , Paolo Bonzini , Eric Blake , Markus Armbruster Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Christian Borntraeger , Ilya Leoshkevich Subject: [PATCH v2 1/2] qapi: Add exit-failure PanicAction Date: Sat, 23 Jul 2022 01:36:13 +0200 Message-Id: <20220722233614.7254-2-iii@linux.ibm.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220722233614.7254-1-iii@linux.ibm.com> References: <20220722233614.7254-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: yU9Reqnlq407XnvnM5Ollya8FfPxTITr X-Proofpoint-ORIG-GUID: 0Pt4vZrcjZrQ3tGNkUmpEYPjKLlQvzFn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-22_06,2022-07-21_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 clxscore=1015 phishscore=0 spamscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207220094 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=iii@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1658533251583100001 Content-Type: text/plain; charset="utf-8" Currently QEMU exits with code 0 on both panic an shutdown. For tests it is useful to return 1 on panic, so that it counts as a test failure. Introduce a new exit-failure PanicAction that makes main() return EXIT_FAILURE. Tests can use -action panic=3Dexit-failure option to activate this behavior. Signed-off-by: Ilya Leoshkevich Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson --- include/sysemu/sysemu.h | 2 +- qapi/run-state.json | 4 +++- qemu-options.hx | 2 +- softmmu/main.c | 6 ++++-- softmmu/runstate.c | 17 +++++++++++++---- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 812f66a31a..31aa45160b 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -103,7 +103,7 @@ void qemu_boot_set(const char *boot_order, Error **errp= ); bool defaults_enabled(void); =20 void qemu_init(int argc, char **argv, char **envp); -void qemu_main_loop(void); +int qemu_main_loop(void); void qemu_cleanup(void); =20 extern QemuOptsList qemu_legacy_drive_opts; diff --git a/qapi/run-state.json b/qapi/run-state.json index 6e2162d7b3..d42c370c4f 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -364,10 +364,12 @@ # # @shutdown: Shutdown the VM and exit, according to the shutdown action # +# @exit-failure: Shutdown the VM and exit with nonzero status +# # Since: 6.0 ## { 'enum': 'PanicAction', - 'data': [ 'pause', 'shutdown', 'none' ] } + 'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] } =20 ## # @watchdog-set-action: diff --git a/qemu-options.hx b/qemu-options.hx index 79e00916a1..8e17c5064a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4239,7 +4239,7 @@ DEF("action", HAS_ARG, QEMU_OPTION_action, " action when guest reboots [default=3Dreset]\n" "-action shutdown=3Dpoweroff|pause\n" " action when guest shuts down [default=3Dpoweroff]\= n" - "-action panic=3Dpause|shutdown|none\n" + "-action panic=3Dpause|shutdown|exit-failure|none\n" " action when guest panics [default=3Dshutdown]\n" "-action watchdog=3Dreset|shutdown|poweroff|inject-nmi|pause|debug|non= e\n" " action when watchdog fires [default=3Dreset]\n", diff --git a/softmmu/main.c b/softmmu/main.c index c00432ff09..1b675a8c03 100644 --- a/softmmu/main.c +++ b/softmmu/main.c @@ -32,11 +32,13 @@ =20 int qemu_main(int argc, char **argv, char **envp) { + int status; + qemu_init(argc, argv, envp); - qemu_main_loop(); + status =3D qemu_main_loop(); qemu_cleanup(); =20 - return 0; + return status; } =20 #ifndef CONFIG_COCOA diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 168e1b78a0..1e68680b9d 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -482,7 +482,8 @@ void qemu_system_guest_panicked(GuestPanicInformation *= info) qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE, !!info, info); vm_stop(RUN_STATE_GUEST_PANICKED); - } else if (panic_action =3D=3D PANIC_ACTION_SHUTDOWN) { + } else if (panic_action =3D=3D PANIC_ACTION_SHUTDOWN || + panic_action =3D=3D PANIC_ACTION_EXIT_FAILURE) { qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF, !!info, info); vm_stop(RUN_STATE_GUEST_PANICKED); @@ -662,7 +663,7 @@ void qemu_system_debug_request(void) qemu_notify_event(); } =20 -static bool main_loop_should_exit(void) +static bool main_loop_should_exit(int *status) { RunState r; ShutdownCause request; @@ -680,6 +681,10 @@ static bool main_loop_should_exit(void) if (shutdown_action =3D=3D SHUTDOWN_ACTION_PAUSE) { vm_stop(RUN_STATE_SHUTDOWN); } else { + if (request =3D=3D SHUTDOWN_CAUSE_GUEST_PANIC && + panic_action =3D=3D PANIC_ACTION_EXIT_FAILURE) { + *status =3D EXIT_FAILURE; + } return true; } } @@ -715,12 +720,14 @@ static bool main_loop_should_exit(void) return false; } =20 -void qemu_main_loop(void) +int qemu_main_loop(void) { + int status =3D EXIT_SUCCESS; #ifdef CONFIG_PROFILER int64_t ti; #endif - while (!main_loop_should_exit()) { + + while (!main_loop_should_exit(&status)) { #ifdef CONFIG_PROFILER ti =3D profile_getclock(); #endif @@ -729,6 +736,8 @@ void qemu_main_loop(void) dev_time +=3D profile_getclock() - ti; #endif } + + return status; } =20 void qemu_add_exit_notifier(Notifier *notify) --=20 2.35.3 From nobody Thu May 16 09:08:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1658533431; cv=none; d=zohomail.com; s=zohoarc; b=YWiE5wrYNWwPuMLPG36PJevKuH5Mr7Y1TMR3X193ANOVenci2H8BVs3AFojzEpRF1hX+4miiOXLxw172rUI8amRXkzSt8nctTJzLclEpunpCEQBdfTUHXQD96m1qoYMKvP9Hbyg+oIgeN02ku0SfytswIMlWtSIllJFU74hKt/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658533431; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oh2/roONDaJQnPSeQ3PmZ/weoNlAbaCp2Jc8rXngRF4=; b=mp4lLHz4dAJMpK6LT4WXe7f/N7YEciCAkOQ2fqZJ62qIg9yZscCMRkxdiOKjp5Yff1nNcUrkLRDiNfngj2yiQ8rCMixzwwtdX/W8ZszHchI1lc4CXP2aK5QayC//afm45/SYcZXRi/SzLXROBYIk7F07irzJoOmxIxiq5sFNE0A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658533431722339.3984896298492; Fri, 22 Jul 2022 16:43:51 -0700 (PDT) Received: from localhost ([::1]:35838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oF2JC-00049m-E1 for importer@patchew.org; Fri, 22 Jul 2022 19:43:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF2CW-00070f-Af; Fri, 22 Jul 2022 19:36:56 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF2CU-0004iS-Jf; Fri, 22 Jul 2022 19:36:56 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26MMjS3j007205; Fri, 22 Jul 2022 23:36:52 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hg4y78w5a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Jul 2022 23:36:51 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 26MNPrWS015160; Fri, 22 Jul 2022 23:36:51 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hg4y78w4m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Jul 2022 23:36:51 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 26MNYsMD019902; Fri, 22 Jul 2022 23:36:48 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3hfyhsr9rp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Jul 2022 23:36:48 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 26MNaws730736684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Jul 2022 23:36:58 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E84044C04A; Fri, 22 Jul 2022 23:36:45 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7CE144C046; Fri, 22 Jul 2022 23:36:45 +0000 (GMT) Received: from heavy.lan (unknown [9.171.90.71]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 22 Jul 2022 23:36:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=oh2/roONDaJQnPSeQ3PmZ/weoNlAbaCp2Jc8rXngRF4=; b=AKrZCxErkaluMHDsu1zN4XdLn6PBOM2Oa4ykClFCmlruLLqkr7V1Lj+zATCqEtOEtP0r WS42NetF3kBENlaS5uK2TQD+0qMxmMOl9MSTp5bzYA3pZKL19+ZapLTbsh4k8dhobRDL nHzI5uFeQwN4MzaiElziHtIqVw2pjfRlKbmt3vdH8BBRIWu9KcIhlEn6Akq2vNtWscMN HC+IcR2hf/P8vfXso+mz0j1UatlQCZDDJucbPH4L+oWCTLLX1qBnqdppvNIQyajskRQs vEFMmwofelb8LLduHKQHviIMHV5HCxDqjRyPZ6FPdJmVnIXxNI0VqXsLmI1ji0zxd/hv EQ== From: Ilya Leoshkevich To: Richard Henderson , David Hildenbrand , Paolo Bonzini , Eric Blake , Markus Armbruster Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Christian Borntraeger , Ilya Leoshkevich Subject: [PATCH v2 2/2] tests/tcg/s390x: Test unaligned accesses to lowcore Date: Sat, 23 Jul 2022 01:36:14 +0200 Message-Id: <20220722233614.7254-3-iii@linux.ibm.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220722233614.7254-1-iii@linux.ibm.com> References: <20220722233614.7254-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: eYshyId3L66aqklvr2KxFUXMdoHHqdwu X-Proofpoint-ORIG-GUID: beQvRA_IYE0afFjBOsTthsRc7Mf1M7Ib X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-22_06,2022-07-21_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 clxscore=1015 phishscore=0 spamscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207220094 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=iii@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1658533432518100001 Content-Type: text/plain; charset="utf-8" Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson --- 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/Make= file.softmmu-target new file mode 100644 index 0000000000..a34fa68473 --- /dev/null +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -0,0 +1,9 @@ +S390X_SRC=3D$(SRC_PATH)/tests/tcg/s390x +VPATH+=3D$(S390X_SRC) +QEMU_OPTS=3D-action panic=3Dexit-failure -kernel + +%: %.S + $(CC) -march=3Dz13 -m64 -nostartfiles -static -Wl,-Ttext=3D0 \ + -Wl,--build-id=3Dnone $< -o $@ + +TESTS +=3D unaligned-lowcore diff --git a/tests/tcg/s390x/unaligned-lowcore.S b/tests/tcg/s390x/unaligne= d-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 --=20 2.35.3