Commit 402d4596 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

x86: load 64-bit segments into the segment registers



kvm-unit-tests was keeping DS/ES/FS/GS loaded with the segment descriptors
provided by the multiboot boot loader (which are 32-bit), and instead loading
SS with 0.  The vmx.flat test failed because KVM did not like doing writes
into such an SS.

Load again the segment registers after entering 64-bit mode, for both
the BSP and the APs.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 4ea7633e
......@@ -213,7 +213,11 @@ idt_descr:
load_tss:
lidtq idt_descr
mov $0, %eax
mov $0x10, %eax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %ax, %ss
mov $(APIC_DEFAULT_PHYS_BASE + APIC_ID), %eax
mov (%rax), %eax
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment