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

Re: [Xen-devel] Error booting Xen



>>> On 26.01.16 at 13:51, <write.harmandeep@xxxxxxxxx> wrote:
> I tried the patch and I am very happy to inform you
> all that the patch has solved my problem. Now I am
> able to boot Xen without disabling XSAVE. I have
> full log of boot at http://paste2.org/gVW0Z9nm (if
> any one is interested. also "XXX Hello, this is my
> first mod :)" is printed by my mod, so ignore that
> one).

Thanks for trying it out, but while I'm glad it helped I'm afraid
we're not done here. With (for every vCPU)

(XEN) traps.c:3290: GPF (0000): ffff82d0801c1d08 -> ffff82d080252e5c
(XEN) d0v1 fault#1: mxcsr=00001f80
(XEN) d0v1 xs=0000000000000000 xc=0000000000000000
(XEN) d0v1 r0=0000000000000000 r1=0000000000000000
(XEN) d0v1 r2=0000000000000000 r3=0000000000000000
(XEN) d0v1 r4=0000000000000000 r5=0000000000000000
(XEN) traps.c:3290: GPF (0000): ffff82d0801c1d08 -> ffff82d080252e5c
(XEN) d0v1 fault#2: mxcsr=00001f80
(XEN) d0v1 xs=0000000000000000 xc=0000000000000000
(XEN) d0v1 r0=0000000000000000 r1=0000000000000000
(XEN) d0v1 r2=0000000000000000 r3=0000000000000000
(XEN) d0v1 r4=0000000000000000 r5=0000000000000000

it continues to be unclear why bit 63 in the value printed as
xc= isn't set from the beginning. Or wait, I think I see where
the problem is. Here's a 3rd patch, to try together with the
other two. The expectation would be for the above log
messages to then disappear altogether. (And then the patch
should also work on its own, i.e. with the other two removed
again.) Please let us know.

Thanks, Jan

x86/xstate: don't unintentionally clear compaction bit

When the VGCF_I387_VALID flag is clear in arch_set_info_guest()'s input
we must not clear the compaction bit when using XSAVES/XRSTORS. Split
initialization of xcomp_bv from the other FPU/SSE/AVX related state
setup in this function.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- unstable.orig/xen/arch/x86/domain.c
+++ unstable/xen/arch/x86/domain.c
@@ -922,15 +922,10 @@ int arch_set_info_guest(
     {
         memcpy(v->arch.fpu_ctxt, &c.nat->fpu_ctxt, sizeof(c.nat->fpu_ctxt));
         if ( v->arch.xsave_area )
-        {
             v->arch.xsave_area->xsave_hdr.xstate_bv = XSTATE_FP_SSE;
-            v->arch.xsave_area->xsave_hdr.xcomp_bv =
-                cpu_has_xsaves ? XSTATE_COMPACTION_ENABLED : 0;
-        }
     }
     else if ( v->arch.xsave_area )
-        memset(&v->arch.xsave_area->xsave_hdr, 0,
-               sizeof(v->arch.xsave_area->xsave_hdr));
+        v->arch.xsave_area->xsave_hdr.xstate_bv = 0;
     else
     {
         typeof(v->arch.xsave_area->fpu_sse) *fpu_sse = v->arch.fpu_ctxt;
@@ -939,6 +934,11 @@ int arch_set_info_guest(
         fpu_sse->fcw = FCW_DEFAULT;
         fpu_sse->mxcsr = MXCSR_DEFAULT;
     }
+    if ( cpu_has_xsaves )
+    {
+        ASSERT(v->arch.xsave_area);
+        v->arch.xsave_area->xsave_hdr.xcomp_bv = XSTATE_COMPACTION_ENABLED;
+    }
 
     if ( !compat )
     {




_______________________________________________
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®.