]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Restore tss even on x86_64
authorAvi Kivity <avi@qumranet.com>
Sun, 16 Mar 2008 16:48:26 +0000 (18:48 +0200)
committerAvi Kivity <avi@qumranet.com>
Tue, 25 Mar 2008 08:22:16 +0000 (10:22 +0200)
commit0c6f93fda09483461a8a8ce0e49261a7e59ec3a8
tree9f2024d364073ba42a6fed317a5e66dd9999e28d
parente77f38ed5d10130bb9eb2459a71233db03c4154c
KVM: VMX: Restore tss even on x86_64

The vmx hardware state restore restores the tss selector and base address, but
not its length.  Usually, this does not matter since most of the tss contents
is within the default length of 0x67.  However, if a process is using ioperm()
to grant itself I/O port permissions, an additional bitmap within the tss,
but outside the default length is consulted.  The effect is that the process
will receive a SIGSEGV instead of transparently accessing the port.

Fix by restoring the tss length.  Note that i386 had this working already.

Closes bugzilla 10246.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/vmx.c