From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40D80C41535 for ; Wed, 9 Nov 2022 20:23:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbiKIUWg (ORCPT ); Wed, 9 Nov 2022 15:22:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbiKIUWG (ORCPT ); Wed, 9 Nov 2022 15:22:06 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 300072FC31; Wed, 9 Nov 2022 12:22:05 -0800 (PST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A9JEr7S000322; Wed, 9 Nov 2022 20:22:04 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=7ZTqypyY9Bsugtz3eSYe3JY3ZdOOkr8E++wW+OLen2c=; b=F/NC63A7yrZta4sWeyYvaBrTL8ly2nxlzg8ffBQ9rx/RXYiSbM+0jt5tme6TnFm6JSDp sKhWxSJTKnNwNFKXS7yMqGyThEDFQVjhYHQnj7r4VwqsmL47FN3J27/osPN0kKXR34IM n4gokgi6YVaVV4AFlwz66H/EheAFmy2v99mHkRm1cFcy1Ii/qROaMai6HKjG25mJbItB 6Z6S1Ss+P1nUeAbxTxuQOUK8HyQfFZ2C9X+T2/zU+taDO9KGzTA16YG26Uby/kbI/yJh H1b7Vj9Vro4fO9fOmzkZFJZFXrCnnCCu2JZnx1wxkUxc4I+4IAARIxzvgFmxTmNGn3zV mg== Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3krj6hsp8c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Nov 2022 20:22:04 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2A9KJiuT030290; Wed, 9 Nov 2022 20:22:02 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma05fra.de.ibm.com with ESMTP id 3krcbr0d0g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 09 Nov 2022 20:22:02 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2A9KLx36000606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 9 Nov 2022 20:21:59 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFCF6AE055; Wed, 9 Nov 2022 20:21:58 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DBEFDAE051; Wed, 9 Nov 2022 20:21:58 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 9 Nov 2022 20:21:58 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 4958) id 8D49EE0133; Wed, 9 Nov 2022 21:21:58 +0100 (CET) From: Eric Farman To: Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev Cc: Matthew Rosato , Halil Pasic , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org, kvm@vger.kernel.org, Eric Farman Subject: [PATCH 1/2] vfio-ccw: sort out physical vs virtual pointers usage Date: Wed, 9 Nov 2022 21:21:56 +0100 Message-Id: <20221109202157.1050545-2-farman@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221109202157.1050545-1-farman@linux.ibm.com> References: <20221109202157.1050545-1-farman@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ACIA8Ty4dWgdJCTvwx_aZG8_7GoUm_Ex X-Proofpoint-ORIG-GUID: ACIA8Ty4dWgdJCTvwx_aZG8_7GoUm_Ex X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-09_06,2022-11-09_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 adultscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211090151 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Alexander Gordeev The ORB is a construct that is sent to the real hardware, so should contain a physical address in its interrupt parameter field. Let's clarify that. Note: this currently doesn't fix a real bug, since virtual addresses are identical to physical ones. Signed-off-by: Alexander Gordeev [EF: Updated commit message] Signed-off-by: Eric Farman --- drivers/s390/cio/vfio_ccw_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/cio/vfio_ccw_fsm.c b/drivers/s390/cio/vfio_ccw_fsm.c index a59c758869f8..0a5e8b4a6743 100644 --- a/drivers/s390/cio/vfio_ccw_fsm.c +++ b/drivers/s390/cio/vfio_ccw_fsm.c @@ -29,7 +29,7 @@ static int fsm_io_helper(struct vfio_ccw_private *private) spin_lock_irqsave(sch->lock, flags); - orb = cp_get_orb(&private->cp, (u32)(addr_t)sch, sch->lpm); + orb = cp_get_orb(&private->cp, (u32)virt_to_phys(sch), sch->lpm); if (!orb) { ret = -EIO; goto out; -- 2.34.1