public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Matteo Frigo <athena@fftw.org>
Cc: kvm@vger.kernel.org
Subject: Re: Cygwin bash's built-in test command crashes on Windows 2008 Server 64bit under KVM
Date: Fri, 13 Feb 2009 22:01:04 +0200	[thread overview]
Message-ID: <4995D180.9000706@redhat.com> (raw)
In-Reply-To: <87bptgnykd.fsf@fftw.org>

Matteo Frigo wrote:
> Avi Kivity <avi@redhat.com> writes:
>
>   
>> - add a watchpoint to break when the value of gs:[0x30] changes
>>     
>
> It seems that the problem can be reproduced by compiling the following
> simple program using cygwin's gcc.  The program crashes on w2k3-amd64
> on kvm-83 on core2-duo, and it does not crash on the same w2k3-amd64
> installation on kvm-83 on AMD Phenom.
>
>   #include <setjmp.h>
>
>   jmp_buf env;
>   main()
>   {
>        if(setjmp(env)) return;
>        longjmp(env, 1);
>   }
>
> The problem seems to be in the instruction ``mov gs,ax'' (Intel
> syntax) in the longjmp() code.  If I let the virtual machine execute
> the instruction, the program crashes.  However, if I step over the
> instruction using the vs2008 debugger, the program completes without
> crashing.  Thus, I think that this is the instruction that Avi is
> looking for, but I don't know how to proceed from here.
>   

I've decoded the global descriptor table for this, and I get:

(qemu) xp/14x 0x266b000
000000000266b000: 0x00000000 0x00000000 0x00000000 0x00000000
000000000266b010: 0x00000000 0x00209b00 0x0000ffff 0x00cf9300
000000000266b020: 0x0000ffff 0x00cffb00 0x0000ffff 0x00cff300
000000000266b030: 0x00000000 0x0020fb00

The entry for gs is at offset 0x28, and has base set to 0, which is 
consistent with the crash.

Can you rerun on AMD, but set add npt=0 as a kvm-amd module parameter?  
This will determine if this is an mmu bug or kvm-intel bug.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2009-02-13 20:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <40ddf2480901050654y268213d1jbf34f9d81d6faeb0@mail.gmail.com>
2009-01-05 16:22 ` Cygwin bash's built-in test command crashes on Windows 2008 Server 64bit under KVM Jamie Kirkpatrick
2009-01-22 15:02   ` Avi Kivity
2009-02-06  1:28     ` Matteo Frigo
2009-02-13 20:01       ` Avi Kivity [this message]
2009-02-13 20:18         ` Matteo Frigo
2009-02-13 20:27           ` Avi Kivity
2009-02-13 20:28           ` Avi Kivity
2009-02-13 20:39             ` Matteo Frigo
2009-02-13 21:02               ` Avi Kivity
2009-02-13 21:23                 ` Matteo Frigo
2009-02-13 21:46                   ` Avi Kivity
2009-02-13 21:46                   ` Avi Kivity
2009-02-13 21:49                     ` Matteo Frigo
2009-02-13 21:52                       ` Matteo Frigo
2009-02-13 22:05                         ` Avi Kivity
2009-02-13 22:32                           ` Avi Kivity
2009-02-13 22:46                             ` Matteo Frigo
2009-02-13 22:52                               ` Avi Kivity
2009-02-13 22:06                         ` Avi Kivity

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=4995D180.9000706@redhat.com \
    --to=avi@redhat.com \
    --cc=athena@fftw.org \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox