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

[Xen-devel] DOM0_GETDOMAININFO intended behavior



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


 


Rackspace

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