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

Re: [Xen-devel] [xen-unstable test] 11905: regressions - FAIL



On Fri, 2012-02-10 at 09:31 +0000, Ian Campbell wrote:
> On Fri, 2012-02-10 at 01:23 +0000, xen.org wrote:
> > flight 11905 xen-unstable real [real]
> > http://www.chiark.greenend.org.uk/~xensrcts/logs/11905/
> > 
> > Regressions :-(
> > 
> > Tests which did not succeed and are blocking,
> > including tests which could not be run:
> >  test-amd64-amd64-win          7 windows-install           fail REGR. vs. 
> > 11904
> >  test-amd64-i386-win-vcpus1    7 windows-install           fail REGR. vs. 
> > 11904
> >  test-amd64-i386-win           7 windows-install           fail REGR. vs. 
> > 11904
> >  test-amd64-i386-xend-winxpsp3  7 windows-install          fail REGR. vs. 
> > 11904
> >  test-i386-i386-win            7 windows-install           fail REGR. vs. 
> > 11904
> 
> http://www.chiark.greenend.org.uk/~xensrcts/logs/11905/test-amd64-i386-win-vcpus1/gall-mite---var-log-xen-xend.log
>  contains:
>         [2012-02-09 22:34:26 2310] ERROR (XendDomainInfo:488) VM start failed
>         Traceback (most recent call last):
>           File 
> "/usr/local/lib/python2.6/dist-packages/xen/xend/XendDomainInfo.py", line 
> 474, in start
>             XendTask.log_progress(31, 60, self._initDomain)
>           File "/usr/local/lib/python2.6/dist-packages/xen/xend/XendTask.py", 
> line 209, in log_progress
>             retval = func(*args, **kwds)
>           File 
> "/usr/local/lib/python2.6/dist-packages/xen/xend/XendDomainInfo.py", line 
> 2914, in _initDomain
>             self._introduceDomain()
>           File 
> "/usr/local/lib/python2.6/dist-packages/xen/xend/XendDomainInfo.py", line 
> 2685, in _introduceDomain
>             raise XendError(str(exn))
>         XendError: (22, 'Invalid argument')
>         
> This try block contains only a single call to
> xen.xend.xenstore.xsutil.IntroduceDomain which ultimately turns into a C
> call to xs_introduce_domain.
> 
> Daniel, I'm afraid I suspect the XS stubdom series for this one. My
> suspicion is a missing call to seed_grant_table from xend (or from a
> libxc function which xend uses) which prevents xenstored from mapping
> the guest's ring, which results in an error from map_interface() in
> xenstored.

The following seems to fix it for me. I also tested an HVM migration
with xm since that seemed like something which might also suffer. It
seemed ok.

8<------------------------------------------------------------


# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1328875524 0
# Node ID 866498ce4469b6bbdbc338c516f39ac21e6aa7e7
# Parent  abc689ef19c2ab2bf86efee9f1e5107eb76c7ff7
xend: populate HVM guest grant table on boot

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r abc689ef19c2 -r 866498ce4469 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Fri Feb 10 11:27:30 2012 +0000
+++ b/tools/python/xen/lowlevel/xc/xc.c Fri Feb 10 12:05:24 2012 +0000
@@ -1008,6 +1008,30 @@ static PyObject *pyxc_hvm_build(XcObject
     return Py_BuildValue("{}");
 }
 
+static PyObject *pyxc_gnttab_hvm_seed(XcObject *self,
+                                     PyObject *args,
+                                     PyObject *kwds)
+{
+    uint32_t dom, console_domid, xenstore_domid;
+    unsigned long xenstore_gmfn = 0;
+    unsigned long console_gmfn = 0;
+    static char *kwd_list[] = { "domid",
+                               "console_gmfn", "xenstore_gmfn",
+                               "console_domid", "xenstore_domid", NULL };
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiii", kwd_list,
+                                      &dom,
+                                     &console_gmfn, &xenstore_gmfn,
+                                     &console_domid, &xenstore_domid) )
+        return NULL;
+
+    if ( xc_dom_gnttab_hvm_seed(self->xc_handle, dom,
+                               console_gmfn, xenstore_gmfn,
+                               console_domid, xenstore_domid) != 0 )
+        return pyxc_error_to_exception(self->xc_handle);
+
+    return Py_None;
+}
+
 static PyObject *pyxc_evtchn_alloc_unbound(XcObject *self,
                                            PyObject *args,
                                            PyObject *kwds)
@@ -2439,6 +2463,17 @@ static PyMethodDef pyxc_methods[] = {
       " vcpu_avail [long, 1]: Which Virtual CPUS available.\n\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
+    { "gnttab_hvm_seed",
+      (PyCFunction)pyxc_gnttab_hvm_seed,
+      METH_KEYWORDS, "\n"
+      "Initialise HVM guest grant table.\n"
+      " dom     [int]:      Identifier of domain to build into.\n"
+      " console_gmfn [int]: \n"
+      " xenstore_gmfn [int]: \n"
+      " console_domid [int]: \n"
+      " xenstore_domid [int]: \n"
+      "Returns: None on sucess. Raises exception on error.\n" },
+
     { "hvm_get_param", 
       (PyCFunction)pyxc_get_hvm_param, 
       METH_VARARGS | METH_KEYWORDS, "\n"
diff -r abc689ef19c2 -r 866498ce4469 tools/python/xen/xend/XendConstants.py
--- a/tools/python/xen/xend/XendConstants.py    Fri Feb 10 11:27:30 2012 +0000
+++ b/tools/python/xen/xend/XendConstants.py    Fri Feb 10 12:05:24 2012 +0000
@@ -52,6 +52,7 @@ HVM_PARAM_TIMER_MODE   = 10
 HVM_PARAM_HPET_ENABLED = 11
 HVM_PARAM_ACPI_S_STATE = 14
 HVM_PARAM_VPT_ALIGN    = 16
+HVM_PARAM_CONSOLE_PFN  = 17
 HVM_PARAM_NESTEDHVM    = 24 # x86
 
 restart_modes = [
diff -r abc689ef19c2 -r 866498ce4469 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Feb 10 11:27:30 2012 +0000
+++ b/tools/python/xen/xend/image.py    Fri Feb 10 12:05:24 2012 +0000
@@ -971,6 +971,13 @@ class HVMImageHandler(ImageHandler):
         xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_STORE_EVTCHN,
                          store_evtchn)
 
+        console_mfn = xc.hvm_get_param(self.vm.getDomid(), 
HVM_PARAM_CONSOLE_PFN)
+        xc.gnttab_hvm_seed(domid = self.vm.getDomid(),
+                           console_gmfn = console_mfn,
+                           xenstore_gmfn = rc['store_mfn'],
+                           console_domid = 0,
+                           xenstore_domid = 0)
+
         return rc
 
 



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


 


Rackspace

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