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-changelog

[Xen-changelog] privcmd.h, privcmd.c:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] privcmd.h, privcmd.c:
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 17 Jun 2005 08:47:00 +0000
Delivery-date: Sat, 18 Jun 2005 01:01:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] privcmd.h, privcmd.c:, BitKeeper Bot <=