From patchwork Wed Apr 24 10:59:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641726 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 1666215991B for ; Wed, 24 Apr 2024 10:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956394; cv=none; b=o4PXgmxvHy+XWQOadcK99bsblpihyJLKWUOnsB/po0JDGa8ueiz5b87udLLIlVVRX288+8YdQQhh4Xju6NNGtb6x2mQgsERgpywxVohh3d4n6PXIh0boSNTBoj23mfbH/355LL0tcOOpY5D7Ze6HBt1VoVq66nAYp/PYB5qBvxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956394; c=relaxed/simple; bh=dyJ7FRvh0wAmB0CoarZWSw/OPx8V71j6Fgs6Mfvdk2s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zua7+vdCxzRcp6Dt+6nTa9Ihq8je7TGB18E7sXL2GI7GBgjIDtX+dRqCsOhg1AgODRJr64y3W3u2r9QeGuW/v571NJ9yeuFlfBJMy9ibvPuS3ngC6UuqqRdowKNCRQb2K8GNbvz+d+NST7R918qhTgK3SvI98snMnLetWPHG3dc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=owAIi0kw; arc=none smtp.client-ip=148.163.158.5 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="owAIi0kw" Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAwgnF030686; Wed, 24 Apr 2024 10:59:45 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 : content-transfer-encoding : mime-version; s=pp1; bh=HaoajYLKFTXItkkLN+X6gEMoldb+xE2959U4/IwiR7I=; b=owAIi0kwjGj1Utsl3flK4OIUTMru5eGkSFRew47b+ObkI3tQca+w/NGjyy5JaQr8QCDS 5Q7epdCxArg+rhSgB2TB13LZegqvYKQwnHk39rdgi8EU0z4UIfKNu7d1kUtMuq3y1Cgo GcCtfOG/N26ySfYIOdjIlylAabHI8GXi7E8dr8xpNcihQgY4AaIjvwNvBSYRRCAbW6yp BkMaglYBCzLTmRufxYJj/NDMv+FCQEcdtFQvCd6IZ6kULpqqAV2FBR+1nlX+PH43yotb gs34X4qpd00WpdHVocYubojGXUEbxcpo5p/s/gwABizVgXhg//9W/nkjbEJ/ot7N9kPk Kg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0sm803u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxiIr032315; Wed, 24 Apr 2024 10:59:44 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0sm803s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:44 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O7ZQYH020943; Wed, 24 Apr 2024 10:59:44 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xmre03afp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:44 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxcbm32178508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:40 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADC0520043; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 83D092004E; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com, Marc Hartmayer , Steffen Eiden Subject: [kvm-unit-tests GIT PULL 01/13] s390x/Makefile: simplify Secure Execution boot image generation Date: Wed, 24 Apr 2024 12:59:20 +0200 Message-ID: <20240424105935.184138-2-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 1j1D_VuGUv8-p_2qD4v-89cypclaZCIu X-Proofpoint-ORIG-GUID: 5V2X6s6TtJyOl0H6Bb5YoOFkxasdCuUo X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 adultscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 clxscore=1015 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Marc Hartmayer Changes: + merge Makefile rules for the generation of the Secure Execution boot image + fix `parmfile` dependency for the `selftest.pv.bin` target + rename `genprotimg_pcf` to `GENPROTIMG_PCF` to match the coding style in the file + always provide a customer communication key - not only for the confidential dump case. Makes the code little easier and doesn't hurt. Signed-off-by: Marc Hartmayer Reviewed-by: Steffen Eiden Link: https://lore.kernel.org/r/20231121172338.146006-1-mhartmay@linux.ibm.com Signed-off-by: Nico Boehr --- s390x/Makefile | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/s390x/Makefile b/s390x/Makefile index ddc0969f..8603a523 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -197,33 +197,27 @@ $(comm-key): %.bin: %.elf $(OBJCOPY) -O binary $< $@ -# Will only be filled when dump has been enabled -GENPROTIMG_COMM_KEY = -# allow PCKMO -genprotimg_pcf = 0x000000e0 +# The genprotimg arguments for the cck changed over time so we need to +# figure out which argument to use in order to set the cck +GENPROTIMG_HAS_COMM_KEY = $(shell $(GENPROTIMG) --help | grep -q -- --comm-key && echo yes) +ifeq ($(GENPROTIMG_HAS_COMM_KEY),yes) + GENPROTIMG_COMM_OPTION := --comm-key +else + GENPROTIMG_COMM_OPTION := --x-comm-key +endif ifeq ($(CONFIG_DUMP),yes) - # The genprotimg arguments for the cck changed over time so we need to - # figure out which argument to use in order to set the cck - GENPROTIMG_HAS_COMM_KEY = $(shell $(GENPROTIMG) --help | grep -q -- --comm-key && echo yes) - ifeq ($(GENPROTIMG_HAS_COMM_KEY),yes) - GENPROTIMG_COMM_KEY = --comm-key $(comm-key) - else - GENPROTIMG_COMM_KEY = --x-comm-key $(comm-key) - endif - # allow dumping + PCKMO - genprotimg_pcf = 0x200000e0 + GENPROTIMG_PCF := 0x200000e0 +else + # allow PCKMO + GENPROTIMG_PCF := 0x000000e0 endif -# use x-pcf to be compatible with old genprotimg versions -genprotimg_args = --host-key-document $(HOST_KEY_DOCUMENT) --no-verify $(GENPROTIMG_COMM_KEY) --x-pcf $(genprotimg_pcf) - -%selftest.pv.bin: %selftest.bin $(HOST_KEY_DOCUMENT) $(patsubst %.pv.bin,%.parmfile,$@) $(comm-key) - $(GENPROTIMG) $(genprotimg_args) --parmfile $(patsubst %.pv.bin,%.parmfile,$@) --image $< -o $@ - +$(patsubst %.parmfile,%.pv.bin,$(wildcard s390x/*.parmfile)): %.pv.bin: %.parmfile %.pv.bin: %.bin $(HOST_KEY_DOCUMENT) $(comm-key) - $(GENPROTIMG) $(genprotimg_args) --image $< -o $@ + $(eval parmfile_args = $(if $(filter %.parmfile,$^),--parmfile $(filter %.parmfile,$^),)) + $(GENPROTIMG) --host-key-document $(HOST_KEY_DOCUMENT) --no-verify $(GENPROTIMG_COMM_OPTION) $(comm-key) --x-pcf $(GENPROTIMG_PCF) $(parmfile_args) --image $(filter %.bin,$^) -o $@ $(snippet_asmlib): $$(patsubst %.o,%.S,$$@) $(asm-offsets) $(CC) $(CFLAGS) -c -nostdlib -o $@ $< From patchwork Wed Apr 24 10:59:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641734 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 6FD2315B102 for ; Wed, 24 Apr 2024 10:59:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956398; cv=none; b=KAR18YbrDgCjcEdoks+i/TDYYRQOz/0uZZbI635Wd88x5mQWFPqSrnRfP12yI+wfSkgkKwY3qkDKofTXLMMGBDH1MkxHhbSwDgzsOhYlSC6aX9YnGutn0asGpJmd0thI9eRy7oyDPaj0GG+foLyU9rQgYlU+6WOzV8/EGH5VlqQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956398; c=relaxed/simple; bh=aKWmBM8Bt8rooR3wYBHjC2Tzpc1cDVkcb4gC9gXPbQg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iE5Ndwb2FEbJYzqfkVwstV6oF3FAuMeSGYkowX+manJH9Tiyqwu4UDFKYwd9JiLUTCwvikOkGcgszNSVC1gFLrCR2MihPxIZ5eCHPsLwGT9dfs+Dly7PbdDVLDohbt2d+G4wJ8ZnCEm9vLDGecC6QaMPeTQ+ZU8wWN+xp39Jjjc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=cFft8j1F; arc=none smtp.client-ip=148.163.156.1 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="cFft8j1F" Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAgRa2008495; Wed, 24 Apr 2024 10:59:46 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 : content-transfer-encoding : mime-version; s=pp1; bh=IluY/7oij9rogCrrjOtLGv86ZpDcycC0oOPLji6Qv20=; b=cFft8j1Fc6oW1EHq1vdalONYWWvkjomMQqPsyeN7lwBwpR+nXAQBYhk3K2RXGKCDHtYx wPp999jJG7FkpWcFw8PX6ETD/rApUzOMv90W2PZNkRenaUUV6JoBRGD5GBOWE18/m+BI Nt/cxXpxhWRIE83P1ZClIe9uCr4npWfDFSORz+X5xv7atiIQ4S5wcNcAMR9zuk441d6f XLerNbjZGL11hB94I7b/vMO6ibEcJLTgs3rqxZux75OEqzzDdUd0yn9YO+TEkFV0yfTC fKSJncRNBUYH4EodygNIqPSH2f8WKVE2nbilFPPHNXjJ/llOXWc9MbN75jfSKvBJPdne gA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jb80wn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAu01L029126; Wed, 24 Apr 2024 10:59:45 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jb80wk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAxFJv029905; Wed, 24 Apr 2024 10:59:44 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xmr1tkefx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:44 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxcNt44499334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:41 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E23B02004E; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B45AA2004F; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 02/13] lib: s390x: sigp: Dirty CC before sigp execution Date: Wed, 24 Apr 2024 12:59:21 +0200 Message-ID: <20240424105935.184138-3-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: -odxPmvUEE0QNl7w1hAEpDUCOLu94fHN X-Proofpoint-GUID: _0DsWqR7FwU8kKsVXOuiHK2CwHloS-f5 X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 phishscore=0 malwarescore=0 impostorscore=0 suspectscore=0 adultscore=0 mlxlogscore=980 lowpriorityscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Janosch Frank Dirtying the CC allows us to find missing CC changes when sigp is emulated. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20240131074427.70871-2-frankja@linux.ibm.com Signed-off-by: Nico Boehr --- lib/s390x/asm/sigp.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/s390x/asm/sigp.h b/lib/s390x/asm/sigp.h index 61d2c625..4eae95d0 100644 --- a/lib/s390x/asm/sigp.h +++ b/lib/s390x/asm/sigp.h @@ -49,13 +49,17 @@ static inline int sigp(uint16_t addr, uint8_t order, unsigned long parm, uint32_t *status) { register unsigned long reg1 asm ("1") = parm; + uint64_t bogus_cc = SIGP_CC_NOT_OPERATIONAL; int cc; asm volatile( + " tmll %[bogus_cc],3\n" " sigp %1,%2,0(%3)\n" " ipm %0\n" " srl %0,28\n" - : "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc"); + : "=d" (cc), "+d" (reg1) + : "d" (addr), "a" (order), [bogus_cc] "d" (bogus_cc) + : "cc"); if (status) *status = reg1; return cc; From patchwork Wed Apr 24 10:59:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641732 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 5CE6115AD9D for ; Wed, 24 Apr 2024 10:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956397; cv=none; b=WujaybFhyyreQw218VTF1vSNohZTkWCJAaE39rxkAzskm7pwRtf8VRRj8nJOB7YhSN3+vgTnrrtUhHAH1y8lrB1eNe2WZf7ipoVfbQsvwf6nZTKAfrD2TiWnOAiRLmlWs/iAD3rQ3HQ7Ei0Bj26yQPD5dn99KDm4wxFKTu2dARw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956397; c=relaxed/simple; bh=+pyxLdjVDknc7LukF3dyU8va0T0nsShCZFQfNguCN2E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RbHEkFe+iLoy1oXfRH2q19DDElh0ITYJy1Z1ljIM6ludK9Gcl8EAsKxw4iJTGYtCdT7n2Gl6iR26AH3/7Fo92s1Nbwk0zCm9Sq4UK58Q+eApWKtrgh+rphRXCUmyKCwOJFixPjrucuHA6e5V7PsMR/Nn57xovE5d5ZU8RaTsLAI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=lP6HnFV5; arc=none smtp.client-ip=148.163.156.1 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="lP6HnFV5" Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43O8wG0b000580; Wed, 24 Apr 2024 10:59:46 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 : content-transfer-encoding : mime-version; s=pp1; bh=jI9fPRk1uXVn/yLSVxcW4Lrj7E6INbu52SOwpy9zqUE=; b=lP6HnFV56+InAXZLFite17bZKjLgmoQEUpJ4gtIygkfB6ZoRmstZAghSg7FX6muc0CPS LLUwPKUD3vhJJq1QWkbn6xAgHMRKjfqY1NGWdur2QJgQsrrTSZ+MpsyFLlp+m/wzOGoX RGuGjt19+2sR8xtuwpO2n0gFBtPTUhaJ84Dt//K1dQMXExe6rbvSsFOqqIEtH+GgdVSn +MWwLX5SEw6e10cZaRCNe3Bg3OYLC33P7O+bQ/9E/NW4mcHtj57n/wy/3HhxjxwxseSc M6l1jQXgCmDGoEGcIG91ahW56lXDFMku6nUY6JMQHvlzJ5r7yo2APSfIjYqAx8YOh8vY ag== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpy12g8bn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxjWG026709; Wed, 24 Apr 2024 10:59:46 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpy12g8bk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O8C4C6015343; Wed, 24 Apr 2024 10:59:44 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xmshmb253-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:44 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxdCP31261300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:41 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 248962004F; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA9A72004B; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:38 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 03/13] lib: s390x: uv: Dirty CC before uvc execution Date: Wed, 24 Apr 2024 12:59:22 +0200 Message-ID: <20240424105935.184138-4-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: TCUgr9oELpvjCj8j9A4e9MUEs3sVTje9 X-Proofpoint-GUID: uhSQr28ENz5Em4hDK-gXM4_Au858BDSV X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 mlxlogscore=997 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Janosch Frank Dirtying the CC allows us to find missing CC changes. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20240131074427.70871-3-frankja@linux.ibm.com Signed-off-by: Nico Boehr --- lib/s390x/asm/uv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/s390x/asm/uv.h b/lib/s390x/asm/uv.h index e9fb19af..611dcd3f 100644 --- a/lib/s390x/asm/uv.h +++ b/lib/s390x/asm/uv.h @@ -216,14 +216,16 @@ struct uv_cb_ssc { static inline int uv_call_once(unsigned long r1, unsigned long r2) { + uint64_t bogus_cc = 1; int cc; asm volatile( + " tmll %[bogus_cc],3\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), [bogus_cc] "d" (bogus_cc) : "memory", "cc"); if (UVC_ERR_DEBUG && cc == 1) From patchwork Wed Apr 24 10:59:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641737 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 5BC8B15AD9A for ; Wed, 24 Apr 2024 10:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956400; cv=none; b=XAIHjDZobyuLkKjyjf0Ymr+hOQ0sXlY6C3tW69RdTfkNIcsVpdM2qyAxD+Nudj6k8hv51upaV5ppXOEFBUQXhJYNZ/26bzAMpKBGNhz4a6T3LV/gRW1LFi3mGOgB2+NyITYFAYhIrgXNlJKGYjJRhrYRrbImdOo/tTVphdxuA+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956400; c=relaxed/simple; bh=kV1zftkpWzbcO50ElhQAkWmlhWyzdOjfJ4qMUwnwIJE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jrY+crYu4WqyME2EBwgxnTdBqhulFFiiy7QoO3s3bHcfidTQL0KijMX09spp7qr7NhVtigexW9sx9PKhKUVjUQ1LQevpvTyVqyCM8rH046rp5QNLaz151/5zU/ho0KkR5R94wSBW2ET1z/j3I/911zHapHkH935MjLedsOEdZMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=j546LZtw; arc=none smtp.client-ip=148.163.158.5 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="j546LZtw" Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43O9lwRc023541; Wed, 24 Apr 2024 10:59:47 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 : content-transfer-encoding : mime-version; s=pp1; bh=clEy1tkFZtScIaqxbPYYXhokhY2wP6SeMOsd+QJN2wM=; b=j546LZtwPNSI9yGniZEs66scDhrCA/CY2Y9E7DGYQAqHuScOBwD2Fboqo4938Hhov17L dZTco0AgRTexa8+i8RQZ+2uBwU0JXSDXEaLKJNStflHLJN2ytcYKJLWQvumufgmYFmHT INtVqCzqXKtTBrpmiafOUSj9AbTykTPGfmoMTVMsdT+F0lZoY4anvVXrppGviX7ornch eJTsRcoM0Y/T09gb3CZ47n9rAQVpxRJd/K8unpWQL0zN1rx+7DO5vfUcUSxj5vx3rhOP pKSYO0U7A1Yar/SWbLwhanGs4VB/oDltJokdJ1UKs5KhjlluoWu/NlayELQqEcppt2JV 4g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpyry842s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxjmT031240; Wed, 24 Apr 2024 10:59:45 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpyry842p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O80l10023043; Wed, 24 Apr 2024 10:59:45 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xms1p36ve-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:44 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxd3131326964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:41 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5326E2004B; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F5602005A; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 04/13] lib: s390x: css: Dirty CC before css instructions Date: Wed, 24 Apr 2024 12:59:23 +0200 Message-ID: <20240424105935.184138-5-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pkm_wP3Vjx-iEJySQYpMre_w1PD6hng8 X-Proofpoint-ORIG-GUID: AVDiSsWJzYfXZE7k-3iIqdjE_sJTTmy6 X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 mlxscore=0 impostorscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=848 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Janosch Frank Dirtying the CC allows us to find missing CC changes when css instructions are emulated. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20240131074427.70871-4-frankja@linux.ibm.com Signed-off-by: Nico Boehr --- lib/s390x/css.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/s390x/css.h b/lib/s390x/css.h index 0a19324b..504b3f14 100644 --- a/lib/s390x/css.h +++ b/lib/s390x/css.h @@ -147,14 +147,16 @@ static inline int ssch(unsigned long schid, struct orb *addr) static inline int stsch(unsigned long schid, struct schib *addr) { register unsigned long reg1 asm ("1") = schid; + uint64_t bogus_cc = 1; int cc; asm volatile( + " tmll %[bogus_cc],3\n" " stsch 0(%3)\n" " ipm %0\n" " srl %0,28" : "=d" (cc), "=m" (*addr) - : "d" (reg1), "a" (addr) + : "d" (reg1), "a" (addr), [bogus_cc] "d" (bogus_cc) : "cc"); return cc; } @@ -177,14 +179,16 @@ static inline int msch(unsigned long schid, struct schib *addr) static inline int tsch(unsigned long schid, struct irb *addr) { register unsigned long reg1 asm ("1") = schid; + uint64_t bogus_cc = 2; int cc; asm volatile( + " tmll %[bogus_cc],3\n" " tsch 0(%3)\n" " ipm %0\n" " srl %0,28" : "=d" (cc), "=m" (*addr) - : "d" (reg1), "a" (addr) + : "d" (reg1), "a" (addr), [bogus_cc] "d" (bogus_cc) : "cc"); return cc; } @@ -252,28 +256,32 @@ static inline int rsch(unsigned long schid) static inline int rchp(unsigned long chpid) { register unsigned long reg1 asm("1") = chpid; + uint64_t bogus_cc = 1; int cc; asm volatile( + " tmll %[bogus_cc],3\n" " rchp\n" " ipm %0\n" " srl %0,28" : "=d" (cc) - : "d" (reg1) + : "d" (reg1), [bogus_cc] "d" (bogus_cc) : "cc"); return cc; } static inline int stcrw(uint32_t *crw) { + uint64_t bogus_cc = 1; int cc; asm volatile( + " tmll %[bogus_cc],3\n" " stcrw %[crw]\n" " ipm %[cc]\n" " srl %[cc],28" : [cc] "=d" (cc) - : [crw] "Q" (*crw) + : [crw] "Q" (*crw), [bogus_cc] "d" (bogus_cc) : "cc", "memory"); return cc; } From patchwork Wed Apr 24 10:59:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641729 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 12CA515991D for ; Wed, 24 Apr 2024 10:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956395; cv=none; b=YPwPRfDE/mwWK45wAPP4Ru2AsBnKK5I51O6X0HKNB0KydX4RQYWfqwMAoXDavnx8zLjqj5sGxN6Jb6mtcWEqqtwUyiWrskH6x4r3T9SrT7HHogwouMd69hfwCvNQod/nAPaaFRybyayzpLBNeyukEaptq+9apT2rd+szuprkezY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956395; c=relaxed/simple; bh=5GHvud91R/+TjKIusLZjhPUqwypwgKyHwSu2oVq6++k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nViGVB4JfzQdgL002q1QNlAR3f5C5GLqMTGFi0XEOk9kOdba7PhfyZOAsWnwPT+nl1IgtvrbM0z/XuOBt1VVR/R0yk3jfHcpfd7Pu1S3EhXdXxvJngIITkffPZ1wxs1KarFqbyo/vTMspZa7PUtnUFZak7kkBNSv9MvGNkL7jHs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=gyN1Exme; arc=none smtp.client-ip=148.163.158.5 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="gyN1Exme" Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAgeFX004720; Wed, 24 Apr 2024 10:59:47 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 : content-transfer-encoding : mime-version; s=pp1; bh=KUjVCGSp62aDhBYcY85JeQPvSrcqCTce9mepdvBb1SY=; b=gyN1Exmea7nYKK8SQ4yOvgV8Xh+8Jn/T0gjb0/qGTwOoxGOpKsC079B9YL2T9bkhtg0z mzYYpdYE90fn5IKUaK2v1Keg9e4qcacTxn2trRl7KylGUd1gPUrO2+SxLFmvs8dmG5ab S9Y+tu1gKaIDyIExQXlGE2HjJ7U9CvrBScAXF707NpuVwb6iiqQxZgFbHvMdiP+sw6jW lq/av4TcS6GhwKXOnYLDWj0g+6TRqVfwnO2ZrY/HnVs8Nxv2p18Iq6YNn6ImgF7ZjbaT CT1r/3A25FYozOtyTomFa6hHFksiYWQMV38wVvYL7PpYabicZe6WTKVK0cLNHbltPO9G ag== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jh813e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxkpw030228; Wed, 24 Apr 2024 10:59:46 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jh813c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O8P6Z8023068; Wed, 24 Apr 2024 10:59:45 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xms1p36vh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxdht25035398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:41 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 876642005A; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5996720063; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 05/13] s390x: mvpg: Dirty CC before mvpg execution Date: Wed, 24 Apr 2024 12:59:24 +0200 Message-ID: <20240424105935.184138-6-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mCjgdPYvV9cXbbbnBt9Fe2dput-jbBgK X-Proofpoint-ORIG-GUID: pij443DTl6Ee2qlNVfu1eKHLZ5TkNGPb X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 impostorscore=0 phishscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Janosch Frank Dirtying the CC allows us to find missing CC changes when mvpg is emulated. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20240131074427.70871-5-frankja@linux.ibm.com Signed-off-by: Nico Boehr --- s390x/mvpg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/s390x/mvpg.c b/s390x/mvpg.c index 296338d4..62d42e36 100644 --- a/s390x/mvpg.c +++ b/s390x/mvpg.c @@ -40,12 +40,14 @@ static uint8_t *fresh; static inline int mvpg(unsigned long r0, void *dest, void *src) { register unsigned long reg0 asm ("0") = r0; + uint64_t bogus_cc = 3; int cc; - asm volatile(" mvpg %1,%2\n" + asm volatile(" tmll %[bogus_cc],3\n" + " mvpg %1,%2\n" " ipm %0\n" " srl %0,28" - : "=&d" (cc) : "a" (dest), "a" (src), "d" (reg0) + : "=&d" (cc) : "a" (dest), "a" (src), "d" (reg0), [bogus_cc] "d" (bogus_cc) : "memory", "cc"); return cc; } From patchwork Wed Apr 24 10:59:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641730 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 6449315ADA1 for ; Wed, 24 Apr 2024 10:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956396; cv=none; b=VeT8LLZi65i187KOcdZ5ZJqqfFH1iCJaSZPWeQdRSMvvbMldyiBg+KGOg14UX/PqwaUDm0QfrXUZtkUyFrRcMaGf/mZ4mgwBNKgdWbYA6M6MIBRsxIAE40/Ltr9xGez/OhSJfv+OkWerHzfI5GDR4w4nyk5APRR3CvoN1Bqhgt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956396; c=relaxed/simple; bh=T3hQ0pGUWp3LDj20ElSQ/2wDS0WW7VisEfwk7hZF/n0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aixbmkEY2tYZz+JScx77NYZuqSTYW5jTD4D6EM6t7RZKtO3erjC4iNuS8n58jlVY6WIibOLNPeru7ntAQApa46J9dPdXXkfhL/4eOOGNOR1l0razF+4T1kiHpYxLyY7t2OabUT5fvY//n8ffvmCYVTShuqiPMyI1LHenB17dWKw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=QpaMxKBQ; arc=none smtp.client-ip=148.163.156.1 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="QpaMxKBQ" 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 43OAvVJF029601; Wed, 24 Apr 2024 10:59:46 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 : content-transfer-encoding : mime-version; s=pp1; bh=BIfjPSRUxMpVWmZtTX/JTXU6O5SAvTg1IKtvtbnNhzs=; b=QpaMxKBQMnHa6sK3lhUIrzRPzr5Sk75rMADa8SEYYLJ057W6uTHO9ZXd4AaXBT/w6wfJ KHVy3jB2XpzKLwNI/+1vJzgNlW+aqy+ap0TkKRPSuzMwS1XRZjP0BJYIzEhREYhomplb gE92JAT7y4WHnUSOf6AW0HReDXFlp7NY6aM3q6ZVzwud+Q1vNnMm0v23wNPNJpuXe7wO R+WIyFfM/Wv78A8x/wfanqux8d13+ZilUZW7UXHQKkuUb7SrTeARLbFk+9Yl+vH8NQF4 HuLXek9VKB7QWJ9ZAp1sWEmC8z0xOGQIdKQVf6SXE2KtDaGguk5pXyCtg9rNssvSxjY2 cA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0sb004f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +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 43OAxkNb000461; Wed, 24 Apr 2024 10:59:46 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 3xq0sb004a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +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 43O9jsXw005736; Wed, 24 Apr 2024 10:59:45 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xmx3chxwr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxdLi32637536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:41 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C103020063; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92A5220065; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 06/13] s390x: sclp: Dirty CC before sclp execution Date: Wed, 24 Apr 2024 12:59:25 +0200 Message-ID: <20240424105935.184138-7-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 2HjqeO839CWlBOxVN5O8jIkA6vMYk8I3 X-Proofpoint-ORIG-GUID: 4Awi9KOK5HEDoVPBn_6FnArGFxlfCBq- X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 impostorscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Janosch Frank Dirtying the CC allows us to find missing CC changes when sclp is emulated. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20240131074427.70871-6-frankja@linux.ibm.com Signed-off-by: Nico Boehr --- s390x/sclp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390x/sclp.c b/s390x/sclp.c index ccbaa913..53fce0cf 100644 --- a/s390x/sclp.c +++ b/s390x/sclp.c @@ -399,6 +399,7 @@ out: static void test_instbits(void) { SCCBHeader *h = (SCCBHeader *)pagebuf; + uint64_t bogus_cc = 1; int cc; sclp_mark_busy(); @@ -406,10 +407,12 @@ static void test_instbits(void) sclp_setup_int(); asm volatile( + " tmll %[bogus_cc],3\n" " .insn rre,0xb2204200,%1,%2\n" /* servc %1,%2 */ " ipm %0\n" " srl %0,28" - : "=&d" (cc) : "d" (valid_code), "a" (__pa(pagebuf)) + : "=&d" (cc) + : "d" (valid_code), "a" (__pa(pagebuf)), [bogus_cc] "d" (bogus_cc) : "cc", "memory"); /* No exception, but also no command accepted, so no interrupt is * expected. We need to clear the flag manually otherwise we will From patchwork Wed Apr 24 10:59:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641728 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 12D0315A480 for ; Wed, 24 Apr 2024 10:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956395; cv=none; b=FLbV65bIcsis+v8CvI3zbR8ekxBZe2wgoBj8sHqs0VyDbuGUKbqS9G2a2KdIaZiBhXW6C/8g3PpeD9hcZa8L53W0EU+Ts0MQ9aTI0AlfeHvi8li6La4ExzxBmAWcveEEYO92119OE5X4kcoXUCfixBHQA++dTb+lYp1xZy/oV0E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956395; c=relaxed/simple; bh=Pocx0Ac2KFd123ZtHKXIIHFrLAEo3kRCBrnyBlErJsc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eYZ3gwiDOqk2BGgtaJ3UjQDJDNI7HyDd+b129UWmAXOpYB0UYJjoMSmqrlyl213D7DR2HCDrEdIOBkeGYu/gT75IMED89avAU9S9kVRFv8tH4+tSu4FwWWj8SQfRHvNz4fxPG5LIghcXNn9WdTzLYFpmaON1IgdRky7sOSzY5nk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=eIUmk+Yi; arc=none smtp.client-ip=148.163.158.5 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="eIUmk+Yi" Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43O9oF7q027920; Wed, 24 Apr 2024 10:59:47 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=Rh5dRRJbz3JIe63PAb5Dn6xc7dI/Yc3pMP4QPoDh3xo=; b=eIUmk+Yi1JX3hvnnvSUEqoYYqK3onXPDebkx9KhabqJAU1sxzUL+F/f9zozPRmu2kf/0 IMGL9h//aKa6GcCOub9bGJVp8vf/gYiDRFV12qjgJbhwO9KVzHfcI7+xk+UwQyvuPmXb 7u7FZk6iU9omW34Hj9mq45A6CubNcZ0dST+mGgbQ+8qqiwVoS2sdY/tvFO+ijZe0HD7g 3QBnbCgYKoB6U5L9eB88xdhy6Fp2vBOZ34HGv/H/Z+rp9XUIKPupXCbd6+xaCmEll+sE KvEiCmrWTEnApYMLNEf0/QOsFauX/U0QBtUxjrOAiMmL5pGQjwB014rUYBBXFlvj2pDl XA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpyry842x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxkjv031252; Wed, 24 Apr 2024 10:59:46 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpyry842t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O7cCYZ023012; Wed, 24 Apr 2024 10:59:45 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xms1p36vj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxeZX47776110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:42 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 011F020065; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7C0720067; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 07/13] lib: s390x: sigp: Name inline assembly arguments Date: Wed, 24 Apr 2024 12:59:26 +0200 Message-ID: <20240424105935.184138-8-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@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: 75eVUYnmzNudqhGr1ewzC7CvD4DK1bBy X-Proofpoint-ORIG-GUID: bArCH_7UJ_JZ3l5yNE-McC6aW5POjDCO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 mlxscore=0 impostorscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Janosch Frank Less need to count the operands makes the code easier to read. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Signed-off-by: Nico Boehr --- lib/s390x/asm/sigp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/s390x/asm/sigp.h b/lib/s390x/asm/sigp.h index 4eae95d0..c9af2c49 100644 --- a/lib/s390x/asm/sigp.h +++ b/lib/s390x/asm/sigp.h @@ -54,11 +54,11 @@ static inline int sigp(uint16_t addr, uint8_t order, unsigned long parm, asm volatile( " tmll %[bogus_cc],3\n" - " sigp %1,%2,0(%3)\n" - " ipm %0\n" - " srl %0,28\n" - : "=d" (cc), "+d" (reg1) - : "d" (addr), "a" (order), [bogus_cc] "d" (bogus_cc) + " sigp %[reg1],%[addr],0(%[order])\n" + " ipm %[cc]\n" + " srl %[cc],28\n" + : [cc] "=d" (cc), [reg1] "+d" (reg1) + : [addr] "d" (addr), [order] "a" (order), [bogus_cc] "d" (bogus_cc) : "cc"); if (status) *status = reg1; From patchwork Wed Apr 24 10:59:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641736 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 DCDEF15B13B for ; Wed, 24 Apr 2024 10:59:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956400; cv=none; b=ckKY3Z7ga4ulaJcx9yM8ai+v/mCC4KXvBTqiNbcqCbxzPTwWJ8NMd8zw8sYcKdpxskLdB+uaswinRpXcoo/DB3trXGsLjB+Fli9T24NweSdpbpwuyR1YnWeigpryC8Rs8O1x5I1HDrPc91UAP3YcJPP7mPv/aj6STmm2xILKKy0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956400; c=relaxed/simple; bh=+AeKnnQMKECDOKFcK0V6lZgf6pvUivRxvhO6ILY3fnw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=laAPq/VPUgHTiNTsY+VoJG/FQBSQpR0+MFMf2VEv3n5Gpfld6A8AlE9+ADbHLBTBV08pfZ+6lHrKG6wzjaTBkBlxUTMmV00UAOgetg3om33bik603p1r9UHXUbL+A/Q/zGso4G5vXWaMTTxySKAmN5AsPQwLE9ppt295cBnG/0E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=QHLE6bUq; arc=none smtp.client-ip=148.163.156.1 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="QHLE6bUq" Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAdwD8014746; Wed, 24 Apr 2024 10:59:50 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 : content-transfer-encoding : mime-version; s=pp1; bh=psZLDuBo7k6QuKOK+9njydy/ztQa22zUioypJT3sums=; b=QHLE6bUqtn7UiCPppcG6Sm3x73A2QFfLC00a1C/4K1Dcr9NTHEGdiD3rllzKgZMDYJVy Z3oATPaTpyWaItX96bGJIhk7vvM3zOdgWA2JeR22WUWbkwBVcmyAx5FQW8jx6tsCkvoY 6w1hJcXE/thRFZu6qoJ/sDkAC83CWGubIZJ7yfqSr2Kd5mlSESqBSZJxUrh51aO3V9R4 nPCPLQoV5SA5LCXsieUWrwuIvPjX2mqcyt74p8jP5oiUZcTi4krZ+xgeR8eT/926OdxG t4rbQEmSGgheiwusPrrULQyg6DBm8f4vWwXLF42QhT8PehLovt2RIw5beDJprAorYBos KA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpy12g6xt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:50 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxos0015491; Wed, 24 Apr 2024 10:59:50 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpy12g6xr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:49 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O8rcbX015299; Wed, 24 Apr 2024 10:59:48 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xmshmb25d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:48 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxh5Y51118414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:45 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 35D8820067; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 084F82006A; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:39 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 08/13] s390x: add pv-attest to unittests.cfg Date: Wed, 24 Apr 2024 12:59:27 +0200 Message-ID: <20240424105935.184138-9-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Uvn8KpEMLGZz8hLCnY2PbAnMqHqlNSnM X-Proofpoint-ORIG-GUID: 4NsEBZX7fYjN9MGwV6e72ygemfmbs4wm X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 adultscore=0 priorityscore=1501 mlxscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 There seems to be no obvious reason why it shouldn't be there. Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20240201100713.1497439-1-nrb@linux.ibm.com Signed-off-by: Nico Boehr --- s390x/unittests.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/s390x/unittests.cfg b/s390x/unittests.cfg index 3fb9e875..3a9decc9 100644 --- a/s390x/unittests.cfg +++ b/s390x/unittests.cfg @@ -389,3 +389,6 @@ extra_params = """-cpu max,ctop=on -smp cpus=1,drawers=2,books=2,sockets=2,cores [sie-dat] file = sie-dat.elf + +[pv-attest] +file = pv-attest.elf From patchwork Wed Apr 24 10:59:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641731 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 B2A3E15991A for ; Wed, 24 Apr 2024 10:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956397; cv=none; b=MFXJiwdOJHXqjC4MW85QVzohnA7M6QOJWYWHyP4ew4ETqWZ7Fbqi+Wknn860XqNrzdTgPskihBHq9AUbMjrXfBxT+mWMaTjbgNi88a+B4BdpMjLkVYcH8VWbVxwWk8JV79UBDUCHOif957T1heMfq/sCP44hLRFbgg5qiSzmfQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956397; c=relaxed/simple; bh=JEObXw7LlQNxZNkdRLC+07jQhbjyaKsvK4MekDgKmco=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nn2SmTZl1CqtxwCHCKjZ5aRVrwq3SNXNbZJgJynlOVY3cHsjgBg+oBQO+yMWAwJFkM28JeKLSGmK6RWVoWjjUjZjAeLEXnW+SsTqEYszKG1db4YHRg2O9PlmR9h2lyvugWXK4x/WbGiJ1legNKpOZzimM/64stBvJpDBvklkpeI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=qlNPJEXU; arc=none smtp.client-ip=148.163.156.1 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="qlNPJEXU" 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 43OAvgov029766; Wed, 24 Apr 2024 10:59:47 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=tZy76LyIi/efz/j6OfXzjjkPYzS7V3dBrjZmCT9R7Ik=; b=qlNPJEXUQwT8+KMEg+lUhy0MJMu10hZaQIS/Uv2WHmhbBfv1acBq25HuYgFDgvn5Krg4 DsdEZTZNU3dp/iIGIKH+Dns1AIRA1/6REBSApzBR3H6KPVVCwpCqVfLlR30UTS4HIHAs 4zH5pov1oAAByGuWOQTJ0A2AOGA/UfrY9/lSh3jYAYuXR+KfAkRHnkXhddke3CmfKe+z VTIDosThKah3lqVZ8DiXbwQarue922Y51pq0eEHYTQ0fHuiAsWOhgh0osIlHSePb6euT s/nYANEF49l41QDCNs1uZKbcpChWZdLkdwBqjvQfHoBTGI10HDj0jiN2PdFa6YyqKHEc Uw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0sb004h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:47 +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 43OAxkXL000469; Wed, 24 Apr 2024 10:59:46 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0sb004c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAlMfm029929; Wed, 24 Apr 2024 10:59:45 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xmr1tkeg0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:45 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxekY51380600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:42 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F3822006A; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E0082006C; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com, Christian Borntraeger Subject: [kvm-unit-tests GIT PULL 09/13] s390x: emulator: Fix error path of invalid function code Date: Wed, 24 Apr 2024 12:59:28 +0200 Message-ID: <20240424105935.184138-10-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@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: VTTlHycDWiZnJ49X_ZDs5Rs-wwskEUu2 X-Proofpoint-ORIG-GUID: dOB1q5EA-MKMt4TQoSGsJKLIWPSVl-Pc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 impostorscore=0 mlxlogscore=910 mlxscore=0 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Christian Borntraeger When 127 is not an invalid function code we should not wait for the program check. Move this check into the else branch. Signed-off-by: Christian Borntraeger Signed-off-by: Nico Boehr --- s390x/emulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390x/emulator.c b/s390x/emulator.c index 2c42f96f..5a5a3edb 100644 --- a/s390x/emulator.c +++ b/s390x/emulator.c @@ -130,8 +130,8 @@ static __always_inline void __test_cpacf_invalid_func(unsigned int opcode) report_skip("127 not invalid"); } else { __test_cpacf(opcode, 127, 2, 4, 6); + check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); } - check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); report_prefix_pop(); } From patchwork Wed Apr 24 10:59:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641724 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 E5AD11598FA for ; Wed, 24 Apr 2024 10:59:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956393; cv=none; b=W050UXi+PX2nCVvlJC4InqdvBC3w8Hpdb+WxkqIUvXJIdfO7raD04mVXVqy6DUJ0mTuFicszzQy324/5tHOoVvmxMibJrR2OG8MdcOGZP8HzhpLyjUzwrsmgzi00a2YPjzeulZZEUl2Ca9N225UT2Pv7YWCpXY82Dm9+T2pH8rI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956393; c=relaxed/simple; bh=o7USaYeVPVK0g01NOIl8VSnZQOpu7dw+TC1uB+Vfp8k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CbgIMXzhvDHQ61hanwykcXA2K9SR7QF0rupA9m+hf4lWUkV1HZ3VlVGwrY1wxhyboLP3JF7Tgt+cc7jEbCqO9go8JbkbQfoXX8/B+ewfepz5z/qlb33Z8BXH+ev8iUkKpdnCT5yjKdQAvXwiLCUfT03dTCrNXxXJ05hJqP3dC5U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=iViOsoNu; arc=none smtp.client-ip=148.163.158.5 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="iViOsoNu" Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAjDSs008323; Wed, 24 Apr 2024 10:59:47 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=6YsTXc+zYHihPnTz1e2cseegNy0pYRGbAuq00a2OkEo=; b=iViOsoNuhz0McHWv8pztdOGI0J25+9vp9hNd+YtNRmWVpknuQTmSmZmiVmfH6DUWwM1J PwFOrvr7TVzo133zQA3BONxt90MavUmtWprRgVfIqhUnNl9MnZRCuffINdBYIcmSreBh N0FZXTMqqN8iCIaKQxHePXP6tFXylT5APmSaLnQIAdBrjdBrDumjAmVu4JYeuyhLSnYn yvukBQJ8rPsxjTfwwH1s5cX5Wetipfgup7vJFce/euHFkqJzvmSIscjNtWFbwsUtrOt1 2+ZCbpI7WQsYvJVG8xjbB+6sRF5/OfsV39FJeRCFqUW1UY/UjQ8CjSvLhiLDzn8TOesP 8A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jh813g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:47 +0000 Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxkQ8030239; Wed, 24 Apr 2024 10:59:46 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jh813f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O7cCYa023012; Wed, 24 Apr 2024 10:59:46 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xms1p36vm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxeOH40763748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:42 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0A542006C; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 78D762006E; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com, Nicholas Piggin Subject: [kvm-unit-tests GIT PULL 10/13] s390x: Fix is_pv check in run script Date: Wed, 24 Apr 2024 12:59:29 +0200 Message-ID: <20240424105935.184138-11-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@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: 8gXJqliP8jtiz577d1-sQfeT9qWZmAIg X-Proofpoint-ORIG-GUID: qoe48LZVJOg7RYK4paotC8rczzIIcxSz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 impostorscore=0 phishscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Nicholas Piggin Shellcheck reports "is_pv references arguments, but none are ever passed." and suggests "use is_pv "$@" if function's $1 should mean script's $1." The is_pv test does not evaluate to true for .pv.bin file names, only for _PV suffix test names. The arch_cmd_s390x() function appends .pv.bin to the file name AND _PV to the test name, so this does not affect run_tests.sh runs, but it might prevent PV tests from being run directly with the s390x-run command. Reported-by: shellcheck SC2119, SC2120 Reviewed-by: Andrew Jones Signed-off-by: Nicholas Piggin Signed-off-by: Nico Boehr --- s390x/run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/s390x/run b/s390x/run index e58fa4af..34552c27 100755 --- a/s390x/run +++ b/s390x/run @@ -21,12 +21,12 @@ is_pv() { return 1 } -if is_pv && [ "$ACCEL" = "tcg" ]; then +if is_pv "$@" && [ "$ACCEL" = "tcg" ]; then echo "Protected Virtualization isn't supported under TCG" exit 2 fi -if is_pv && [ "$MIGRATION" = "yes" ]; then +if is_pv "$@" && [ "$MIGRATION" = "yes" ]; then echo "Migration isn't supported under Protected Virtualization" exit 2 fi @@ -34,12 +34,12 @@ fi M='-machine s390-ccw-virtio' M+=",accel=$ACCEL$ACCEL_PROPS" -if is_pv; then +if is_pv "$@"; then M+=",confidential-guest-support=pv0" fi command="$qemu -nodefaults -nographic $M" -if is_pv; then +if is_pv "$@"; then command+=" -object s390-pv-guest,id=pv0" fi command+=" -chardev stdio,id=con0 -device sclpconsole,chardev=con0" From patchwork Wed Apr 24 10:59:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641735 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 221DB15B120 for ; Wed, 24 Apr 2024 10:59:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956399; cv=none; b=BFw9ICdmVSClGValX+FNHKCwV/3YfE4AvWW4w6+xO0qnTDERygA2dTGZuPc02vSLLKJjX9oqydPT5klSA5JEIrT4PDaoign7dMG/8hG1nPh0PlhQNlR4FUR/u/QqKbsCQduXZGYQ43zc407QSipczyLJ/RPZbVFPrCQKO1zHD60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956399; c=relaxed/simple; bh=R7qBm11C/SwM/j2AS6smYZ57mEemXCA02PMH88ZRrEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PnoK3GEFrXAmbWhaFX6xuSG0PLQx84L6CBXjM1hON/B1LRMyOgzDDfRUvwOb+6oSrSksjLQq+b/TRVtGXG6ZIsESO1K2aClNXBQPtsBUvr3CLxg7t6OtUyRzpOFXHtxecJGU+nHwLvirCPuRpnawryQLjYfZWNrMKNJwTkvcPhk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=dMb84oFC; arc=none smtp.client-ip=148.163.156.1 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="dMb84oFC" Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAh1PR008709; Wed, 24 Apr 2024 10:59:50 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 : content-transfer-encoding : mime-version; s=pp1; bh=C4qxAaEfbFgEKYr19MzNR67kVgY/GBO8EZ9KvJmZobg=; b=dMb84oFCVuBPyuZL4wuePifVZ/lZbz95TOtNkO9BPOSjach3y8B2erc0idKHynEB+ups yBwY2VEbYIdZ1E9sMjQ7sfMVe+bsbm7ClEPw/J8dILamv/GFoaJcSLQeumLalrb7MZi4 I7VqfXwXVz7L1C6eoneqWSAsGJPRRmUx3gtN2WBnmPJtRuf1rQjWikil6OpFXoVdOVk8 SxAjkxTM/kiHm/0wDQ1Ro0GJGvmydanja0j6uEOSEcaO21zhzDAplACz+39XdOivsIHe c23LdrZRbzzogTsIE8ssFSGvW0hy5aPPIVSGIFHdiZrdquLyCbcd3Wq2QFDecwfpNN6a Ag== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jb80wt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:49 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxnDA002203; Wed, 24 Apr 2024 10:59:49 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0jb80wq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:49 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O7Xsrm021021; Wed, 24 Apr 2024 10:59:46 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xmre03afr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxe0Z51118412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:42 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D06552004D; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A960D20071; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com, Nicholas Piggin Subject: [kvm-unit-tests GIT PULL 11/13] s390x: Use local accel variable in arch_cmd_s390x Date: Wed, 24 Apr 2024 12:59:30 +0200 Message-ID: <20240424105935.184138-12-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: s1DLynq8diOSSAT1VS7okYqYv_wfQpbP X-Proofpoint-GUID: q74tRNwjzEvsEs5CZ6wqstooWeuacahm X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 phishscore=0 malwarescore=0 impostorscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Nicholas Piggin By the time we end up in arch_cmd_s390x() the global ACCEL variable has already been processed and is passed to arch_cmd_s390x() as an argument. We should use the local argument to achieve the correct behavior and not rely on global variables. Fix this by changing ACCEL to lower case. Reported-by: shellcheck SC2153 Reviewed-by: Andrew Jones Acked-by: Janosch Frank Signed-off-by: Nicholas Piggin Link: https://lore.kernel.org/r/20240406122456.405139-2-npiggin@gmail.com Message-ID: <20240406122456.405139-2-npiggin@gmail.com> [frankja@linux.ibm.com: Improved commit message] Signed-off-by: Janosch Frank --- scripts/s390x/func.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/s390x/func.bash b/scripts/s390x/func.bash index 6c75e89a..fa47d019 100644 --- a/scripts/s390x/func.bash +++ b/scripts/s390x/func.bash @@ -21,7 +21,7 @@ function arch_cmd_s390x() "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout" # run PV test case - if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; then + if [ "$accel" = 'tcg' ] || grep -q "migration" <<< "$groups"; then return fi kernel=${kernel%.elf}.pv.bin From patchwork Wed Apr 24 10:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641733 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 4957215A492 for ; Wed, 24 Apr 2024 10:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956397; cv=none; b=fn1Zii0mpboBLO8YBEkW+zYNPXG4Cb77okmsxdo9jIFeqL4eL57+EeH83In1ALUzhymYXaxIM/RA0HPeFtU4pfZx4aHFZ78/K2T1SpSSeV3cwnoPxX74KFsr3OFjh1uTQleFXR91ZSo04mmawxqIR8obX4q+rdw3ALjJT79J4NU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956397; c=relaxed/simple; bh=PlvHQCRrR3gCxl/GzZFcIhsa+ijU6S3mD8g/1OmsUzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lGx4mMNRrCgkNkuTr+wrncZWpo32pWx3MBmAucNLFnAqn2s2a/06sSEY1lEmoUzgTI7OBQKVqsi8sgcJVFbR4yKnegZsU75dg7ZGQpvvlHYRhRUkVscrva+ZqnZ6DeAUMF1r0JPUUnspou4AjumvuRyXQgTXXU0tOEVijMfQqjQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=aKRBmvzR; arc=none smtp.client-ip=148.163.156.1 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="aKRBmvzR" Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAsXkb006810; Wed, 24 Apr 2024 10:59:48 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 : content-transfer-encoding : mime-version; s=pp1; bh=soz8Hl5pG2vWUWFe9/WqiFW0AWglRDFBfa50LY/AZyU=; b=aKRBmvzRFKardYC8w4oTpdTd8jYEENz+3TITw0AVm4/br32dHV47d2UaNVVlBQP3uS7x Tha7xEIAoronn+n29cjyQ3FZvBLt2wQCS6Y00qqjAGaP/vQvA5BtAe49AJEMQLgPtw/a 3yfGuqzc4Qs5DxPIn6zSRvBwau2S02ZTSx9fJMeg22jkgfgUXZRQhHdA/qGEYv+dXw2+ oYBaEqcFK5YEcYVEo9qQEG3YPAnwPkuLfQyo9ngTkou8qzC/uJQk/h3QZOIrHVuqZGwY PZa8BjJ9Q1nAnKWeeLbUe4JwMZMg2xxRVJk7+RrS0Y9lelmKZGsmip8rLHcb/cuSn0B3 jA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpy12g6xn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:47 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAxlVp015390; Wed, 24 Apr 2024 10:59:47 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xpy12g6xj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:47 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAUtsW029873; Wed, 24 Apr 2024 10:59:46 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xmr1tkeg1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxfvM50594072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:43 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 117952006E; Wed, 24 Apr 2024 10:59:41 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D83A120043; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:40 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 12/13] lib: s390: fix guest length in uv_create_guest() Date: Wed, 24 Apr 2024 12:59:31 +0200 Message-ID: <20240424105935.184138-13-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 0zxm9l80RyFoba_lJTflT-mkC_b6bD-p X-Proofpoint-ORIG-GUID: xAPBke_NKZgO4VBftpQFmKDQI4p8Cqne X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 adultscore=0 priorityscore=1501 mlxscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 From: Claudio Imbrenda The current code creates secure guests with significantly more memory than expected, but since none of that memory is ever touched, everything still works. Fix the issue by specifying the actual guest length. The MSL does not contain the length of the guest, but the address of the last 1M block of guest memory. In order to get the length, MSO needs to be subtracted, and 1M needs to be added. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20240418110140.62406-1-imbrenda@linux.ibm.com Signed-off-by: Nico Boehr --- lib/s390x/uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/s390x/uv.c b/lib/s390x/uv.c index 23a86179..723bb4f2 100644 --- a/lib/s390x/uv.c +++ b/lib/s390x/uv.c @@ -146,7 +146,7 @@ void uv_create_guest(struct vm *vm) int cc; uvcb_cgc.guest_stor_origin = vm->sblk->mso; - uvcb_cgc.guest_stor_len = vm->sblk->msl; + uvcb_cgc.guest_stor_len = vm->sblk->msl - vm->sblk->mso + SZ_1M; /* Config allocation */ vsize = uvcb_qui.conf_base_virt_stor_len + From patchwork Wed Apr 24 10:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13641725 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 D9AB615991A for ; Wed, 24 Apr 2024 10:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956394; cv=none; b=eYv7hfu362RxNEZ0pwfEijw5QrxcB41p+w7qzTqyfu11AGFX6hFw9tiRXJNUqlvC2RUrXP3nkf1VLd5BMrOpxjr03Mb+UkLXVnDqSPNN/XPJcKtQ7jvutkuOWkKMtFOIChBItd8J+m3SRO8ptSpyGNOcZCAAbaadw63ZriDpabU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713956394; c=relaxed/simple; bh=GszjFVTPbxBJaIEozULNa0CaPgNFwiZ0+s1li8lvADk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pbqSsV6Fy2it4ge/lnphJZMtqRR8L+mXPczcKfh+dQLeYAfHODQBgYdm9J2bsIdEe3MhaDJnQqkL14kax0ghdBZwJgu5KGstGemVFr9Rlfovd93AeGuTRF0LuOnH4Apt3Zlng4J2LZHytXooSs74YHh0TBro0lvZa2pfhnqkMBU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=duC5P2Ha; arc=none smtp.client-ip=148.163.158.5 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="duC5P2Ha" Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43OAxmuT031431; Wed, 24 Apr 2024 10:59:48 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 : content-transfer-encoding : mime-version; s=pp1; bh=rGpE5/gD1g0K9bvoFTaMxU6u4gvU9v8lLD0V3l1xQPo=; b=duC5P2HaJ/h4fWvQlTo24dSEXEr7Yu67KT5/7vEINv8guqwTMYzT2sdGYY+yjwJpc8Y9 Ue+R8PcEI+1BgSPQdvLFPhZfsfUrAswZBzKey84xJVQ56P2Eudl1CvDSS9NpO76zpwAL yv7BfOBXpzhba1BfFPyTR/L4dcThJdGHlb19xGUOPxF3NKhmXEheU5BNoLpm1DE27QVv 5ASompITZZuBLwIhYpQoGBCxABHG/Iqn9lKDq8XzceJa4g81QW2CGUh4FgmOMbzusiwC 8LO/10ObDFzpqPeI8NjSUyMdhmqe9HpPBy842hLvT7q3bybcsI0XplfRUu+pbhseKu+1 sA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0pbg0kq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:48 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 43OAtwiX026536; Wed, 24 Apr 2024 10:59:47 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xq0pbg0kn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:47 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43O8C4C8015343; Wed, 24 Apr 2024 10:59:47 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xmshmb25b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 10:59:46 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43OAxfHT50856372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2024 10:59:43 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3DE2020043; Wed, 24 Apr 2024 10:59:41 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 192602004E; Wed, 24 Apr 2024 10:59:41 +0000 (GMT) Received: from t14-nrb.boeblingen.de.ibm.com (unknown [9.152.224.21]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 24 Apr 2024 10:59:41 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com Subject: [kvm-unit-tests GIT PULL 13/13] s390x: cmm: test no-translate bit after reset Date: Wed, 24 Apr 2024 12:59:32 +0200 Message-ID: <20240424105935.184138-14-nrb@linux.ibm.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424105935.184138-1-nrb@linux.ibm.com> References: <20240424105935.184138-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Ow4qSG-cK0plLmbpgXuOWUfCyGLREEHa X-Proofpoint-GUID: r6OxlulpAbFEXf23bYN6vNbZBhFz_89B X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_08,2024-04-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 priorityscore=1501 adultscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404240045 KVM did not properly reset the no-translate bit after reset, see https://lore.kernel.org/kvm/20231109123624.37314-1-imbrenda@linux.ibm.com/ Add a test which performs a load normal reset (includes a subsystem reset) and verify that this clears the no-translate bit. Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20240423103529.313782-2-nrb@linux.ibm.com Signed-off-by: Nico Boehr --- s390x/cmm.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/s390x/cmm.c b/s390x/cmm.c index af852838..536f2bfc 100644 --- a/s390x/cmm.c +++ b/s390x/cmm.c @@ -9,13 +9,17 @@ */ #include +#include #include #include #include #include +#include static uint8_t pagebuf[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE))); +extern int diag308_load_reset(u64); + static void test_params(void) { report_prefix_push("invalid ORC 8"); @@ -35,6 +39,35 @@ static void test_priv(void) report_prefix_pop(); } +static void test_reset_no_translate(void) +{ + const uint64_t mask_no_translate = BIT(63 - 58); + unsigned long state; + + if (!test_facility(147)) { + report_prefix_push("no-translate unavailable"); + expect_pgm_int(); + essa(ESSA_SET_STABLE_NODAT, (unsigned long)pagebuf); + check_pgm_int_code(PGM_INT_CODE_SPECIFICATION); + report_prefix_pop(); + return; + } + + report_prefix_push("reset no-translate"); + essa(ESSA_SET_STABLE_NODAT, (unsigned long)pagebuf); + + state = essa(ESSA_GET_STATE, (unsigned long)pagebuf); + report(state & mask_no_translate, "no-translate bit set before reset"); + + /* Load normal reset - includes subsystem reset */ + diag308_load_reset(1); + + state = essa(ESSA_GET_STATE, (unsigned long)pagebuf); + report(!(state & mask_no_translate), "no-translate bit unset after reset"); + + report_prefix_pop(); +} + int main(void) { bool has_essa = check_essa_available(); @@ -47,6 +80,7 @@ int main(void) test_priv(); test_params(); + test_reset_no_translate(); done: report_prefix_pop(); return report_summary();