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

Re: [Xen-devel] floating-point arithmetic



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
xfree(pt);

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.

~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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