All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master)
@ 2016-08-25 15:53 Christian Borntraeger
  2016-08-25 15:53 ` [GIT PULL 1/1] KVM: s390: don't use current->thread.fpu.* when accessing registers Christian Borntraeger
  2016-08-30 12:11 ` [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master) Paolo Bonzini
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Borntraeger @ 2016-08-25 15:53 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář
  Cc: KVM, Cornelia Huck, linux-s390, Christian Borntraeger, David Hildenbrand

Paolo, Radim,

The following changes since commit ba913e4f72fc9cfd03dad968dfb110eb49211d80:

  MIPS: KVM: Check for pfn noslot case (2016-08-19 17:22:26 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git  tags/kvm-s390-master-4.8-2

for you to fetch changes up to a7d4b8f2565ad0dfdff9a222d1d87990c73b36e8:

  KVM: s390: don't use current->thread.fpu.* when accessing registers (2016-08-25 17:33:24 +0200)

----------------------------------------------------------------
KVM: s390: Fix for fpu register errors since 4.7

This fixes a regression that was introduced by a semantic
change in commit 3f6813b9a5e0 ("s390/fpu: allocate 'struct
fpu' with the task_struct"). Symptoms are broken host userspace
fpu registers if the old FPU set/get ioctls are used.

----------------------------------------------------------------
David Hildenbrand (1):
      KVM: s390: don't use current->thread.fpu.* when accessing registers

 arch/s390/kvm/kvm-s390.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [GIT PULL 1/1] KVM: s390: don't use current->thread.fpu.* when accessing registers
  2016-08-25 15:53 [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master) Christian Borntraeger
@ 2016-08-25 15:53 ` Christian Borntraeger
  2016-08-30 12:11 ` [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master) Paolo Bonzini
  1 sibling, 0 replies; 5+ messages in thread
From: Christian Borntraeger @ 2016-08-25 15:53 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář
  Cc: KVM, Cornelia Huck, linux-s390, Christian Borntraeger,
	David Hildenbrand, stable, #,
	4.7

From: David Hildenbrand <dahi@linux.vnet.ibm.com>

As the meaning of these variables and pointers seems to change more
frequently, let's directly access our save area, instead of going via
current->thread.

Right now, this is broken for set/get_fpu. They simply overwrite the
host registers, as the pointers to the current save area were turned
into the static host save area.

Cc: stable@vger.kernel.org # 4.7
Fixes: 3f6813b9a5e0 ("s390/fpu: allocate 'struct fpu' with the task_struct")
Reported-by: Hao QingFeng <haoqf@linux.vnet.ibm.com>
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 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index f142215..607ec91 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -2231,9 +2231,10 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
 		return -EINVAL;
 	current->thread.fpu.fpc = fpu->fpc;
 	if (MACHINE_HAS_VX)
-		convert_fp_to_vx(current->thread.fpu.vxrs, (freg_t *)fpu->fprs);
+		convert_fp_to_vx((__vector128 *) vcpu->run->s.regs.vrs,
+				 (freg_t *) fpu->fprs);
 	else
-		memcpy(current->thread.fpu.fprs, &fpu->fprs, sizeof(fpu->fprs));
+		memcpy(vcpu->run->s.regs.fprs, &fpu->fprs, sizeof(fpu->fprs));
 	return 0;
 }
 
@@ -2242,9 +2243,10 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
 	/* make sure we have the latest values */
 	save_fpu_regs();
 	if (MACHINE_HAS_VX)
-		convert_vx_to_fp((freg_t *)fpu->fprs, current->thread.fpu.vxrs);
+		convert_vx_to_fp((freg_t *) fpu->fprs,
+				 (__vector128 *) vcpu->run->s.regs.vrs);
 	else
-		memcpy(fpu->fprs, current->thread.fpu.fprs, sizeof(fpu->fprs));
+		memcpy(fpu->fprs, vcpu->run->s.regs.fprs, sizeof(fpu->fprs));
 	fpu->fpc = current->thread.fpu.fpc;
 	return 0;
 }
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master)
  2016-08-25 15:53 [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master) Christian Borntraeger
  2016-08-25 15:53 ` [GIT PULL 1/1] KVM: s390: don't use current->thread.fpu.* when accessing registers Christian Borntraeger
@ 2016-08-30 12:11 ` Paolo Bonzini
  1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2016-08-30 12:11 UTC (permalink / raw)
  To: Christian Borntraeger, Radim Krčmář
  Cc: KVM, Cornelia Huck, linux-s390, David Hildenbrand



On 25/08/2016 17:53, Christian Borntraeger wrote:
>   git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git  tags/kvm-s390-master-4.8-2

Pulled, thanks.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master)
  2016-09-05 12:07 Cornelia Huck
@ 2016-09-05 14:17 ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2016-09-05 14:17 UTC (permalink / raw)
  To: Cornelia Huck, Radim Krčmář
  Cc: Christian Borntraeger, KVM, linux-s390, David Hildenbrand



On 05/09/2016 14:07, Cornelia Huck wrote:
> Paolo, Radim,
> 
> The following changes since commit 20b8f9e2dde171c69da4a79c34fccdc2a8492797:
> 
>   Merge tag 'kvm-s390-master-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master (2016-08-30 14:11:33 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-4.8-3
> 
> for you to fetch changes up to 4d21cef3ea00ba3ac508eb61fb8db70e3e31df67:
> 
>   KVM: s390: vsie: fix riccbd (2016-09-05 13:48:50 +0200)
> 
> ----------------------------------------------------------------
> A bugfix for the vsie code (setting the wrong field).
> 
> ----------------------------------------------------------------
> 
> David Hildenbrand (1):
>   KVM: s390: vsie: fix riccbd
> 
>  arch/s390/kvm/vsie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Pulled, thanks.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master)
@ 2016-09-05 12:07 Cornelia Huck
  2016-09-05 14:17 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2016-09-05 12:07 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář
  Cc: Christian Borntraeger, KVM, linux-s390, David Hildenbrand, Cornelia Huck

Paolo, Radim,

The following changes since commit 20b8f9e2dde171c69da4a79c34fccdc2a8492797:

  Merge tag 'kvm-s390-master-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master (2016-08-30 14:11:33 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-4.8-3

for you to fetch changes up to 4d21cef3ea00ba3ac508eb61fb8db70e3e31df67:

  KVM: s390: vsie: fix riccbd (2016-09-05 13:48:50 +0200)

----------------------------------------------------------------
A bugfix for the vsie code (setting the wrong field).

----------------------------------------------------------------

David Hildenbrand (1):
  KVM: s390: vsie: fix riccbd

 arch/s390/kvm/vsie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-05 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25 15:53 [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master) Christian Borntraeger
2016-08-25 15:53 ` [GIT PULL 1/1] KVM: s390: don't use current->thread.fpu.* when accessing registers Christian Borntraeger
2016-08-30 12:11 ` [GIT PULL 0/1] KVM: s390: Fix for 4.8 (via kvm/master) Paolo Bonzini
2016-09-05 12:07 Cornelia Huck
2016-09-05 14:17 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.