mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
KVM: VMX: Reinitialize the real-mode tss when entering real mode
Protected mode code may have corrupted the real-mode tss, so re-initialize it when switching to real mode. Signed-off-by: Avi Kivity <[email protected]>
This commit is contained in:
parent
a3c870bdce
commit
75880a0112
1 changed files with 4 additions and 0 deletions
|
|
@ -31,6 +31,8 @@
|
|||
MODULE_AUTHOR("Qumranet");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static int init_rmode_tss(struct kvm *kvm);
|
||||
|
||||
static DEFINE_PER_CPU(struct vmcs *, vmxarea);
|
||||
static DEFINE_PER_CPU(struct vmcs *, current_vmcs);
|
||||
|
||||
|
|
@ -951,6 +953,8 @@ static void enter_rmode(struct kvm_vcpu *vcpu)
|
|||
fix_rmode_seg(VCPU_SREG_DS, &vcpu->rmode.ds);
|
||||
fix_rmode_seg(VCPU_SREG_GS, &vcpu->rmode.gs);
|
||||
fix_rmode_seg(VCPU_SREG_FS, &vcpu->rmode.fs);
|
||||
|
||||
init_rmode_tss(vcpu->kvm);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
|
|
|
|||
Loading…
Reference in a new issue