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] DOM0_GETDOMAININFO intended behavior

To: Daniel Stekloff <dsteklof@xxxxxxxxxx>
Subject: Re: [Xen-devel] DOM0_GETDOMAININFO intended behavior
From: Kip Macy <kip.macy@xxxxxxxxx>
Date: Fri, 3 Jun 2005 17:43:44 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 04 Jun 2005 00:43:34 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=K4FNjoxpdvmv1BaukOoR336fZ3hd9eCJSj/KBvVpKeZlhUCEv8CQrKesffH9YHM70A6wlJsgstBimXFX4mx9BmMp681C27mCOuF9a9uLrBjZ/s9ySBXUtVVjy4VRcd/wDqDIvn+Yl8Rvb7F2ozgEXnsseeJlih/oIflrXboVVts=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1117840723.11942.12.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1117840723.11942.12.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: Kip Macy <kip.macy@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
:-) 
I asked the same question a week or two ago and yes it is intended. It
provides for easy iteration. I think it is kind of a hackish interface
as it isn't uniform with *all* the other DOM0 calls. However, it works
and once you know to check the domid return value your code will work
as expected.


                      -Kip

On 6/3/05, Daniel Stekloff <dsteklof@xxxxxxxxxx> wrote:
> 
> Hi,
> 
> Is it intended behavior for DOM0_GETDOMAININFO to return the next
> domain's info if a requested domain doesn't exist?
> 
> In xeno-unstable - xen/common/dom0_ops.c - lines 310-325:
> 
>         for_each_domain ( d )
>         {
>             if ( d->domain_id >= op->u.getdomaininfo.domain )
>                 break;
>         }
> 
>         if ( (d == NULL) || !get_domain(d) )
>         {
>             read_unlock(&domlist_lock);
>             ret = -ESRCH;
>             break;
>         }
> 
>         read_unlock(&domlist_lock);
> 
>         op->u.getdomaininfo.domain = d->domain_id;
> 
> 
> 
> If, as an example, I request info for domain 2 that doesn't exist
> anymore and a higher domain number does exist, xen will return the next
> domain's information rather than an error telling me domain 2 doesn't
> exist.
> 
> Is this correct?
> 
> I noticed that libxc's xc_domain_getinfo() is built to use this when
> grabbing multiple domain information. I want to know if we need to fix
> vm-list to check what's returned or if this is unwanted behavior in the
> library and hypervisor.
> 
> Thanks,
> 
> Dan
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

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