From mboxrd@z Thu Jan 1 00:00:00 1970 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 139B722688E; Thu, 6 Feb 2025 10:36:23 +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=1738838185; cv=none; b=fI4rnxXxH8DagX9HPIWyiEvbJs0M3FVvz7i/yjNapjY/o5US4BN4ipOc7VvOOULslHeCwlwffdf4dxiScG5XR4DYWJQ/Zcv2uyC6NbSgGGg7Ru+YigBbE+G0gdCrgKuBVjM/XICOmrhniEp3HZnwJ1I1+qdVAS0t4GuZUGa57Mc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738838185; c=relaxed/simple; bh=7jW+jJJ55vr1XlVv1lX+6LDZ3W0lCWCZB9+pWQjzsFA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nRhxjZj9wXfJ73Zsm7sKrA8ACK/djLbHKJn72i9g7zPDTidvvQiA8LPdbx950lz2bJnGdMzWhAsyKFU9DuncCTgAfibaEYAGs3YxO02ueSKSIDpJmmyjrPo/e1eguOYYtmWXL9/HE2KxUkGXN4FU3cXUzeNysQHlTXONsG8tVtA= 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=QUWjNInt; 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="QUWjNInt" Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5167XMwF006049; Thu, 6 Feb 2025 10:36:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=TpI8xW jRHPhMYDpNdxLdetl+H3i5Dexxi9Sy4F1fz1A=; b=QUWjNIntA8Pfx9p8jwWefm PJwPppfEn/eheMgmUrfMpUg5gmJ7Q+gidN3SK8yK76pftUS/yZNIgnv+SfdhXWD/ Wx8HjIXb13rXT2Br9o00nQXU/KcTuTlE4gUXHMOaZ2nsCoruyBFqQvR+dhOOmrpm H/W2w6nJ6cVQten2P779T5ywKHLbN6I+UUi2CEWO7vshFoV5TPzcH+cyBe8ku5By nKypoDPxyEx8vb2pAl+kBPstV41O6W00/BV9nUIvRsOAkb9LPE7UJFm96uUoZ3fg s7A/+xQTkEUe13Bxsp2S1IBz6Qhj1cjZirn1JRjz1a7J3Rnrzpwz9kZXxC1Vh3Rg == 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 44mrsp0u3x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Feb 2025 10:36:17 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 5167l6Ma006535; Thu, 6 Feb 2025 10:36:16 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 44hyeknpvt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Feb 2025 10:36:16 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 516AaC0Z38666730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Feb 2025 10:36:12 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 541C820069; Thu, 6 Feb 2025 10:36:12 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 146AF20043; Thu, 6 Feb 2025 10:36:12 +0000 (GMT) Received: from [9.171.20.23] (unknown [9.171.20.23]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 6 Feb 2025 10:36:12 +0000 (GMT) Message-ID: <97262c67-b04e-4015-a081-f1024e8a31a2@linux.ibm.com> Date: Thu, 6 Feb 2025 11:36:11 +0100 Precedence: bulk X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [kvm-unit-tests PATCH] lib: s390x: css: Name inline assembly arguments and clean them up To: Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, nrb@linux.ibm.com, hca@linux.ibm.com References: <20250204100339.28158-1-frankja@linux.ibm.com> <20250205112550.45a6b2cd@p-imbrenda> Content-Language: en-US From: Janosch Frank Autocrypt: addr=frankja@linux.ibm.com; keydata= xsFNBFubpD4BEADX0uhkRhkj2AVn7kI4IuPY3A8xKat0ihuPDXbynUC77mNox7yvK3X5QBO6 qLqYr+qrG3buymJJRD9xkp4mqgasHdB5WR9MhXWKH08EvtvAMkEJLnqxgbqf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fNgWxZF8rVjeVl/9PBfy01K 8R0hajU40bWtXSMiby7j0/dMjz99jN6L+AJHJvrLz4qYRzn2Ys843W+RfXj62Zde4YNBE5SL jJweRCbMWKaJLj6499fctxTyeb9+AMLQS4yRSwHuAZLmAb5AyCW1gBcTWZb8ON5BmWnRqeGm IgC1EvCnHy++aBnHTn0m+zV89BhTLTUal35tcjUFwluBY39R2ux/HNlBO1GY3Z+WYXhBvq7q katThLjaQSmnOrMhzqYmdShP1leFTVbzXUUIYv/GbynO/YrL2gaQpaP1bEUEi8lUAfXJbEWG dnHFkciryi092E8/9j89DJg4mmZqOau7TtUxjRMlBcIliXkzSLUk+QvD4LK1kWievJse4mte FBdkWHfP4BH/+8DxapRcG1UAheSnSRQ5LiO50annOB7oXF+vgKIaie2TBfZxQNGAs3RQ+bga DchCqFm5adiSP5+OT4NjkKUeGpBe/aRyQSle/RropTgCi85pje/juYEn2P9UAgkfBJrOHvQ9 Z+2Sva8FRd61NJLkCJ4LFumRn9wQlX2icFbi8UDV3do0hXJRRYTWCxrHscMhkrFWLhYiPF4i phX7UNdOWBQ90qpHyAxHmDazdo27gEjfvsgYMdveKknEOTEb5phwxWgg7BcIDoJf9UMC In-Reply-To: <20250205112550.45a6b2cd@p-imbrenda> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: cnISBjORZT-fdvuBECGdppWE3lN-SIp9 X-Proofpoint-ORIG-GUID: cnISBjORZT-fdvuBECGdppWE3lN-SIp9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-06_02,2025-02-05_03,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 adultscore=0 spamscore=0 phishscore=0 priorityscore=1501 mlxlogscore=999 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502060086 On 2/5/25 11:25 AM, Claudio Imbrenda wrote: > On Tue, 4 Feb 2025 09:51:33 +0000 > Janosch Frank wrote: > >> Less need to count the operands makes the code easier to read. >> >> Signed-off-by: Janosch Frank >> --- >> >> This one has been gathering dust for a while. >> rfc->v1: Moved to Q constraint (thanks Heiko) >> >> --- > > [...] > >> asm volatile(" .insn rre,0xb25f0000,%2,0\n" >> - " ipm %0\n" >> - " srl %0,28\n" >> - : "=d" (cc), "=m" (p) >> + " ipm %[cc]\n" >> + " srl %[cc],28\n" >> + : [cc] "=d" (cc), "=m" (p) >> : "d" (p), "m" (p) > > this bit (which you did not touch) is actually the most confusing to me. > what's the point of separately specifying both "d" and "m" constraints > for (p) ? (and it also has a "=m" in the output clobberlist) I consulted the kernel code as well as Heiko and the architecture. CHSC is one of those request/response do everything instructions and is similar to sclp. A header is read from memory and a response is written below the header. The addressed memory needs to be page aligned and can be up to a page in size. Which means: - We need the address in R1 - CPU reads from the memory area designated by R1 - CPU writes to the memory area designated by R1 My guess is that nobody bothered defining all of the structs and that's how we ended up here. If you look at the kernel assembly you'll notice a page size typedef for the +m clobber of the memory area pointer. Heiko suggested to drop the two "m" clobbers and just add a generic memory clobber. If we even want to touch this at all...