All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Bandan Das <bsd@redhat.com>, Shih-Wei Li <shihwei@cs.columbia.edu>
Cc: Christoffer Dall <cdall@cs.columbia.edu>,
	kvm@vger.kernel.org,
	Christoffer Dall <christofferdall@christofferdall.dk>
Subject: Re: kvm-unit-test failed to complete
Date: Thu, 30 Jul 2015 15:32:33 +0200	[thread overview]
Message-ID: <55BA2771.2040001@redhat.com> (raw)
In-Reply-To: <jpgr3nq1cm7.fsf@linux.bootlegged.copy>



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

      reply	other threads:[~2015-07-30 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 18:18 kvm-unit-test failed to complete Shih-Wei Li
2015-07-29 18:30 ` Christoffer Dall
2015-07-29 18:38   ` Shih-Wei Li
2015-07-30  1:04     ` Shih-Wei Li
2015-07-30  4:41       ` Bandan Das
2015-07-30 13:32         ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55BA2771.2040001@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=cdall@cs.columbia.edu \
    --cc=christofferdall@christofferdall.dk \
    --cc=kvm@vger.kernel.org \
    --cc=shihwei@cs.columbia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.