WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] ctxt->pt_base != 0 when creating a new domain

To: "Felipe Alfaro Solana" <felipe.alfaro@xxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] ctxt->pt_base != 0 when creating a new domain
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Mon, 7 Feb 2005 14:49:49 -0000
Cc: <ian.pratt@xxxxxxxxxxxx>
Delivery-date: Mon, 07 Feb 2005 14:51:20 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcUNHSbq1TIz89+ZTBuAJZ0xuURnBgABl40A
Thread-topic: [Xen-devel] ctxt->pt_base != 0 when creating a new domain
This is fixed in the latest unstable tree -- it got introduced over the
weekend by the re-organisation of struct exec_domain and struct domain.

Ian

> -----Original Message-----
> From: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Felipe Alfaro Solana
> Sent: 07 February 2005 13:58
> To: xen-devel
> Subject: [Xen-devel] ctxt->pt_base != 0 when creating a new domain
> 
> Hi!
> 
> Since upgrading to the latest bkbits from xeno-unstable, I'm unable to
> create a XenU domain I was previously able to create with no problems
> at all:
> 
> # xm list
> Name              Id  Mem(MB)  CPU  State  Time(s)  Console
> Domain-0           0      414    0  r----     23.4        
> 
> # xm create xenU
> Using config file "xenU"
> Error: Error creating domain: (0, 'Error')
> 
> # cat /var/log/xend-debug.log
> network start bridge=xen-br0 netdev=eth1 antispoof=no
> ERROR: Domain is already constructed
> op_create> Exception creating domain:
> Traceback (most recent call last):
>   File "/usr/lib/python/xen/xend/server/SrvDomainDir.py", 
> line 66, in op_create
>     deferred = self.xd.domain_create(config)
>   File "/usr/lib/python/xen/xend/XendDomain.py", line 357, in 
> domain_create
>     deferred = XendDomainInfo.vm_create(config)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 195, in vm_create
>     ptr = vm.construct(config)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 469, in construct
>     self.construct_image()
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 503, in
> construct_image
>     self.image_handler(self, image)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 1137, in
> vm_image_linux
>     vm.create_domain("linux", kernel, ramdisk, cmdline)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 809, in create_domain
>     self.build_domain(ostype, kernel, ramdisk, cmdline, memmap)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 789, in build_domain
>     vcpus          = self.vcpus)
> error: (0, 'Error')
> 
> I have made the following testcase patch:
> 
> --- tools/libxc/xc_linux_build.c.old    2005-02-07 
> 13:49:57.000000000 +0100
> +++ tools/libxc/xc_linux_build.c        2005-02-07 
> 14:45:35.242555000 +0100
> @@ -360,46 +360,51 @@
>              goto error_out;
>          }
>      }
>  
>      if ( mlock(&st_ctxt, sizeof(st_ctxt) ) )
>      {   
>          PERROR("Unable to mlock ctxt");
>          return 1;
>      }
>  
>      op.cmd = DOM0_GETDOMAININFO;
>      op.u.getdomaininfo.domain = (domid_t)domid;
>      op.u.getdomaininfo.exec_domain = 0;
>      op.u.getdomaininfo.ctxt = ctxt;
>      if ( (do_dom0_op(xc_handle, &op) < 0) || 
>           ((u16)op.u.getdomaininfo.domain != domid) )
>      {
>          PERROR("Could not get info on domain");
>          goto error_out;
>      }
> +#if 1
>      if ( !(op.u.getdomaininfo.flags & DOMFLAGS_PAUSED) ||
>           (ctxt->pt_base != 0) )
>      {
> -               ERROR("Domain is already constructed");
> +       if (!(op.u.getdomaininfo.flags & DOMFLAGS_PAUSED))
> +               ERROR("Cannot create an unpaused domain");
> +       else
> +               ERROR("Domain is already constructed or 
> ctxt->pt_base != 0");
>          goto error_out;
>      }
> +#endif
>  
>      if ( setup_guestos(xc_handle, domid, image, image_size, 
>                         initrd_gfd, initrd_size, nr_pages, 
>                         &vstartinfo_start, &vkern_entry,
>                         ctxt, cmdline,
>                         op.u.getdomaininfo.shared_info_frame,
>                         control_evtchn, flags, vcpus) < 0 )
>      {
>          ERROR("Error constructing guest OS");
>          goto error_out;
>      }
>  
>      if ( initrd_fd >= 0 )
>          close(initrd_fd);
>      if ( initrd_gfd )
>          gzclose(initrd_gfd);
>      if ( image != NULL )
>          free(image);
>  
>      ctxt->flags = 0;
> 
> 
> After applying the previous patch, rebuilnding and rebooting, this is
> what gets logged into xend-debug.log:
> 
> # cat /var/log/xend-debug.log
> network start bridge=xen-br0 netdev=eth1 antispoof=no
> ERROR: Domain is already constructed or ctxt->pt_base != 0
> op_create> Exception creating domain:
> Traceback (most recent call last):
>   File "/usr/lib/python/xen/xend/server/SrvDomainDir.py", 
> line 66, in op_create
>     deferred = self.xd.domain_create(config)
>   File "/usr/lib/python/xen/xend/XendDomain.py", line 357, in 
> domain_create
>     deferred = XendDomainInfo.vm_create(config)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 195, in vm_create
>     ptr = vm.construct(config)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 469, in construct
>     self.construct_image()
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 503, in
> construct_image
>     self.image_handler(self, image)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 1137, in
> vm_image_linux
>     vm.create_domain("linux", kernel, ramdisk, cmdline)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 809, in create_domain
>     self.build_domain(ostype, kernel, ramdisk, cmdline, memmap)
>   File "/usr/lib/python/xen/xend/XendDomainInfo.py", line 
> 789, in build_domain
>     vcpus          = self.vcpus)
> error: (0, 'Error')
> 
> This reveals that, for some misterious reason, the condition
> "ctxt->pt_base != 0" evaluates TRUE. Why is this happening? What's
> more, replacing the "#if 1" with an "#if 0" fixes the problem for me:
> the domain is created and works properly.
> 
> Any ideas?
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
> Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/xen-devel
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>