From: Fabiano Rosas <farosas@linux.ibm.com>
To: kvm-ppc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, 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 [thread overview]
Message-ID: <20211223211528.3560711-3-farosas@linux.ibm.com> (raw)
In-Reply-To: <20211223211528.3560711-1-farosas@linux.ibm.com>
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 <farosas@linux.ibm.com>
---
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) {
--
2.33.1
next prev parent reply other threads:[~2021-12-23 21:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-23 21:15 [PATCH 0/3] KVM: PPC: Minor fixes Fabiano Rosas
2021-12-23 21:15 ` [PATCH 1/3] KVM: PPC: Book3S HV: Stop returning internal values to userspace Fabiano Rosas
2021-12-25 10:11 ` Nicholas Piggin
2021-12-23 21:15 ` Fabiano Rosas [this message]
2021-12-25 10:12 ` [PATCH 2/3] KVM: PPC: Fix vmx/vsx mixup in mmio emulation Nicholas Piggin
2021-12-27 17:28 ` Fabiano Rosas
2022-01-04 9:01 ` Alexey Kardashevskiy
2021-12-23 21:15 ` [PATCH 3/3] KVM: PPC: Fix mmio length message Fabiano Rosas
2021-12-25 10:16 ` Nicholas Piggin
2021-12-30 18:24 ` Fabiano Rosas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211223211528.3560711-3-farosas@linux.ibm.com \
--to=farosas@linux.ibm.com \
--cc=aik@ozlabs.ru \
--cc=kvm-ppc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).