All of lore.kernel.org
 help / color / mirror / Atom feed
* 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM
@ 2009-10-30  1:23 Allan Graves
  2009-10-31 14:58 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Allan Graves @ 2009-10-30  1:23 UTC (permalink / raw)
  To: xen-devel

(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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM
  2009-10-30  1:23 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM Allan Graves
@ 2009-10-31 14:58 ` Keir Fraser
  2009-11-01 19:32   ` Allan Graves
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2009-10-31 14:58 UTC (permalink / raw)
  To: Allan Graves, xen-devel@lists.xensource.com

What version of Xen are you using? This bug may be fixed in Xen 3.3.2 and
Xen 3.4.1.

 -- Keir

On 30/10/2009 01:23, "Allan Graves" <allan.graves@oracle.com> wrote:

> (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:spz6vmdothb2njf
> b+state:results 
> 
> 
> 
> Anyone have a solution to this? :)
> 
> Allan
> 
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM
  2009-10-31 14:58 ` Keir Fraser
@ 2009-11-01 19:32   ` Allan Graves
  2009-11-01 21:24     ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Allan Graves @ 2009-11-01 19:32 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel@lists.xensource.com

Keir -

Hmm... according to /sys/hypervisor/version, I'm running 3.4.0.

Is there a reasonable chance this is fixed in 3.4.1?  I haven't seen 
anything in the changelogs...


Allan



Keir Fraser wrote:
> What version of Xen are you using? This bug may be fixed in Xen 3.3.2 and
> Xen 3.4.1.
>
>  -- Keir
>
> On 30/10/2009 01:23, "Allan Graves" <allan.graves@oracle.com> wrote:
>
>   
>> (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:spz6vmdothb2njf
>> b+state:results 
>>
>>
>>
>> Anyone have a solution to this? :)
>>
>> Allan
>>
>>
>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>     
>
>
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM
  2009-11-01 19:32   ` Allan Graves
@ 2009-11-01 21:24     ` Keir Fraser
  2009-11-04 18:54       ` Allan Graves
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2009-11-01 21:24 UTC (permalink / raw)
  To: Allan Graves; +Cc: xen-devel@lists.xensource.com

Well, what would you expect the changelog to say? It's fixed in the
xen-3.4-testing.hg repository by changeset 19697, which is a backport of
xen-unstable.hg:19953.

 -- Keir

On 01/11/2009 19:32, "Allan Graves" <allan.graves@oracle.com> wrote:

> Keir -
> 
> Hmm... according to /sys/hypervisor/version, I'm running 3.4.0.
> 
> Is there a reasonable chance this is fixed in 3.4.1?  I haven't seen
> anything in the changelogs...
> 
> 
> Allan
> 
> 
> 
> Keir Fraser wrote:
>> What version of Xen are you using? This bug may be fixed in Xen 3.3.2 and
>> Xen 3.4.1.
>> 
>>  -- Keir
>> 
>> On 30/10/2009 01:23, "Allan Graves" <allan.graves@oracle.com> wrote:
>> 
>>   
>>> (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:spz6vmdothb2n
>>> jf
>>> b+state:results
>>> 
>>> 
>>> 
>>> Anyone have a solution to this? :)
>>> 
>>> Allan
>>> 
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>>>     
>> 
>> 
>>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM
  2009-11-01 21:24     ` Keir Fraser
@ 2009-11-04 18:54       ` Allan Graves
  2009-11-04 19:06         ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Allan Graves @ 2009-11-04 18:54 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel@lists.xensource.com

Keir,

Thank you.  Umm... I guess I wasn't sure exactly what the changelog 
should say - but clearly something other than what I would have titled 
it.  Which is probably cause I don't think I could have fixed the bug. :)

In any case, 3.4.1 does fix the issue!

Thank you so much for helping me through this!

Allan



Keir Fraser wrote:
> Well, what would you expect the changelog to say? It's fixed in the
> xen-3.4-testing.hg repository by changeset 19697, which is a backport of
> xen-unstable.hg:19953.
> 
>  -- Keir
> 
> On 01/11/2009 19:32, "Allan Graves" <allan.graves@oracle.com> wrote:
> 
>> Keir -
>>
>> Hmm... according to /sys/hypervisor/version, I'm running 3.4.0.
>>
>> Is there a reasonable chance this is fixed in 3.4.1?  I haven't seen
>> anything in the changelogs...
>>
>>
>> Allan
>>
>>
>>
>> Keir Fraser wrote:
>>> What version of Xen are you using? This bug may be fixed in Xen 3.3.2 and
>>> Xen 3.4.1.
>>>
>>>  -- Keir
>>>
>>> On 30/10/2009 01:23, "Allan Graves" <allan.graves@oracle.com> wrote:
>>>
>>>   
>>>> (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:spz6vmdothb2n
>>>> jf
>>>> b+state:results
>>>>
>>>>
>>>>
>>>> Anyone have a solution to this? :)
>>>>
>>>> Allan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@lists.xensource.com
>>>> http://lists.xensource.com/xen-devel
>>>>     
>>>
>>>   
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM
  2009-11-04 18:54       ` Allan Graves
@ 2009-11-04 19:06         ` Keir Fraser
  0 siblings, 0 replies; 6+ messages in thread
From: Keir Fraser @ 2009-11-04 19:06 UTC (permalink / raw)
  To: Allan Graves; +Cc: xen-devel@lists.xensource.com

Ha, well I'm glad the solution was so straightforward! :-)

 K.

On 04/11/2009 18:54, "Allan Graves" <allan.graves@oracle.com> wrote:

> Keir,
> 
> Thank you.  Umm... I guess I wasn't sure exactly what the changelog
> should say - but clearly something other than what I would have titled
> it.  Which is probably cause I don't think I could have fixed the bug. :)
> 
> In any case, 3.4.1 does fix the issue!
> 
> Thank you so much for helping me through this!
> 
> Allan
> 
> 
> 
> Keir Fraser wrote:
>> Well, what would you expect the changelog to say? It's fixed in the
>> xen-3.4-testing.hg repository by changeset 19697, which is a backport of
>> xen-unstable.hg:19953.
>> 
>>  -- Keir
>> 
>> On 01/11/2009 19:32, "Allan Graves" <allan.graves@oracle.com> wrote:
>> 
>>> Keir -
>>> 
>>> Hmm... according to /sys/hypervisor/version, I'm running 3.4.0.
>>> 
>>> Is there a reasonable chance this is fixed in 3.4.1?  I haven't seen
>>> anything in the changelogs...
>>> 
>>> 
>>> Allan
>>> 
>>> 
>>> 
>>> Keir Fraser wrote:
>>>> What version of Xen are you using? This bug may be fixed in Xen 3.3.2 and
>>>> Xen 3.4.1.
>>>> 
>>>>  -- Keir
>>>> 
>>>> On 30/10/2009 01:23, "Allan Graves" <allan.graves@oracle.com> wrote:
>>>> 
>>>>   
>>>>> (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:spz6vmdothb
>>>>> 2n
>>>>> jf
>>>>> b+state:results
>>>>> 
>>>>> 
>>>>> 
>>>>> Anyone have a solution to this? :)
>>>>> 
>>>>> Allan
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Xen-devel mailing list
>>>>> Xen-devel@lists.xensource.com
>>>>> http://lists.xensource.com/xen-devel
>>>>>     
>>>> 
>>>>   
>> 
>> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-11-04 19:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30  1:23 64 bit Intel HVM Weirdness - setjmp\longjump fp exception in Xen, not on real hardware or AMD HVM Allan Graves
2009-10-31 14:58 ` 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

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.