Skip to contentSkip to conversation

V2, Move stuff out of xenfs

PATCH In review Bastian Blank 4 participants 18 messages Dec 7, 2011 – Dec 10, 2011 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

cover V2, Move stuff out of xenfs

In <[email protected]> I started the discussion about xenfs and the usage of it. This is the second try to move stuff over into normal device drivers.

Changes:
- Remove guest_capabilities stuff. It is only used to detect if the init scripts should start anything.
- Fix error values.

Bastian

#1 lore raw

PATCH 1/4 xen: Add privcmd device driver

Access to arbitrary hypercalls is currently provided via xenfs. This adds a standard character device to handle this. The support in xenfs remains for backward compatibility and uses the device driver code.

---
 drivers/xen/Kconfig               |    7 ++++++
 drivers/xen/Makefile              |    2 +
 drivers/xen/{xenfs => }/privcmd.c |   39 ++++++++++++++++++++++++++++++++++++-
 drivers/xen/privcmd.h             |    3 ++
 drivers/xen/xenfs/Makefile        |    2 +-
 drivers/xen/xenfs/super.c         |    3 +-
 drivers/xen/xenfs/xenfs.h         |    1 -
 7 files changed, 53 insertions(+), 4 deletions(-)
 rename drivers/xen/{xenfs => }/privcmd.c (92%)
 create mode 100644 drivers/xen/privcmd.h
drivers/xen/Kconfig +7 -0
index 8795480..a1ced52 100644
@@ -86,6 +86,7 @@ config XEN_BACKEND
 
 config XENFS
 	tristate "Xen filesystem"
+	select XEN_PRIVCMD
 	default y
 	help
 	  The xen filesystem provides a way for domains to share
@@ -171,4 +172,10 @@ config XEN_PCIDEV_BACKEND
 	  xen-pciback.hide=(03:00.0)(04:00.0)
 
 	  If in doubt, say m.
+
+config XEN_PRIVCMD
+	tristate
+	depends on XEN
+	default m
+
 endmenu
drivers/xen/Makefile +2 -0
index 974fffd..aa31337 100644
@@ -19,7 +19,9 @@ obj-$(CONFIG_XEN_TMEM)			+= tmem.o
 obj-$(CONFIG_SWIOTLB_XEN)		+= swiotlb-xen.o
 obj-$(CONFIG_XEN_DOM0)			+= pci.o
 obj-$(CONFIG_XEN_PCIDEV_BACKEND)	+= xen-pciback/
+obj-$(CONFIG_XEN_PRIVCMD)		+= xen-privcmd.o
 
 xen-evtchn-y				:= evtchn.o
 xen-gntdev-y				:= gntdev.o
 xen-gntalloc-y				:= gntalloc.o
+xen-privcmd-y				:= privcmd.o
drivers/xen/privcmd.c renamed from drivers/xen/xenfs/privcmd.c +38 -1
similarity index 92%
rename from drivers/xen/xenfs/privcmd.c
rename to drivers/xen/privcmd.c
index dbd3b16..863fbd0 100644
@@ -7,6 +7,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
@@ -18,6 +19,7 @@
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 #include <linux/seq_file.h>
+#include <linux/miscdevice.h>
 
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
@@ -32,6 +34,10 @@
 #include <xen/page.h>
 #include <xen/xen-ops.h>
 
+#include "privcmd.h"
+
+MODULE_LICENSE("GPL");
+
 #ifndef HAVE_ARCH_PRIVCMD_MMAP
 static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma);
 #endif
@@ -394,7 +400,38 @@ static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma)
 }
 #endif
 
