summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorPaolo Bonzini2019-07-22 13:31:27 +0200
committerPaolo Bonzini2019-07-22 13:55:47 +0200
commitec269475cba7bcdd1eb8fdf8e87f4c6c81a376fe (patch)
treedc71d0c7642fcae8d52fb969c95f9d50ed47d40a /arch/x86/include
parentKVM: nVMX: Clear pending KVM_REQ_GET_VMCS12_PAGES when leaving nested (diff)
downloadkernel-qcow2-linux-ec269475cba7bcdd1eb8fdf8e87f4c6c81a376fe.tar.gz
kernel-qcow2-linux-ec269475cba7bcdd1eb8fdf8e87f4c6c81a376fe.tar.xz
kernel-qcow2-linux-ec269475cba7bcdd1eb8fdf8e87f4c6c81a376fe.zip
Revert "kvm: x86: Use task structs fpu field for user"
This reverts commit 240c35a3783ab9b3a0afaba0dde7291295680a6b ("kvm: x86: Use task structs fpu field for user", 2018-11-06). The commit is broken and causes QEMU's FPU state to be destroyed when KVM_RUN is preempted. Fixes: 240c35a3783a ("kvm: x86: Use task structs fpu field for user") Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_host.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 0cc5b611a113..b2f1ffb937af 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -607,15 +607,16 @@ struct kvm_vcpu_arch {
/*
* QEMU userspace and the guest each have their own FPU state.
- * In vcpu_run, we switch between the user, maintained in the
- * task_struct struct, and guest FPU contexts. While running a VCPU,
- * the VCPU thread will have the guest FPU context.
+ * In vcpu_run, we switch between the user and guest FPU contexts.
+ * While running a VCPU, the VCPU thread will have the guest FPU
+ * context.
*
* Note that while the PKRU state lives inside the fpu registers,
* it is switched out separately at VMENTER and VMEXIT time. The
* "guest_fpu" state here contains the guest FPU context, with the
* host PRKU bits.
*/
+ struct fpu user_fpu;
struct fpu *guest_fpu;
u64 xcr0;