ChangeSet 1.1713.1.14, 2005/06/17 09:47:00+01:00, cl349@xxxxxxxxxxxxxxxxxxxx
privcmd.h, privcmd.c:
Add IOCTL_PRIVCMD_INITDOMAIN_STORE to setup dom0 xenstore page
and event channel.
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
drivers/xen/privcmd/privcmd.c | 30 ++++++++++++++++++++++++++++++
include/asm-xen/linux-public/privcmd.h | 2 ++
2 files changed, 32 insertions(+)
diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c
b/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c 2005-06-17
21:02:37 -04:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c 2005-06-17
21:02:37 -04:00
@@ -196,6 +196,36 @@
}
break;
+ case IOCTL_PRIVCMD_INITDOMAIN_STORE:
+ {
+ extern int do_xenbus_probe(void*);
+
+ if (xen_start_info.store_evtchn != 0) {
+ ret = -EINVAL;
+ break;
+ }
+
+ /* Allocate page. */
+ xen_start_info.store_page = get_zeroed_page(GFP_KERNEL);
+ if (!xen_start_info.store_page) {
+ ret = -ENOMEM;
+ break;
+ }
+
+ /* We don't refcnt properly, so set reserved on page.
+ * (this allocation is permanent) */
+ SetPageReserved(virt_to_page(xen_start_info.store_page));
+
+ /* Initial connect. Setup channel and page. */
+ xen_start_info.store_evtchn = data;
+ ret = pfn_to_mfn(virt_to_phys((void *)xen_start_info.store_page) >>
+ PAGE_SHIFT);
+
+ /* We'll return then this will wait for daemon to answer */
+ // kthread_run(do_xenbus_probe, NULL, "xenbus_probe");
+ }
+ break;
+
default:
ret = -EINVAL;
break;
diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
b/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
--- a/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
2005-06-17 21:02:37 -04:00
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
2005-06-17 21:02:37 -04:00
@@ -84,5 +84,7 @@
_IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
_IOC(_IOC_READ, 'P', 4, sizeof(unsigned long))
+#define IOCTL_PRIVCMD_INITDOMAIN_STORE \
+ _IOC(_IOC_READ, 'P', 5, 0)
#endif /* __PRIVCMD_H__ */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|