-const struct file_operations privcmd_file_ops = {
+const struct file_operations xen_privcmd_fops = {
+	.owner = THIS_MODULE,
 	.unlocked_ioctl = privcmd_ioctl,
 	.mmap = privcmd_mmap,
 };
+EXPORT_SYMBOL_GPL(xen_privcmd_fops);
+
+static struct miscdevice privcmd_dev = {
+	.minor = MISC_DYNAMIC_MINOR,
+	.name = "xen/privcmd",
+	.fops = &xen_privcmd_fops,
+};
+
+static int __init privcmd_init(void)
+{
+	int err;
+
+	if (!xen_domain())
+		return -ENODEV;
+
+	err = misc_register(&privcmd_dev);
+	if (err != 0) {
+		printk(KERN_ERR "Could not register privcmd device\n");
+		return err;
+	}
+	return 0;
+}
+
+static void __exit privcmd_exit(void)
+{
+	misc_deregister(&privcmd_dev);
+}
+
+module_init(privcmd_init);
+module_exit(privcmd_exit);
drivers/xen/privcmd.h new file +3 -0
new file mode 100644
index 0000000..14facae
@@ -0,0 +1,3 @@
+#include <linux/fs.h>
+
+extern const struct file_operations xen_privcmd_fops;
drivers/xen/xenfs/Makefile +1 -1
index 4fde944..5d45ff1 100644
@@ -1,4 +1,4 @@
 obj-$(CONFIG_XENFS) += xenfs.o
 
-xenfs-y			  = super.o xenbus.o privcmd.o
+xenfs-y			  = super.o xenbus.o
 xenfs-$(CONFIG_XEN_DOM0) += xenstored.o
drivers/xen/xenfs/super.c +2 -1
index 1aa3897..a55fbf9 100644
@@ -16,6 +16,7 @@
 #include <xen/xen.h>
 
 #include "xenfs.h"
+#include "../privcmd.h"
 
 #include <asm/xen/hypervisor.h>
 
@@ -84,7 +85,7 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
 		[1] = {},
 		{ "xenbus", &xenbus_file_ops, S_IRUSR|S_IWUSR },
 		{ "capabilities", &capabilities_file_ops, S_IRUGO },
-		{ "privcmd", &privcmd_file_ops, S_IRUSR|S_IWUSR },
+		{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
 		{""},
 	};
 	int rc;
drivers/xen/xenfs/xenfs.h +0 -1
index b68aa62..5056306 100644
@@ -2,7 +2,6 @@
 #define _XENFS_XENBUS_H
 
 extern const struct file_operations xenbus_file_ops;
-extern const struct file_operations privcmd_file_ops;
 extern const struct file_operations xsd_kva_file_ops;
 extern const struct file_operations xsd_port_file_ops;
 
Signature · 1 line
1.7.7.3
Acked-by on v1 1/4
#2 lore raw

Re: [Xen-devel] [PATCH 1/4] xen: Add privcmd device driver

drivers/xen/privcmd.c static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma) · line 425

