[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] floating-point arithmetic

ok, thanks for the confirmation. I was worried it was because of my codeÂ

On 20 October 2014 17:24, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
On 18/10/14 02:39, Anh Dinh wrote:
I compiled Xen with the flag:

-mfpmath=sse -msse2

so that I can use double variables in implementing a hypercall inside Xen hypervisor.Â

However, the kernel crashes (computer reboots) when I do a lot (about a thousand) of memory copying of double values in the kernel space, i.e.

unsigned char* pt = xmalloc(unsigned char, sizeof(double));Â
memcpy(pt,&value,sizeof(double)); Â //<---- CRASHED HERE
...//do something with the variable

Xen does not maintain its own floating point state, because it has no need to do so.

By attempting to use floating point, you will either crash Xen, or corrupt the vcpu floating point state, depending on how the guest goes about performing fpu context switches.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.