Commit 5db1e887 authored by Yathindra Naik's avatar Yathindra Naik

Debugging xenstore. Put a bunch of logging code.

parent be2d443d
This diff is collapsed.
......@@ -274,6 +274,12 @@ int get_domid(struct connection *conn)
bool domain_is_cap(struct connection *conn)
{
if(conn)
xprintf("domain_is_cap: conn is 0x%x\n", conn);
if(conn->domain)
xprintf("domain_is_cap: conn->domain is 0x%x\n",conn->domain);
if(conn->domain->cap_flag)
xprintf("domain_is_cap: cap_flag is %d\n", conn->domain->cap_flag);
return (conn && conn->domain && conn->domain->cap_flag);
}
......@@ -360,6 +366,7 @@ static struct domain *new_domain(void *context, unsigned int domid,
xc_dominfo_t dominfo;
#endif
xprintf("new_domain being created in xenstore.\n");
domain = talloc(context, struct domain);
domain->port = 0;
domain->shutdown = 0;
......@@ -369,19 +376,23 @@ static struct domain *new_domain(void *context, unsigned int domid,
list_add(&domain->list, &domains);
talloc_set_destructor(domain, destroy_domain);
xprintf("new_domain: evtchn_bind_interdomain.\n");
/* Tell kernel we're interested in this event. */
rc = xc_evtchn_bind_interdomain(xce_handle, domid, port);
if (rc == -1)
return NULL;
domain->port = rc;
xprintf("new_domain: domid %d\n",domain->domid);
#ifdef CONFIG_XENCAP
if (xc_domain_getinfo(*xc_handle, domain->domid, 1,
if (xc_domain_getinfo(*xc_handle, domain->domid, 1,
&dominfo) == 1 && dominfo.domid == domain->domid) {
domain->cap_flag = dominfo.cap_flag;
xprintf("new_domain: cap_flag is %d\n",domain->cap_flag);
}
#endif
xprintf("new_domain: after xc_domain_getinfo.\n");
domain->conn = new_connection(writechn, readchn);
domain->conn->domain = domain;
domain->conn->id = domid;
......@@ -390,6 +401,7 @@ static struct domain *new_domain(void *context, unsigned int domid,
domain->nbentry = 0;
domain->nbwatch = 0;
xprintf("new_domain: returning domain 0x%x\n",domain);
return domain;
}
......
......@@ -122,7 +122,10 @@ void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info)
info->domain = d->domain_id;
info->nr_online_vcpus = 0;
info->ssidref = 0;
#if CONFIG_XENCAP
printk("getdomainfo: Domain %d\n",d->domain_id);
#endif
/*
* - domain is marked as blocked only if all its vcpus are blocked
* - domain is marked as running if any of its vcpus is running
......
......@@ -70,7 +70,9 @@ static int cap_domain_create(struct domain *d, u32 ssidref)
dom_cap_space->cap_hypercalls = CAP_BOOT_INFO->cap_hypercalls;
dom_cap_space->num_caps = 0;
d->cap_space = dom_cap_space;
d->cap_flag = 1;
/* Note: Currently, I'm debugging xenstore issues
and i'm setting cap_flag to 0 for domain 0. */
d->cap_flag = 0;
return rc;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment