diff options
author | Avi Kivity <avi@qumranet.com> | 2008-08-20 08:07:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-10-15 04:15:21 -0400 |
commit | 5706be0dafd6f42852f85fbae292301dcad4ccec (patch) | |
tree | 90338ecb8a3775e1618b69e59ef6595342edde93 /arch/x86/kvm | |
parent | 26815a648e1ec2b338a63a2bc301dcf449b93e5a (diff) |
KVM: VMX: Change cs reset state to be a data segment
Real mode cs is a data segment, not a code segment.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-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 9840f37925a2..6aa305ace79f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2239,6 +2239,7 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu) | |||
2239 | 2239 | ||
2240 | fx_init(&vmx->vcpu); | 2240 | fx_init(&vmx->vcpu); |
2241 | 2241 | ||
2242 | seg_setup(VCPU_SREG_CS); | ||
2242 | /* | 2243 | /* |
2243 | * GUEST_CS_BASE should really be 0xffff0000, but VT vm86 mode | 2244 | * GUEST_CS_BASE should really be 0xffff0000, but VT vm86 mode |
2244 | * insists on having GUEST_CS_BASE == GUEST_CS_SELECTOR << 4. Sigh. | 2245 | * insists on having GUEST_CS_BASE == GUEST_CS_SELECTOR << 4. Sigh. |
@@ -2250,8 +2251,6 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu) | |||
2250 | vmcs_write16(GUEST_CS_SELECTOR, vmx->vcpu.arch.sipi_vector << 8); | 2251 | vmcs_write16(GUEST_CS_SELECTOR, vmx->vcpu.arch.sipi_vector << 8); |
2251 | vmcs_writel(GUEST_CS_BASE, vmx->vcpu.arch.sipi_vector << 12); | 2252 | vmcs_writel(GUEST_CS_BASE, vmx->vcpu.arch.sipi_vector << 12); |
2252 | } | 2253 | } |
2253 | vmcs_write32(GUEST_CS_LIMIT, 0xffff); | ||
2254 | vmcs_write32(GUEST_CS_AR_BYTES, 0x9b); | ||
2255 | 2254 | ||
2256 | seg_setup(VCPU_SREG_DS); | 2255 | seg_setup(VCPU_SREG_DS); |
2257 | seg_setup(VCPU_SREG_ES); | 2256 | seg_setup(VCPU_SREG_ES); |