* [PATCH 0/1] KVM: s390: last minute fix for 4.5
@ 2016-03-08 11:24 Christian Borntraeger
2016-03-08 11:24 ` [PATCH 1/1] KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS Christian Borntraeger
2016-03-08 12:06 ` [PATCH 0/1] KVM: s390: last minute fix for 4.5 Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Christian Borntraeger @ 2016-03-08 11:24 UTC (permalink / raw)
To: Paolo Bonzini
Cc: KVM, David Hildenbrand, Alexander Graf, Cornelia Huck, linux-s390
Paolo,
one last fixup for KVM on s390 for 4.5. It fixes the
sigp store status of floating registers with older QEMU
versions that still rely on the kernel for doing so.
David Hildenbrand (1):
KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS
arch/s390/kvm/kvm-s390.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.3.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS
2016-03-08 11:24 [PATCH 0/1] KVM: s390: last minute fix for 4.5 Christian Borntraeger
@ 2016-03-08 11:24 ` Christian Borntraeger
2016-03-08 12:06 ` [PATCH 0/1] KVM: s390: last minute fix for 4.5 Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2016-03-08 11:24 UTC (permalink / raw)
To: Paolo Bonzini
Cc: KVM, David Hildenbrand, Alexander Graf, Cornelia Huck, linux-s390
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
With MACHINE_HAS_VX, we convert the floating point registers from the
vector registeres when storing the status. For other VCPUs, these are
stored to vcpu->run->s.regs.vrs, but we are using current->thread.fpu.vxrs,
which resolves to the currently loaded VCPU.
So kvm_s390_store_status_unloaded() currently writes the wrong floating
point registers (converted from the vector registers) when called from
another VCPU on a z13.
This is only the case for old user space not handling SIGP STORE STATUS and
SIGP STOP AND STORE STATUS, but relying on the kernel implementation. All
other calls come from the loaded VCPU via kvm_s390_store_status().
Fixes: 9abc2a08a7d6 (KVM: s390: fix memory overwrites when vx is disabled)
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
arch/s390/kvm/kvm-s390.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 4af21c7..03dfe9c 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -2381,7 +2381,7 @@ int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long gpa)
/* manually convert vector registers if necessary */
if (MACHINE_HAS_VX) {
- convert_vx_to_fp(fprs, current->thread.fpu.vxrs);
+ convert_vx_to_fp(fprs, (__vector128 *) vcpu->run->s.regs.vrs);
rc = write_guest_abs(vcpu, gpa + __LC_FPREGS_SAVE_AREA,
fprs, 128);
} else {
--
2.3.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] KVM: s390: last minute fix for 4.5
2016-03-08 11:24 [PATCH 0/1] KVM: s390: last minute fix for 4.5 Christian Borntraeger
2016-03-08 11:24 ` [PATCH 1/1] KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS Christian Borntraeger
@ 2016-03-08 12:06 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-03-08 12:06 UTC (permalink / raw)
To: Christian Borntraeger
Cc: KVM, David Hildenbrand, Alexander Graf, Cornelia Huck, linux-s390
On 08/03/2016 12:24, Christian Borntraeger wrote:
> Paolo,
>
> one last fixup for KVM on s390 for 4.5. It fixes the
> sigp store status of floating registers with older QEMU
> versions that still rely on the kernel for doing so.
>
> David Hildenbrand (1):
> KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS
>
> arch/s390/kvm/kvm-s390.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-08 12:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 11:24 [PATCH 0/1] KVM: s390: last minute fix for 4.5 Christian Borntraeger
2016-03-08 11:24 ` [PATCH 1/1] KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS Christian Borntraeger
2016-03-08 12:06 ` [PATCH 0/1] KVM: s390: last minute fix for 4.5 Paolo Bonzini
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).