From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1F75C433EF for ; Fri, 14 Jan 2022 11:20:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240590AbiANLUK (ORCPT ); Fri, 14 Jan 2022 06:20:10 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50128 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240779AbiANLUI (ORCPT ); Fri, 14 Jan 2022 06:20:08 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20E9up2C039251; Fri, 14 Jan 2022 11:20:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=Uq90D4gwd9qAA3jZR6nygGmHV/6pT2YHxmAagR9gBfc=; b=nr7h14ME19ZGtJXhWwXH4eRn64FHmqcZodQ/+9RyUKTEpIs3H4PS0+uHHipkD25oOxbe NwGKu65UU0h5Mf10JiH5AFwAvYBNr8T0xoRFmtA/Gn9q1Ky0DVJpJwd/rDNJfui0e8Ur dxg8WalTVOFdqi7ggFMIFpqxmHKsW8+6VT7ZE3wL6ze5lKbwpn5AZw9Bx33Xz/pG7+bH Xfaw5R8wM93SqSdgp1bjGMhFtALFXbO3eGR6gYJDsMjObIlq379X2Y01XLKmVnWyR5wI HiGULasLSpShTlwOc/zvBrNt14IEAsaKyhlwGNl3EfCIMkrHSMcCkoULD0PNi8eOtXTw Bg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dk702scpk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 11:20:08 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20EB9SIP026581; Fri, 14 Jan 2022 11:20:08 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dk702scnc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 11:20:07 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20EBDq5M029677; Fri, 14 Jan 2022 11:20:05 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma05fra.de.ibm.com with ESMTP id 3djq1mpmft-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jan 2022 11:20:05 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20EBAs1Z30867912 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jan 2022 11:10:54 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 898F44C040; Fri, 14 Jan 2022 11:20:01 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1F87F4C044; Fri, 14 Jan 2022 11:20:01 +0000 (GMT) Received: from p-imbrenda (unknown [9.145.8.156]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Jan 2022 11:20:01 +0000 (GMT) Date: Fri, 14 Jan 2022 11:39:35 +0100 From: Claudio Imbrenda To: Janosch Frank Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, david@redhat.com, thuth@redhat.com, cohuck@redhat.com, nrb@linux.ibm.com Subject: Re: [kvm-unit-tests PATCH 3/5] s390x: diag308: Only test subcode 2 under QEMU Message-ID: <20220114113935.256c2f30@p-imbrenda> In-Reply-To: <20220114100245.8643-4-frankja@linux.ibm.com> References: <20220114100245.8643-1-frankja@linux.ibm.com> <20220114100245.8643-4-frankja@linux.ibm.com> Organization: IBM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: O3sXAl9guMhvcxtBvQ4QTTx-fAcufDUG X-Proofpoint-ORIG-GUID: BCYDBdKdO1WuRZG_Zlfbf8AYC0BJgCvK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_04,2022-01-14_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 adultscore=0 impostorscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140074 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, 14 Jan 2022 10:02:43 +0000 Janosch Frank wrote: > Other hypervisors might implement it and therefore not send a > specification exception. > > Signed-off-by: Janosch Frank > --- > s390x/diag308.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/s390x/diag308.c b/s390x/diag308.c > index c9d6c499..414dbdf4 100644 > --- a/s390x/diag308.c > +++ b/s390x/diag308.c > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > > /* The diagnose calls should be blocked in problem state */ > static void test_priv(void) > @@ -75,7 +76,7 @@ static void test_subcode6(void) > /* Unsupported subcodes should generate a specification exception */ > static void test_unsupported_subcode(void) > { > - int subcodes[] = { 2, 0x101, 0xffff, 0x10001, -1 }; > + int subcodes[] = { 0x101, 0xffff, 0x10001, -1 }; > int idx; > > for (idx = 0; idx < ARRAY_SIZE(subcodes); idx++) { > @@ -85,6 +86,18 @@ static void test_unsupported_subcode(void) > check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); > report_prefix_pop(); > } > + > + /* > + * Subcode 2 is not available under QEMU but might be on other > + * hypervisors. > + */ > + if (vm_is_tcg() || vm_is_kvm()) { > + report_prefix_pushf("0x%04x", 2); > + expect_pgm_int(); > + asm volatile ("diag %0,%1,0x308" :: "d"(0), "d"(2)); > + check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); > + report_prefix_pop(); > + } maybe add else { report_skip("0x0002 Only tested in Qemu"); } > } > > static struct {