Skip to contentSkip to conversation

xen: rename gntdev and evtdev modules to be less generic

PATCH In review Ian Campbell 4 participants 10 messages Dec 6, 2009 – Dec 11, 2009 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: rename gntdev and evtdev modules to be less generic

Also allow gntdev to be built as a module.

Cc Jeremy Fitzhardinge <[email protected]>
---
 drivers/xen/Kconfig  |    2 +-
 drivers/xen/Makefile |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/xen/Kconfig +1 -1
index 22c8818..a2833bb 100644
@@ -169,7 +169,7 @@ config XEN_S3
        depends on XEN_DOM0 && ACPI
        
 config XEN_GNTDEV
-	bool "userspace grant access device driver"
+	tristate "userspace grant access device driver"
 	depends on XEN
 	select MMU_NOTIFIER
 	help
drivers/xen/Makefile +5 -2
index f7893f3..3288930 100644
@@ -8,8 +8,8 @@ obj-$(CONFIG_PCI)			+= pci.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= cpu_hotplug.o
 obj-$(CONFIG_XEN_XENCOMM)		+= xencomm.o
 obj-$(CONFIG_XEN_BALLOON)		+= balloon.o
-obj-$(CONFIG_XEN_DEV_EVTCHN)		+= evtchn.o
-obj-$(CONFIG_XEN_GNTDEV)		+= gntdev.o
+obj-$(CONFIG_XEN_DEV_EVTCHN)		+= xen-evtchn.o
+obj-$(CONFIG_XEN_GNTDEV)		+= xen-gntdev.o
 obj-$(CONFIG_XEN_BLKDEV_BACKEND)	+= blkback/
 obj-$(CONFIG_XEN_BLKDEV_TAP)            += blktap/
 obj-$(CONFIG_XEN_NETDEV_BACKEND)	+= netback/
@@ -19,3 +19,6 @@ obj-$(CONFIG_XEN_SYS_HYPERVISOR)	+= sys-hypervisor.o
 obj-$(CONFIG_XEN_S3)			+= acpi.o
 obj-$(CONFIG_XEN_MCE)			+= mce.o
 obj-$(CONFIG_ACPI_PROCESSOR_XEN)	+= acpi_processor.o
+
+xen-evtchn-y				:= evtchn.o
+xen-gntdev-y				:= gntdev.o
Signature · 1 line
1.6.5.3
#1 lore raw
Quoted 2 lines · Ian Campbell

Also allow gntdev to be built as a module.

I'm thinking of dropping gntdev; it doesn't work at present (ends up trying to take a mutex in a spinlock), and I don't think it has any users.

J

Quoted 43 lines
Cc Jeremy Fitzhardinge<[email protected]>
---
  drivers/xen/Kconfig  |    2 +-
  drivers/xen/Makefile |    7 +++++--
  2 files changed, 6 insertions(+), 3 deletions(-)
drivers/xen/Kconfig +1 -1
index 22c8818..a2833bb 100644
@@ -169,7 +169,7 @@ config XEN_S3
         depends on XEN_DOM0&&  ACPI
 
  config XEN_GNTDEV
-	bool "userspace grant access device driver"
+	tristate "userspace grant access device driver"
  	depends on XEN
  	select MMU_NOTIFIER
  	help
drivers/xen/Makefile +5 -2
index f7893f3..3288930 100644
@@ -8,8 +8,8 @@ obj-$(CONFIG_PCI)			+= pci.o
  obj-$(CONFIG_HOTPLUG_CPU)		+= cpu_hotplug.o
  obj-$(CONFIG_XEN_XENCOMM)		+= xencomm.o
  obj-$(CONFIG_XEN_BALLOON)		+= balloon.o
-obj-$(CONFIG_XEN_DEV_EVTCHN)		+= evtchn.o
-obj-$(CONFIG_XEN_GNTDEV)		+= gntdev.o
+obj-$(CONFIG_XEN_DEV_EVTCHN)		+= xen-evtchn.o
+obj-$(CONFIG_XEN_GNTDEV)		+= xen-gntdev.o
  obj-$(CONFIG_XEN_BLKDEV_BACKEND)	+= blkback/
  obj-$(CONFIG_XEN_BLKDEV_TAP)            += blktap/
  obj-$(CONFIG_XEN_NETDEV_BACKEND)	+= netback/
@@ -19,3 +19,6 @@ obj-$(CONFIG_XEN_SYS_HYPERVISOR)	+= sys-hypervisor.o
  obj-$(CONFIG_XEN_S3)			+= acpi.o
  obj-$(CONFIG_XEN_MCE)			+= mce.o
  obj-$(CONFIG_ACPI_PROCESSOR_XEN)	+= acpi_processor.o
+
+xen-evtchn-y				:= evtchn.o
+xen-gntdev-y				:= gntdev.o
#2 lore raw

RE: Re: [PATCH] xen: rename gntdev and evtdev modules to beless generic

Quoted 3 lines

I'm thinking of dropping gntdev; it doesn't work at present (ends up trying to take a mutex in a spinlock), and I don't think it has any

users.

Quoted 3 lines

From memory I think that there is a glx passthrough project that makes

use of it

James

#3 lore raw

Re: Re: [PATCH] xen: rename gntdev and evtdev modules to beless generic

Quoted 9 lines · James Harper
Quoted 3 lines

I'm thinking of dropping gntdev; it doesn't work at present (ends up trying to take a mutex in a spinlock), and I don't think it has any

users.

Quoted 1 line

From memory I think that there is a glx passthrough project that makes
use of it

