diff options
author | Avi Kivity <avi@qumranet.com> | 2009-08-06 14:39:41 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-08 20:16:58 -0700 |
commit | 96534837735ed064448e8ef748f4c9178356d28b (patch) | |
tree | 2ec63cb8d6ebffd7e5149fcd7d9c8144a2cc50b1 | |
parent | 994e0b57b4ea1ee1726d31a7e669200b34405df7 (diff) |
KVM: VMX: Change cs reset state to be a data segment
(cherry picked from commit 5706be0dafd6f42852f85fbae292301dcad4ccec)
Real mode cs is a data segment, not a code segment.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/x86/kvm/vmx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7041cc52b56..1379f2682a0 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2036,6 +2036,7 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu) fx_init(&vmx->vcpu); + seg_setup(VCPU_SREG_CS); /* * GUEST_CS_BASE should really be 0xffff0000, but VT vm86 mode * insists on having GUEST_CS_BASE == GUEST_CS_SELECTOR << 4. Sigh. @@ -2047,8 +2048,6 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu) vmcs_write16(GUEST_CS_SELECTOR, vmx->vcpu.arch.sipi_vector << 8); vmcs_writel(GUEST_CS_BASE, vmx->vcpu.arch.sipi_vector << 12); } - vmcs_write32(GUEST_CS_LIMIT, 0xffff); - vmcs_write32(GUEST_CS_AR_BYTES, 0x9b); seg_setup(VCPU_SREG_DS); seg_setup(VCPU_SREG_ES); |