All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allan Graves <allan.graves@oracle.com>
To: xen-devel@lists.xensource.com
Subject: 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM
Date: Thu, 29 Oct 2009 21:23:04 -0400	[thread overview]
Message-ID: <4AEA3FF8.6050109@oracle.com> (raw)

(Please excuse double posting - I was told xen-users was not the right 
list, to put it on xen-devel, as it was not a technical support query, 
but an issue.)


The following program will crash with a fp exception on an INTEL 64 bit 
HVM domU only:
#include <setjmp.h>
jmp_buf env; main() { if(setjmp(env)) return; longjmp(env, 1); }


This can be seen using both Linux and Windows 64 bit Guests.


My machine is a Core 2 Duo with both VT-D and VT-X extensions enabled. 
Unfortunately, this is blocking our usage of 64 bit HVM Windows guests. 

A similar issue was reported in KVM and recently fixed, some of their 
analysis is below:
--------------------------------------------------
> >> 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.
> >> -------------------------------------------------------
http://markmail.org/message/owy3x7pf6oywdx5e#query:+page:1+mid:spz6vmdothb2njfb+state:results 



Anyone have a solution to this? :)  

Allan

             reply	other threads:[~2009-10-30  1:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30  1:23 Allan Graves [this message]
2009-10-31 14:58 ` 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM Keir Fraser
2009-11-01 19:32   ` Allan Graves
2009-11-01 21:24     ` Keir Fraser
2009-11-04 18:54       ` Allan Graves
2009-11-04 19:06         ` Keir Fraser

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=4AEA3FF8.6050109@oracle.com \
    --to=allan.graves@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /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.