I don't think there's anything that can't be fixed; its just some locks got moved around. I'll mark it BROKEN for now.

J

#4 lore raw
In reply to Ian Campbell
Quoted 2 lines · Ian Campbell

Also allow gntdev to be built as a module.

I think this breaks auto-loading of evtchn when its a module; I suspect xen-backend.rules needs updating to match.

J

Quoted 43 lines
Cc Jeremy Fitzhardinge<[email protected]>
---
  drivers/xen/Kconfig  |    2 +-
  drivers/xen/Makefile |    7 +++++--
  2 files changed, 6 insertions(+), 3 deletions(-)
drivers/xen/Kconfig +1 -1
index 22c8818..a2833bb 100644
@@ -169,7 +169,7 @@ config XEN_S3
         depends on XEN_DOM0&&  ACPI
 
  config XEN_GNTDEV
-	bool "userspace grant access device driver"
+	tristate "userspace grant access device driver"
  	depends on XEN
  	select MMU_NOTIFIER
  	help
drivers/xen/Makefile +5 -2
index f7893f3..3288930 100644
@@ -8,8 +8,8 @@ obj-$(CONFIG_PCI)			+= pci.o
  obj-$(CONFIG_HOTPLUG_CPU)		+= cpu_hotplug.o
  obj-$(CONFIG_XEN_XENCOMM)		+= xencomm.o
  obj-$(CONFIG_XEN_BALLOON)		+= balloon.o
-obj-$(CONFIG_XEN_DEV_EVTCHN)		+= evtchn.o
-obj-$(CONFIG_XEN_GNTDEV)		+= gntdev.o
+obj-$(CONFIG_XEN_DEV_EVTCHN)		+= xen-evtchn.o
+obj-$(CONFIG_XEN_GNTDEV)		+= xen-gntdev.o
  obj-$(CONFIG_XEN_BLKDEV_BACKEND)	+= blkback/
  obj-$(CONFIG_XEN_BLKDEV_TAP)            += blktap/
  obj-$(CONFIG_XEN_NETDEV_BACKEND)	+= netback/
@@ -19,3 +19,6 @@ obj-$(CONFIG_XEN_SYS_HYPERVISOR)	+= sys-hypervisor.o
  obj-$(CONFIG_XEN_S3)			+= acpi.o
  obj-$(CONFIG_XEN_MCE)			+= mce.o
  obj-$(CONFIG_ACPI_PROCESSOR_XEN)	+= acpi_processor.o
+
+xen-evtchn-y				:= evtchn.o
+xen-gntdev-y				:= gntdev.o
#5 lore raw
Quoted 5 lines · Jeremy Fitzhardinge
Quoted 2 lines · Ian Campbell

Also allow gntdev to be built as a module.

I think this breaks auto-loading of evtchn when its a module;

It never occurred to me that autoloading would work at all for this driver, I always just load the module explicitly by listing in /etc/modules. What triggers (or is supposed to trigger) autoloading?

Quoted 1 line

I suspect xen-backend.rules needs updating to match.

That is only to do with making sure the node gets called /dev/xen/evtchn (presumably it would be /dev/evtchn, now /dev/xen-evtchn, otherwise). This works for me.

Ian.

#6 lore raw
Quoted 4 lines · Ian Campbell

It never occurred to me that autoloading would work at all for this driver, I always just load the module explicitly by listing in /etc/modules. What triggers (or is supposed to trigger) autoloading?

Magic earwigs? How to misc drivers get autoloaded in general? Possibly not at all.

I always thought it used to work. Oh well, I made it a builtin.

J

#7 lore raw
Quoted 7 lines · Jeremy Fitzhardinge
Quoted 4 lines · Ian Campbell

It never occurred to me that autoloading would work at all for this driver, I always just load the module explicitly by listing in /etc/modules. What triggers (or is supposed to trigger) autoloading?

Magic earwigs? How to misc drivers get autoloaded in general?

In the absence of an explicit request_module or module alias which matches a device on a bus somewhere I don't think anything much has been autoloaded since udev came along since the only other way was the old "open a device node with no driver" method and udev effectively removed those device nodes.

A module alias won't work since there is no device on a bus which could match this driver and I can't find a request_module for evtchn anywhere. If we think this driver should always get loaded when Xen is running then I think a late_initcall which calls request_module might be the way to go, although I'm not sure late_initcall is late enough sine it needs to be when the proper root is mounted.

Ian.

#8 lore raw
In reply to Jeremy Fitzhardinge
Quoted 10 lines · Jeremy Fitzhardinge
Quoted 4 lines · Ian Campbell

It never occurred to me that autoloading would work at all for this driver, I always just load the module explicitly by listing in /etc/modules. What triggers (or is supposed to trigger) autoloading?

Magic earwigs? How to misc drivers get autoloaded in general? Possibly not at all.

I always thought it used to work. Oh well, I made it a builtin.

I guess you are using Fedora? Looks
like /etc/sysconfig/modules/xen.modules needs updating.

I've cc'd the two most recently listed people in the xen.spec changelog.

Gerd, Justin, the {evtchn,blkbk,netbk}.ko modules are going to be renamed to xen-{evtchn,blkback,netback}.ko at some point in the future.

Ian.

#9 lore raw
Quoted 2 lines · Ian Campbell

Gerd, Justin, the {evtchn,blkbk,netbk}.ko modules are going to be renamed to xen-{evtchn,blkback,netback}.ko at some point in the future.

New packages (3.4.2 update + this one) are going to enter rawhide and f12-updates-testing soon.

cheers,
Gerd