From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: kvm-unit-test failed to complete Date: Thu, 30 Jul 2015 15:32:33 +0200 Message-ID: <55BA2771.2040001@redhat.com> References: <20150729183016.GA28293@cbox> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: Christoffer Dall , kvm@vger.kernel.org, Christoffer Dall To: Bandan Das , Shih-Wei Li Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58454 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901AbbG3Nci (ORCPT ); Thu, 30 Jul 2015 09:32:38 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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