summaryrefslogtreecommitdiff
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-05-02 13:54:03 (GMT)
committerAvi Kivity <avi@qumranet.com>2007-07-16 09:05:39 (GMT)
commit33ed6329210f3ad0638306bfa46cd3aaf5a5f929 (patch)
tree6b5b4570641fe071b3544ded46a223a11e9f338f /drivers/kvm/kvm.h
parent7494c0ccbb8fa0903bcb1ced89cc2b79c3624974 (diff)
downloadlinux-fsl-qoriq-33ed6329210f3ad0638306bfa46cd3aaf5a5f929.tar.xz
KVM: Fix potential guest state leak into host
The lightweight vmexit path avoids saving and reloading certain host state. However in certain cases lightweight vmexit handling can schedule() which requires reloading the host state. So we store the host state in the vcpu structure, and reloaded it if we relinquish the vcpu. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index f6ee189..bb32383 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -306,6 +306,11 @@ struct kvm_vcpu {
char *guest_fx_image;
int fpu_active;
int guest_fpu_loaded;
+ struct vmx_host_state {
+ int loaded;
+ u16 fs_sel, gs_sel, ldt_sel;
+ int fs_gs_ldt_reload_needed;
+ } vmx_host_state;
int mmio_needed;
int mmio_read_completed;