All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bandan Das <bsd@redhat.com>
To: Shih-Wei Li <shihwei@cs.columbia.edu>,
	Paolo Bonzini <pbonzini@redhat.com>
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 00:41:04 -0400	[thread overview]
Message-ID: <jpgr3nq1cm7.fsf@linux.bootlegged.copy> (raw)
In-Reply-To: <CAO+sbHFg3w4A3L9sQR5UcpmymCs=Mzh6vdrxriJankaJ6ojxoQ@mail.gmail.com> (Shih-Wei Li's message of "Wed, 29 Jul 2015 21:04:51 -0400")

Shih-Wei Li <shihwei@cs.columbia.edu> writes:

> On Wed, Jul 29, 2015 at 2:38 PM, Shih-Wei Li <shihwei@cs.columbia.edu> wrote:
>> On Wed, Jul 29, 2015 at 2:30 PM, Christoffer Dall <cdall@cs.columbia.edu> wrote:
>>> Hi Shih-Wei,
>>>
>>> [Something weird happened when sending these e-mails, you sent two where
>>> one seems to be a slight modification of the other?]
>>
>> yes, the previous one just got rejected by the mailing list. sorry
>> about the spam.
>>
>>>
>>> On Wed, Jul 29, 2015 at 02:18:23PM -0400, Shih-Wei Li wrote:
>>>> Hi all,
>>>>
>>>> This is Shih-Wei, I'm Christoffer's colleague at Columbia University.
>>>> We have experienced some problems in running kvm-unit-tests in our
>>>> environment.
>>>> Here's what we did:
>>>> ./configure
>>>> make
>>>> ./run_test.sh
>>>>
>>>> run_test.sh halted in some specific test items and couldn't finish the
>>>> run. I managed to get it finish running after removing the following
>>>> items:
>>>> x86/apic.c:
>>>> -> removed:
>>>> test_sti_nmi();
>>>> test_multiple_nmi();
>>>
>>> I'm wondering if there's a dependency on the version of QEMU?  Have you
>>> tried with the most recent upstream QEMU?
>>
>> I haven't, but I will try. We are using qemu 2.2.50 now.
>
> Here's the update. I just used the upstream QEMU to run kvm-unit-test,
> but it still failed to finish the same test items I mentioned earlier.

(Just a cursory look) It seems this commit introduced it -

commit 402d4596789335f540a0697955f6dcf43e2bb796
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Thu Jul 23 09:16:45 2015 +0200

    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: Paolo Bonzini <pbonzini@redhat.com>

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.

handle_irq() does seem to trigger but the handler doesn't seem
to get called if %gs is initialized. Weird.

> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-07-30  4:41 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 [this message]
2015-07-30 13:32         ` Paolo Bonzini

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=jpgr3nq1cm7.fsf@linux.bootlegged.copy \
    --to=bsd@redhat.com \
    --cc=cdall@cs.columbia.edu \
    --cc=christofferdall@christofferdall.dk \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --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.