]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kvm/vmx.c
KVM: VMX: Initialize vm86 TSS only once.
authorGleb Natapov <gleb@redhat.com>
Mon, 21 Feb 2011 10:07:59 +0000 (12:07 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 17 Mar 2011 16:08:31 +0000 (13:08 -0300)
commit93ea5388ead5d7b87f54b8de53e35231acec8bbe
tree7ec192ad68fc3a28021ccfb229f5a49bd9980510
parenta8ba6c2622036101d0c6a195f97546bcb1a056ab
KVM: VMX: Initialize vm86 TSS only once.

Currently vm86 task is initialized on each real mode entry and vcpu
reset. Initialization is done by zeroing TSS and updating relevant
fields. But since all vcpus are using the same TSS there is a race where
one vcpu may use TSS while other vcpu is initializing it, so the vcpu
that uses TSS will see wrong TSS content and will behave incorrectly.
Fix that by initializing TSS only once.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c