From patchwork Thu Dec 23 21:15:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabiano Rosas X-Patchwork-Id: 1572844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=kWEt7ZLJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JKjfL35vxz9t4b for ; Fri, 24 Dec 2021 08:15:54 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234251AbhLWVPw (ORCPT ); Thu, 23 Dec 2021 16:15:52 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:22676 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233835AbhLWVPu (ORCPT ); Thu, 23 Dec 2021 16:15:50 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BNKbHFq022233; Thu, 23 Dec 2021 21:15:41 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=0mx1AQ0umNKXGMDpx2TgBfkf81V10dfBQYDU+YTkeKk=; b=kWEt7ZLJLl9YWW+QiA4ZompB6TJhZfjY9jm+ma2nF+pqem3MNSBQSTQDkj/NVlZHbWdZ so+RtdPw1jH3qpxFJTiq0UP3ZvKE4y5/OVB8126Fz5VNYaBFa5zCjcoTOdvcdAUfZSwC WQREqM3dUZ7NOSdOLGuI4Dpl6JrNX56IIyNABt9EnBZc/V3QivtOin8U0IvBdqUXdi8x 4bIo8VfYTIlLX9Z/h/2ICUqoUsqHVEHyoqRILalnSC1NVRqSKeZL77kpOqQm3PUNAklT UzgiUdnCDxoH4HtYg5aizGJUcZuS5rI8wVkHCfB9Ui0y6ztgGltNgpek1wrq7WrklxBz FQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3d4yg699un-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:40 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1BNLFedF028640; Thu, 23 Dec 2021 21:15:40 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 3d4yg699u7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:40 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1BNL84BH006471; Thu, 23 Dec 2021 21:15:39 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma02wdc.us.ibm.com with ESMTP id 3d179c05wx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:39 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1BNLFcoh28967196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Dec 2021 21:15:38 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 93261AC05E; Thu, 23 Dec 2021 21:15:38 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3C434AC068; Thu, 23 Dec 2021 21:15:36 +0000 (GMT) Received: from farosas.linux.ibm.com.com (unknown [9.163.19.83]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 23 Dec 2021 21:15:35 +0000 (GMT) From: Fabiano Rosas To: kvm-ppc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, paulus@ozlabs.org, mpe@ellerman.id.au, npiggin@gmail.com, aik@ozlabs.ru Subject: [PATCH 1/3] KVM: PPC: Book3S HV: Stop returning internal values to userspace Date: Thu, 23 Dec 2021 18:15:26 -0300 Message-Id: <20211223211528.3560711-2-farosas@linux.ibm.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211223211528.3560711-1-farosas@linux.ibm.com> References: <20211223211528.3560711-1-farosas@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: JANieKhDEt2c6RoV4BbaAkj7JuRmp0hX X-Proofpoint-ORIG-GUID: PTxwiqdlnDaqi1y1l0jB33HWem4dD2RD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-23_04,2021-12-22_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 clxscore=1015 impostorscore=0 bulkscore=0 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=892 lowpriorityscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112230106 Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Our kvm_arch_vcpu_ioctl_run currently returns the RESUME_HOST values to userspace, against the API of the KVM_RUN ioctl which returns 0 on success. Signed-off-by: Fabiano Rosas Reviewed-by: Nicholas Piggin --- This was noticed while enabling the kvm selftests for powerpc. There's an assert at the _vcpu_run function when we return a value different from the expected. --- arch/powerpc/kvm/powerpc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index a72920f4f221..1e130bb087c4 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1849,6 +1849,14 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) #ifdef CONFIG_ALTIVEC out: #endif + + /* + * We're already returning to userspace, don't pass the + * RESUME_HOST flags along. + */ + if (r > 0) + r = 0; + vcpu_put(vcpu); return r; } From patchwork Thu Dec 23 21:15:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabiano Rosas X-Patchwork-Id: 1572843 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=FjG0c5tM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JKjfK4ltNz9t2p for ; Fri, 24 Dec 2021 08:15:53 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234163AbhLWVPv (ORCPT ); Thu, 23 Dec 2021 16:15:51 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48634 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234130AbhLWVPu (ORCPT ); Thu, 23 Dec 2021 16:15:50 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BNK76QC023603; Thu, 23 Dec 2021 21:15:43 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=RIuNUwnCoZjoH806KAEwChQheeHazboQZYY2Fsmi338=; b=FjG0c5tMw9rCxn4k88XPAlGanmHe6uQIPcJMNDABJ9MYNvlilT0B4Ldz3pl7Y3oj5z+k cf+GczsB1ymhAfIx+emroOJxdIMXb//kBb29w+Sh9X4f4ic5FlNF32xsQ+XL8J/yqq/s Md/toBwrkZ0hTcKF4UfLEbbBkM4OoX7/rPO0PdaEQQWxrFdlBuAvVht4zzEBz1xLhgLw ZpJY/4r9LYMR+Wywdl4KiVPEOsfIllm+mT7oLn23jjZwyWn5E+9tVmNnomjR+QKkecMa UP3qNhia29ax4HFA5zgr01w711Acwo+PfSO2sCjSuVciullQPNcOG/9EyztUNzZwm41H 7A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3d4xkyta45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:43 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1BNL1vtW006649; Thu, 23 Dec 2021 21:15:43 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 3d4xkyta3v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:43 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1BNL83mK006454; Thu, 23 Dec 2021 21:15:41 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma02wdc.us.ibm.com with ESMTP id 3d179c05yj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:41 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1BNLFfmj25625002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Dec 2021 21:15:41 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 50997AC062; Thu, 23 Dec 2021 21:15:41 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B984AC073; Thu, 23 Dec 2021 21:15:39 +0000 (GMT) Received: from farosas.linux.ibm.com.com (unknown [9.163.19.83]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 23 Dec 2021 21:15:38 +0000 (GMT) From: Fabiano Rosas To: kvm-ppc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, paulus@ozlabs.org, mpe@ellerman.id.au, npiggin@gmail.com, aik@ozlabs.ru Subject: [PATCH 2/3] KVM: PPC: Fix vmx/vsx mixup in mmio emulation Date: Thu, 23 Dec 2021 18:15:27 -0300 Message-Id: <20211223211528.3560711-3-farosas@linux.ibm.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211223211528.3560711-1-farosas@linux.ibm.com> References: <20211223211528.3560711-1-farosas@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: RXtPppMZTujdT9mZL6LSNv8R6MbHxjWk X-Proofpoint-ORIG-GUID: RhH12SwwpN7EGpw4S0HiAPzIW5plxdFa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-23_04,2021-12-22_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 priorityscore=1501 spamscore=0 mlxlogscore=819 bulkscore=0 impostorscore=0 suspectscore=0 adultscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112230106 Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org The MMIO emulation code for vector instructions is duplicated between VSX and VMX. When emulating VMX we should check the VMX copy size instead of the VSX one. Fixes: acc9eb9305fe ("KVM: PPC: Reimplement LOAD_VMX/STORE_VMX instruction ...") Signed-off-by: Fabiano Rosas Reviewed-by: Nicholas Piggin --- arch/powerpc/kvm/powerpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 1e130bb087c4..793d42bd6c8f 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1507,7 +1507,7 @@ int kvmppc_handle_vmx_load(struct kvm_vcpu *vcpu, { enum emulation_result emulated = EMULATE_DONE; - if (vcpu->arch.mmio_vsx_copy_nums > 2) + if (vcpu->arch.mmio_vmx_copy_nums > 2) return EMULATE_FAIL; while (vcpu->arch.mmio_vmx_copy_nums) { From patchwork Thu Dec 23 21:15:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabiano Rosas X-Patchwork-Id: 1572846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=jbzsVFIh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JKjfM3r59z9t2p for ; Fri, 24 Dec 2021 08:15:55 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235939AbhLWVPx (ORCPT ); Thu, 23 Dec 2021 16:15:53 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39646 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234130AbhLWVPx (ORCPT ); Thu, 23 Dec 2021 16:15:53 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BNKfSI4017944; Thu, 23 Dec 2021 21:15: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 : mime-version : content-transfer-encoding; s=pp1; bh=r9SBDjlUoSs4Ovdcv9eHIusJId//mFFEprInoUNJY9Q=; b=jbzsVFIhG7IAoEB2dhyBqmmyNS/YwQdMeUsNgWJ1Jdgh7Ph5089DbUdIQ8AUTwzIJGS5 W2/ODlD9aB1ke7zoxfZQoEtocdLFweDCWxLYABr3244llWKqVhxahpPYoOOosVryp+Cu UBIWKVWkBRsYIcHFCaAxNmzQ1LRuMMP8IClVw5fQ0NVfe33qxpE+DiTrjvDSNBahaRn+ BQmRpHAa8LdXj8Lj/wGfw/2wiYUFVT9gSFGesXErTcYrkSvzJjN3u988j6n78nWRs/G1 JiJ3XuryqABlaIEfvgbOBJlUgM4gAnEEwdjlkOKb+BER/3LBnoE/ze4FXaNAbDxwctBS VQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3d50ca0gcf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:46 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1BNKnstX003916; Thu, 23 Dec 2021 21:15:45 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 3d50ca0gc6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:45 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1BNL82jX032005; Thu, 23 Dec 2021 21:15:44 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma04wdc.us.ibm.com with ESMTP id 3d179kg2yy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Dec 2021 21:15:44 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1BNLFhZl23986566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Dec 2021 21:15:43 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1751AC062; Thu, 23 Dec 2021 21:15:43 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF3B6AC060; Thu, 23 Dec 2021 21:15:41 +0000 (GMT) Received: from farosas.linux.ibm.com.com (unknown [9.163.19.83]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 23 Dec 2021 21:15:41 +0000 (GMT) From: Fabiano Rosas To: kvm-ppc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, paulus@ozlabs.org, mpe@ellerman.id.au, npiggin@gmail.com, aik@ozlabs.ru Subject: [PATCH 3/3] KVM: PPC: Fix mmio length message Date: Thu, 23 Dec 2021 18:15:28 -0300 Message-Id: <20211223211528.3560711-4-farosas@linux.ibm.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211223211528.3560711-1-farosas@linux.ibm.com> References: <20211223211528.3560711-1-farosas@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Do9MDl2xKJnyL1kdPFGwDx3UVfq9vjOH X-Proofpoint-GUID: 7inAJcAaixFw0gmL5yAx2NkwJfy0gGLV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-23_04,2021-12-22_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 phishscore=0 spamscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112230106 Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org We check against 'bytes' but print 'run->mmio.len' which at that point has an old value. e.g. 16-byte load: before: __kvmppc_handle_load: bad MMIO length: 8 now: __kvmppc_handle_load: bad MMIO length: 16 Signed-off-by: Fabiano Rosas --- arch/powerpc/kvm/powerpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 793d42bd6c8f..7823207eb8f1 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1246,7 +1246,7 @@ static int __kvmppc_handle_load(struct kvm_vcpu *vcpu, if (bytes > sizeof(run->mmio.data)) { printk(KERN_ERR "%s: bad MMIO length: %d\n", __func__, - run->mmio.len); + bytes); } run->mmio.phys_addr = vcpu->arch.paddr_accessed; @@ -1335,7 +1335,7 @@ int kvmppc_handle_store(struct kvm_vcpu *vcpu, if (bytes > sizeof(run->mmio.data)) { printk(KERN_ERR "%s: bad MMIO length: %d\n", __func__, - run->mmio.len); + bytes); } run->mmio.phys_addr = vcpu->arch.paddr_accessed;