Re: kvm-unit-test failed to complete

Paolo Bonzini
2015-07-30T13:32:38Z

On 30/07/2015 06:41, Bandan Das wrote:
>
> diff --git a/x86/cstart64.S b/x86/cstart64.S
> index 8d0d95d..8d5ee2d 100644
> --- a/x86/cstart64.S
> +++ b/x86/cstart64.S
> @@ -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
>
> Paolo, what is the purpose of initializing %gs and %fs ? It seems if I comment
> out "mov %ax, %gs", the test works.

Oh, you're right! setup_percpu_area writes the GS base. Also the 0x10
selector is the same between the 32-bit and 64-bit GDT, so it should be
okay to remove the whole sequence of moves (from mov $0, %eax to mov
%ax, %ss).

Paolo