diff options
author | Avi Kivity <avi@qumranet.com> | 2007-05-02 09:54:03 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 05:05:39 -0400 |
commit | 33ed6329210f3ad0638306bfa46cd3aaf5a5f929 (patch) | |
tree | 6b5b4570641fe071b3544ded46a223a11e9f338f /drivers/kvm/kvm.h | |
parent | 7494c0ccbb8fa0903bcb1ced89cc2b79c3624974 (diff) |
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index f6ee18928722..bb32383ddfff 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -306,6 +306,11 @@ struct kvm_vcpu { | |||
306 | char *guest_fx_image; | 306 | char *guest_fx_image; |
307 | int fpu_active; | 307 | int fpu_active; |
308 | int guest_fpu_loaded; | 308 | int guest_fpu_loaded; |
309 | struct vmx_host_state { | ||
310 | int loaded; | ||
311 | u16 fs_sel, gs_sel, ldt_sel; | ||
312 | int fs_gs_ldt_reload_needed; | ||
313 | } vmx_host_state; | ||
309 | 314 | ||
310 | int mmio_needed; | 315 | int mmio_needed; |
311 | int mmio_read_completed; | 316 | int mmio_read_completed; |