Quoted 10 lines · Bastian Blank
drivers/xen/privcmd.c renamed from drivers/xen/xenfs/privcmd.c +10 -0
+static int __init privcmd_init(void)
+{
+       int err;
+
+       if (!xen_domain())
+               return -ENODEV;
+
+       err = misc_register(&privcmd_dev);
+       if (err != 0) {
+               printk(KERN_ERR "Could not register privcmd device\n"); 

Should say "...register Xen privcmd device". Otherwise:

#3 lore raw

PATCH 2/4 xen: Add xenbus device driver

In reply to Bastian Blank

Access to xenbus is currently handled via xenfs. This adds a device driver for xenbus and makes xenfs use this code.

---
 drivers/xen/xenbus/Makefile                        |    1 +
 drivers/xen/xenbus/xenbus_comms.h                  |    4 ++
 .../xenbus.c => xenbus/xenbus_dev_frontend.c}      |   37 ++++++++++++++++++--
 drivers/xen/xenfs/Makefile                         |    2 +-
 drivers/xen/xenfs/super.c                          |    3 +-
 drivers/xen/xenfs/xenfs.h                          |    1 -
 6 files changed, 42 insertions(+), 6 deletions(-)
 rename drivers/xen/{xenfs/xenbus.c => xenbus/xenbus_dev_frontend.c} (95%)
drivers/xen/xenbus/Makefile +1 -0
index 8dca685..a2ea363 100644
@@ -1,4 +1,5 @@
 obj-y	+= xenbus.o
+obj-y	+= xenbus_dev_frontend.o
 
 xenbus-objs =
 xenbus-objs += xenbus_client.o
drivers/xen/xenbus/xenbus_comms.h +4 -0
index c21db75..6e42800 100644
@@ -31,6 +31,8 @@
 #ifndef _XENBUS_COMMS_H
 #define _XENBUS_COMMS_H
 
+#include <linux/fs.h>
+
 int xs_init(void);
 int xb_init_comms(void);
 
@@ -43,4 +45,6 @@ int xs_input_avail(void);
 extern struct xenstore_domain_interface *xen_store_interface;
 extern int xen_store_evtchn;
 
+extern const struct file_operations xen_xenbus_fops;
+
 #endif /* _XENBUS_COMMS_H */
drivers/xen/xenbus/xenbus_dev_frontend.c renamed from drivers/xen/xenfs/xenbus.c +34 -3
similarity index 95%
rename from drivers/xen/xenfs/xenbus.c
rename to drivers/xen/xenbus/xenbus_dev_frontend.c
index bbd000f..fb30cff 100644
@@ -52,13 +52,16 @@
 #include <linux/namei.h>
 #include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/miscdevice.h>
+#include <linux/module.h>
 
-#include "xenfs.h"
-#include "../xenbus/xenbus_comms.h"
+#include "xenbus_comms.h"
 
 #include <xen/xenbus.h>
 #include <asm/xen/hypervisor.h>
 
+MODULE_LICENSE("GPL");
+
 /*
  * An element of a list of outstanding transactions, for which we're
  * still waiting a reply.
@@ -583,7 +586,7 @@ static unsigned int xenbus_file_poll(struct file *file, poll_table *wait)
 	return 0;
 }
 
-const struct file_operations xenbus_file_ops = {
+const struct file_operations xen_xenbus_fops = {
 	.read = xenbus_file_read,
 	.write = xenbus_file_write,
 	.open = xenbus_file_open,
@@ -591,3 +594,31 @@ const struct file_operations xenbus_file_ops = {
 	.poll = xenbus_file_poll,
 	.llseek = no_llseek,
 };
+EXPORT_SYMBOL_GPL(xen_xenbus_fops);
+
+static struct miscdevice xenbus_dev = {
+	.minor = MISC_DYNAMIC_MINOR,
+	.name = "xen/xenbus",
+	.fops = &xen_xenbus_fops,
+};
+
+static int __init xenbus_init(void)
+{
+	int err;
+
+	if (!xen_domain())
+		return -ENODEV;
+
+	err = misc_register(&xenbus_dev);
+	if (err)
+		printk(KERN_ERR "Could not register xenbus device\n");
+	return err;
+}
+
+static void __exit xenbus_exit(void)
+{
+	misc_deregister(&xenbus_dev);
+}
+
+module_init(xenbus_init);
+module_exit(xenbus_exit);
drivers/xen/xenfs/Makefile +1 -1
index 5d45ff1..b019865 100644
@@ -1,4 +1,4 @@
 obj-$(CONFIG_XENFS) += xenfs.o
 
-xenfs-y			  = super.o xenbus.o
+xenfs-y			  = super.o
 xenfs-$(CONFIG_XEN_DOM0) += xenstored.o
drivers/xen/xenfs/super.c +2 -1
index a55fbf9..a84b53c 100644
@@ -17,6 +17,7 @@
 
 #include "xenfs.h"
 #include "../privcmd.h"
+#include "../xenbus/xenbus_comms.h"
 
 #include <asm/xen/hypervisor.h>
 
@@ -83,7 +84,7 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
 {
 	static struct tree_descr xenfs_files[] = {
 		[1] = {},
-		{ "xenbus", &xenbus_file_ops, S_IRUSR|S_IWUSR },
+		{ "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
 		{ "capabilities", &capabilities_file_ops, S_IRUGO },
 		{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
 		{""},
drivers/xen/xenfs/xenfs.h +0 -1
index 5056306..6b80c77 100644
@@ -1,7 +1,6 @@
 #ifndef _XENFS_XENBUS_H
 #define _XENFS_XENBUS_H
 
-extern const struct file_operations xenbus_file_ops;
 extern const struct file_operations xsd_kva_file_ops;
 extern const struct file_operations xsd_port_file_ops;
 
Signature · 1 line
1.7.7.3
Acked-by on v1 2/4
#4 lore raw

Re: [Xen-devel] [PATCH 2/4] xen: Add xenbus device driver

Quoted 4 lines · Bastian Blank

Access to xenbus is currently handled via xenfs. This adds a device driver for xenbus and makes xenfs use this code.

Quoted 150 lines
---
 drivers/xen/xenbus/Makefile                        |    1 +
 drivers/xen/xenbus/xenbus_comms.h                  |    4 ++
 .../xenbus.c => xenbus/xenbus_dev_frontend.c}      |   37 ++++++++++++++++++--
 drivers/xen/xenfs/Makefile                         |    2 +-
 drivers/xen/xenfs/super.c                          |    3 +-
 drivers/xen/xenfs/xenfs.h                          |    1 -
 6 files changed, 42 insertions(+), 6 deletions(-)
 rename drivers/xen/{xenfs/xenbus.c => xenbus/xenbus_dev_frontend.c} (95%)
drivers/xen/xenbus/Makefile +1 -0
index 8dca685..a2ea363 100644
@@ -1,4 +1,5 @@
 obj-y	+= xenbus.o
+obj-y	+= xenbus_dev_frontend.o
 
 xenbus-objs =
 xenbus-objs += xenbus_client.o
drivers/xen/xenbus/xenbus_comms.h +4 -0
index c21db75..6e42800 100644
@@ -31,6 +31,8 @@
 #ifndef _XENBUS_COMMS_H
 #define _XENBUS_COMMS_H
 
+#include <linux/fs.h>
+
 int xs_init(void);
 int xb_init_comms(void);
 
@@ -43,4 +45,6 @@ int xs_input_avail(void);
 extern struct xenstore_domain_interface *xen_store_interface;
 extern int xen_store_evtchn;
 
+extern const struct file_operations xen_xenbus_fops;
+
 #endif /* _XENBUS_COMMS_H */
drivers/xen/xenbus/xenbus_dev_frontend.c renamed from drivers/xen/xenfs/xenbus.c +34 -3
similarity index 95%
rename from drivers/xen/xenfs/xenbus.c
rename to drivers/xen/xenbus/xenbus_dev_frontend.c
index bbd000f..fb30cff 100644
@@ -52,13 +52,16 @@
 #include <linux/namei.h>
 #include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/miscdevice.h>
+#include <linux/module.h>
 
-#include "xenfs.h"
-#include "../xenbus/xenbus_comms.h"
+#include "xenbus_comms.h"
 
 #include <xen/xenbus.h>
 #include <asm/xen/hypervisor.h>
 
+MODULE_LICENSE("GPL");
+
 /*
  * An element of a list of outstanding transactions, for which we're
  * still waiting a reply.
@@ -583,7 +586,7 @@ static unsigned int xenbus_file_poll(struct file *file, poll_table *wait)
 	return 0;
 }
 
-const struct file_operations xenbus_file_ops = {
+const struct file_operations xen_xenbus_fops = {
 	.read = xenbus_file_read,
 	.write = xenbus_file_write,
 	.open = xenbus_file_open,
@@ -591,3 +594,31 @@ const struct file_operations xenbus_file_ops = {
 	.poll = xenbus_file_poll,
 	.llseek = no_llseek,
 };
+EXPORT_SYMBOL_GPL(xen_xenbus_fops);
+
+static struct miscdevice xenbus_dev = {
+	.minor = MISC_DYNAMIC_MINOR,
+	.name = "xen/xenbus",
+	.fops = &xen_xenbus_fops,
+};
+
+static int __init xenbus_init(void)
+{
+	int err;
+
+	if (!xen_domain())
+		return -ENODEV;
+
+	err = misc_register(&xenbus_dev);
+	if (err)
+		printk(KERN_ERR "Could not register xenbus device\n");
+	return err;
+}
+
+static void __exit xenbus_exit(void)
+{
+	misc_deregister(&xenbus_dev);
+}
+
+module_init(xenbus_init);
+module_exit(xenbus_exit);
drivers/xen/xenfs/Makefile +1 -1
index 5d45ff1..b019865 100644
@@ -1,4 +1,4 @@
 obj-$(CONFIG_XENFS) += xenfs.o
 
-xenfs-y			  = super.o xenbus.o
+xenfs-y			  = super.o
 xenfs-$(CONFIG_XEN_DOM0) += xenstored.o
drivers/xen/xenfs/super.c +2 -1
index a55fbf9..a84b53c 100644
@@ -17,6 +17,7 @@
 
 #include "xenfs.h"
 #include "../privcmd.h"
+#include "../xenbus/xenbus_comms.h"
 
 #include <asm/xen/hypervisor.h>
 
@@ -83,7 +84,7 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
 {
 	static struct tree_descr xenfs_files[] = {
 		[1] = {},
-		{ "xenbus", &xenbus_file_ops, S_IRUSR|S_IWUSR },
+		{ "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
 		{ "capabilities", &capabilities_file_ops, S_IRUGO },
 		{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
 		{""},
drivers/xen/xenfs/xenfs.h +0 -1
index 5056306..6b80c77 100644
@@ -1,7 +1,6 @@
 #ifndef _XENFS_XENBUS_H
 #define _XENFS_XENBUS_H
 
-extern const struct file_operations xenbus_file_ops;
 extern const struct file_operations xsd_kva_file_ops;
 extern const struct file_operations xsd_port_file_ops;
 
#5 lore raw

PATCH 3/4 xen: Add xenbusd device driver

In reply to Bastian Blank

Access for xenstored to the event channel and pre-allocated ring is managed via xenfs. This adds its own device driver featuring mmap for the ring and an ioctl for the event channel.

---
 drivers/xen/xenbus/Makefile             |    1 +
 drivers/xen/xenbus/xenbus_dev_backend.c |   79 +++++++++++++++++++++++++++++++
 include/xen/xenbus_dev.h                |   41 ++++++++++++++++
 3 files changed, 121 insertions(+), 0 deletions(-)
 create mode 100644 drivers/xen/xenbus/xenbus_dev_backend.c
 create mode 100644 include/xen/xenbus_dev.h
drivers/xen/xenbus/Makefile +1 -0
index a2ea363..31e2e90 100644
@@ -10,4 +10,5 @@ xenbus-objs += xenbus_probe.o
 xenbus-be-objs-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
 xenbus-objs += $(xenbus-be-objs-y)
 
+obj-$(CONFIG_XEN_BACKEND) += xenbus_dev_backend.o
 obj-$(CONFIG_XEN_XENBUS_FRONTEND) += xenbus_probe_frontend.o
drivers/xen/xenbus/xenbus_dev_backend.c new file +79 -0

79 lines not on this page · raw message

include/xen/xenbus_dev.h new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
1.7.7.3
Acked-by on v1 3/4
#6 lore raw

Re: [Xen-devel] [PATCH 3/4] xen: Add xenbusd device driver

Quoted 18 lines · Bastian Blank

Access for xenstored to the event channel and pre-allocated ring is managed via xenfs. This adds its own device driver featuring mmap for the ring and an ioctl for the event channel.

---
 drivers/xen/xenbus/Makefile             |    1 +
 drivers/xen/xenbus/xenbus_dev_backend.c |   79 +++++++++++++++++++++++++++++++
 include/xen/xenbus_dev.h                |   41 ++++++++++++++++
 3 files changed, 121 insertions(+), 0 deletions(-)
 create mode 100644 drivers/xen/xenbus/xenbus_dev_backend.c
 create mode 100644 include/xen/xenbus_dev.h
drivers/xen/xenbus/Makefile +0 -0
index a2ea363..31e2e90 100644

drivers/xen/xenbus/Makefile xenbus-objs += xenbus_probe.o · line 13

Quoted 4 lines
drivers/xen/xenbus/Makefile +1 -0
@@ -10,4 +10,5 @@ xenbus-objs += xenbus_probe.o
 xenbus-be-objs-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
 xenbus-objs += $(xenbus-be-objs-y)
 
+obj-$(CONFIG_XEN_BACKEND) += xenbus_dev_backend.o

In principal this could be its own module which does not depend on any of the backend stuff but I think this is fine for now.

drivers/xen/xenbus/Makefile

Quoted 12 lines

[...]

drivers/xen/xenbus/Makefile +10 -0
+static int __init xenbusd_init(void)
+{
+	int err;
+
+	if (!xen_initial_domain())
+		return -ENODEV;
+
+	err = misc_register(&xenbusd_dev);
+	if (err)
+		printk(KERN_ERR "Could not register xenbus device\n");

"Could not register xenbus backend device" to distinguish from the f.e. failure message, you could also add "frontend" there I suppose. Other than that:

#7 lore raw

Re: [Xen-devel] [PATCH 3/4] xen: Add xenbusd device driver

Quoted 4 lines · Ian Campbell
Quoted 1 line · Bastian Blank

+obj-$(CONFIG_XEN_BACKEND) += xenbus_dev_backend.o

In principal this could be its own module which does not depend on any of the backend stuff but I think this is fine for now.

I even think about registering this device from xenstored_local_init in xenbus_probe.c. Then it will be available only if the kernel also owns the communcation ring.

Quoted 3 lines

"Could not register xenbus backend device" to distinguish from the f.e. failure message, you could also add "frontend" there I suppose. Other than that:

Yep.

Will someone mind if I rename this device to xenbus_backend? It's more clear.

Bastian

Signature · 1 line
Deflector shields just came on, Captain.
#8 lore raw

Re: [Xen-devel] [PATCH 3/4] xen: Add xenbusd device driver

Quoted 9 lines · Bastian Blank
Quoted 4 lines · Ian Campbell
Quoted 1 line · Bastian Blank

+obj-$(CONFIG_XEN_BACKEND) += xenbus_dev_backend.o

In principal this could be its own module which does not depend on any of the backend stuff but I think this is fine for now.

I even think about registering this device from xenstored_local_init in xenbus_probe.c. Then it will be available only if the kernel also owns the communcation ring.

That sounds like a good idea.

Quoted 8 lines
Quoted 3 lines

"Could not register xenbus backend device" to distinguish from the f.e. failure message, you could also add "frontend" there I suppose. Other than that:

Yep.

Will someone mind if I rename this device to xenbus_backend? It's more clear.

It's ok by me. You could even use "xenstored"?

Ian.

#9 lore raw

Re: [Xen-devel] [PATCH 3/4] xen: Add xenbusd device driver

In reply to Bastian Blank
Quoted 3 lines · Bastian Blank

I even think about registering this device from xenstored_local_init in xenbus_probe.c. Then it will be available only if the kernel also owns the communcation ring.

I'm not sure if I'm allowed to register character devices from a postcore_initcall. Isn't this function called a bit early anyway?

Bastian

Signature · 3 lines
Each kiss is as the first.
		-- Miramanee, Kirk's wife, "The Paradise Syndrome",
		   stardate 4842.6
#10 lore raw

PATCH 4/4 xen/privcmd: Remove unused support for arch specific privcmp mmap

In reply to Bastian Blank
---
 drivers/xen/privcmd.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/xen/privcmd.c +0 -2
index 863fbd0..c13d26a 100644
@@ -365,7 +365,6 @@ static long privcmd_ioctl(struct file *file,
 	return ret;
 }
 
-#ifndef HAVE_ARCH_PRIVCMD_MMAP
 static int privcmd_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
 	printk(KERN_DEBUG "privcmd_fault: vma=%p %lx-%lx, pgoff=%lx, uv=%p\n",
@@ -398,7 +397,6 @@ static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma)
 {
 	return (xchg(&vma->vm_private_data, (void *)1) == NULL);
 }
-#endif
 
 const struct file_operations xen_privcmd_fops = {
 	.owner = THIS_MODULE,
Signature · 1 line
1.7.7.3
Acked-by on v1 4/4
#11 lore raw

Re: [Xen-devel] [PATCH 4/4] xen/privcmd: Remove unused support for arch specific privcmp mmap

Quoted 1 line · Bastian Blank

---

You've forgotten the S-o-b for this patch.

Once upon a time this was used by the ia64 privcmd support[0] but since no one appears to be working on ia64 dom0 support for upstream I'm not sure if this is an issue or not. I lean towards "not", this can always be put back as necessary.

[0]
http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/file/bffd07392da5/arch/ia64/xen/hypervisor.c#l659
http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/file/bffd07392da5/include/asm-ia64/hypervisor.h#l132

Quoted 23 lines
 drivers/xen/privcmd.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/xen/privcmd.c +0 -2
index 863fbd0..c13d26a 100644
@@ -365,7 +365,6 @@ static long privcmd_ioctl(struct file *file,
 	return ret;
 }
 
-#ifndef HAVE_ARCH_PRIVCMD_MMAP
 static int privcmd_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
 	printk(KERN_DEBUG "privcmd_fault: vma=%p %lx-%lx, pgoff=%lx, uv=%p\n",
@@ -398,7 +397,6 @@ static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma)
 {
 	return (xchg(&vma->vm_private_data, (void *)1) == NULL);
 }
-#endif
 
 const struct file_operations xen_privcmd_fops = {
 	.owner = THIS_MODULE,
#12 lore raw
In reply to Bastian Blank
Quoted 3 lines · Bastian Blank

In <[email protected]> I started the discussion about xenfs and the usage of it. This is the second try to move stuff over into normal device drivers.

I had a few nit picks about error messages but otherwise I'm happy with this.

How are we doing on the corresponding toolstack changes?

Ian.

#13 lore raw
Quoted 1 line · Ian Campbell

How are we doing on the corresponding toolstack changes?

I have at least parts of it somewhere on my workstation. I'll polish and submit them also.

Bastian

Signature · 2 lines
Witch!  Witch!  They'll burn ya!
		-- Hag, "Tomorrow is Yesterday", stardate unknown
#14 lore raw
Quoted 5 lines · Bastian Blank
Quoted 1 line · Ian Campbell

How are we doing on the corresponding toolstack changes?

I have at least parts of it somewhere on my workstation. I'll polish and submit them also.

I assume the toolstack will fall back to xenfs if the devices don't exist?

David

#15 lore raw
Quoted 6 lines · David Vrabel
Quoted 4 lines · Bastian Blank
Quoted 1 line · Ian Campbell

How are we doing on the corresponding toolstack changes?

I have at least parts of it somewhere on my workstation. I'll polish and submit them also.

I assume the toolstack will fall back to xenfs if the devices don't exist?

This was the plan.

Bastian

Signature · 4 lines
	"Get back to your stations!"
	"We're beaming down to the planet, sir."
		-- Kirk and Mr. Leslie, "This Side of Paradise",
		   stardate 3417.3
#16 lore raw
In reply to Bastian Blank
Quoted 3 lines · Bastian Blank

In<[email protected]> I started the discussion about xenfs and the usage of it. This is the second try to move stuff over into normal device drivers.

You still don't say why this is needed in the commit messages. I can't find the message you refer to in the previous thread (the mail archives don't let you search by message-id).

David

#17 lore raw
Quoted 7 lines · David Vrabel
Quoted 3 lines · Bastian Blank

In<[email protected]> I started the discussion about xenfs and the usage of it. This is the second try to move stuff over into normal device drivers.

You still don't say why this is needed in the commit messages. I can't find the message you refer to in the previous thread (the mail archives don't let you search by message-id).

I prefer gmane to this problem.
http://mid.gmane.org/[email protected]
works fine.

Signature · 3 lines
Each kiss is as the first.
		-- Miramanee, Kirk's wife, "The Paradise Syndrome",
		   stardate 4842.6