Mailing List Archive

[Xen-devel] Re: xen on suse 9.3 and software raid
[ adding xen-devel to Cc: ]

> Just loading the raid6 module in a xen domain makes my
> machine oops, log below. I'd guess it's because the
> module attempts to use mmx within the kernel, which is
> a bit tricky because you have to save/restore userspace
> fp state for that. Could be a corner case which simply
> doesn't work with xen.

Confirmed, the faulting instruction is a attempt to access
cr0, right here:

static inline unsigned long raid6_get_fpu(void)
{
unsigned long cr0;

preempt_disable();
asm volatile("mov %%cr0,%0 ; clts" : "=r" (cr0));
return cr0;
}

(which is called by raid6_before_mmx, which in turn is called by
raid6_mmx1_gen_syndrome, both calls not visible in the trace
because they are inlined).

Ideas how to fix that? Other than just disabling raid6? Can
that code be replaced with xen hypercalls? fsave & frestore
are also used btw. It's all in drivers/md/raid6x86.h

Gerd

--
-mm seems unusually stable at present.
-- akpm about 2.6.12-rc3-mm3

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [Xen-devel] Re: xen on suse 9.3 and software raid [ In reply to ]
On 12 May 2005, at 15:28, Gerd Knorr wrote:

> (which is called by raid6_before_mmx, which in turn is called by
> raid6_mmx1_gen_syndrome, both calls not visible in the trace
> because they are inlined).
>
> Ideas how to fix that? Other than just disabling raid6? Can
> that code be replaced with xen hypercalls? fsave & frestore
> are also used btw. It's all in drivers/md/raid6x86.h

This is a known issue with Xen 2.0, already fixed in unstable (by
emulating the privileged instructions).

There are three options here:
1. Live with it. Disable raid6 in Xen 2.0 and wait for upgrade to
forthcoming Xen 3.0.
2. Backport some of the privileged-instruction emulation to Xen 2.0.
3. Patch the raid6x86.h for Xen 2.0 to do hypercalls rather than priv
instructions.

I think either options 1 or 2 would be best. Backporting the relevant
bits of the instruction decoder and emulator from the unstable
repository would not be very difficult, if this is a big show-stopper
for anyone.

-- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel