From patchwork Mon Jan 8 13:29:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 13513485 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7E1044C9D; Mon, 8 Jan 2024 13:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="sjfCBhiy" Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 408CvG5V021699; Mon, 8 Jan 2024 13:29:51 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=hS/1ad3y6cSKvdLRHZ3T1z1JWD7/5vHpgXbT6yw5v0Q=; b=sjfCBhiy6/R3T73ThsJJVftQgPQJkU7JTW1FVvUqhpzNpJwBJIrN/W/GVDzpZemYTijG aNorRTtT3cGSskhWPnbylraLRCy3SsjWzTvCPB0HC5AVn2lTm4bujKn1vBkJDwqq33mM pdtuEE7QtKg7hY9HSNWB6OaO7FcJm/zShpW3rKWfzZ82cazOaAObSBW2+H58anUVABZK /mCJ3Zk/5TwpFbRkeL2ThLvn9OnNz7Wd030L+CUI0NyfLk2zpXCIXv5cwe7THGbBylwA 3qiEFA28+/G0apJDkBLIKGqQf+49xRSPllkLQKwPP8QtoxEUXNxW5V6XrwUlfeSuOr/l yA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vghgk1282-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Jan 2024 13:29:50 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 408CvHcj021735; Mon, 8 Jan 2024 13:29:50 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vghgk127n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Jan 2024 13:29:50 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 408AUq41000902; Mon, 8 Jan 2024 13:29:49 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3vfkdjyrp7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Jan 2024 13:29:49 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 408DTksv37159328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Jan 2024 13:29:46 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 835402004D; Mon, 8 Jan 2024 13:29:46 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5D6162004E; Mon, 8 Jan 2024 13:29:46 +0000 (GMT) Received: from a46lp67.lnxne.boe (unknown [9.152.108.100]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 8 Jan 2024 13:29:46 +0000 (GMT) From: Janosch Frank To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, thuth@redhat.com, david@redhat.com, nsg@linux.ibm.com, nrb@linux.ibm.com Subject: [kvm-unit-tests PATCH 3/5] lib: s390x: uv: Dirty CC before uvc execution Date: Mon, 8 Jan 2024 13:29:19 +0000 Message-Id: <20240108132921.255769-4-frankja@linux.ibm.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240108132921.255769-1-frankja@linux.ibm.com> References: <20240108132921.255769-1-frankja@linux.ibm.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7dy7GlinoD3X4R9NqVIKDWb0MrOr4C1w X-Proofpoint-ORIG-GUID: -rnuyILKKjVKKSLmGcB5gYaEyIeSdT4i X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-08_04,2024-01-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 spamscore=0 suspectscore=0 mlxlogscore=663 clxscore=1015 priorityscore=1501 bulkscore=0 lowpriorityscore=0 mlxscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401080115 Dirtying the CC allows us to find missing CC changes. Signed-off-by: Janosch Frank --- lib/s390x/asm/uv.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/s390x/asm/uv.h b/lib/s390x/asm/uv.h index e9fb19af..85f7b060 100644 --- a/lib/s390x/asm/uv.h +++ b/lib/s390x/asm/uv.h @@ -9,6 +9,8 @@ * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2. */ +#include + #ifndef _ASMS390X_UV_H_ #define _ASMS390X_UV_H_ @@ -216,14 +218,16 @@ struct uv_cb_ssc { static inline int uv_call_once(unsigned long r1, unsigned long r2) { + uint64_t spm_cc = 1 << SPM_CC_SHIFT; int cc; asm volatile( + " spm %[spm_cc]\n" "0: .insn rrf,0xB9A40000,%[r1],%[r2],0,0\n" " ipm %[cc]\n" " srl %[cc],28\n" : [cc] "=d" (cc) - : [r1] "a" (r1), [r2] "a" (r2) + : [r1] "a" (r1), [r2] "a" (r2), [spm_cc] "d" (spm_cc) : "memory", "cc"); if (UVC_ERR_DEBUG && cc == 1)