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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user