* [PATCH 19/21] Staging: hv: Get rid of the forward declaration for vmbus_device_release
From: K. Y. Srinivasan @ 2011-03-10 22:15 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the forward declaration of vmbus_device_release by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 27 ++++++++++++---------------
1 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 6f4094b..7c16acd 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -53,8 +53,6 @@ struct hv_bus {
static irqreturn_t vmbus_isr(int irq, void *dev_id);
-static void vmbus_device_release(struct device *device);
-
static ssize_t vmbus_show_device_attr(struct device *dev,
struct device_attribute *dev_attr,
char *buf);
@@ -300,6 +298,18 @@ static void vmbus_shutdown(struct device *child_device)
return;
}
+
+/*
+ * vmbus_device_release - Final callback release of the vmbus child device
+ */
+static void vmbus_device_release(struct device *device)
+{
+ struct hv_device *device_ctx = device_to_hv_device(device);
+
+ kfree(device_ctx);
+
+}
+
/* The one and only one */
static struct hv_bus hv_bus = {
.bus.name = "vmbus",
@@ -848,19 +858,6 @@ void vmbus_child_device_unregister(struct hv_device *device_obj)
}
-/*
- * vmbus_device_release - Final callback release of the vmbus child device
- */
-static void vmbus_device_release(struct device *device)
-{
- struct hv_device *device_ctx = device_to_hv_device(device);
-
- kfree(device_ctx);
-
- /* !!DO NOT REFERENCE device_ctx anymore at this point!! */
-}
-
-
static irqreturn_t vmbus_isr(int irq, void *dev_id)
{
--
1.5.5.6
^ permalink raw reply related
* [PATCH 18/21] Staging: hv: Get rid of the forward declaration for vmbus_shutdown
From: K. Y. Srinivasan @ 2011-03-10 22:15 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the forward declaration of vmbus_shutdown by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 44 ++++++++++++++++++++--------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index db5e735..6f4094b 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -50,7 +50,6 @@ struct hv_bus {
struct tasklet_struct event_dpc;
};
-static void vmbus_shutdown(struct device *device);
static irqreturn_t vmbus_isr(int irq, void *dev_id);
@@ -279,6 +278,28 @@ static int vmbus_remove(struct device *child_device)
return 0;
}
+
+/*
+ * vmbus_shutdown - Shutdown a vmbus device
+ */
+static void vmbus_shutdown(struct device *child_device)
+{
+ struct hv_driver *drv;
+
+
+ /* The device may not be attached yet */
+ if (!child_device->driver)
+ return;
+
+ drv = drv_to_hv_drv(child_device->driver);
+
+ /* Let the specific open-source driver handles the removal if it can */
+ if (drv->driver.shutdown)
+ drv->driver.shutdown(child_device);
+
+ return;
+}
+
/* The one and only one */
static struct hv_bus hv_bus = {
.bus.name = "vmbus",
@@ -826,27 +847,6 @@ void vmbus_child_device_unregister(struct hv_device *device_obj)
&device_obj->device);
}
-/*
- * vmbus_shutdown - Shutdown a vmbus device
- */
-static void vmbus_shutdown(struct device *child_device)
-{
- struct hv_driver *drv;
-
-
- /* The device may not be attached yet */
- if (!child_device->driver)
- return;
-
- drv = drv_to_hv_drv(child_device->driver);
-
- /* Let the specific open-source driver handles the removal if it can */
- if (drv->driver.shutdown)
- drv->driver.shutdown(child_device);
-
- return;
-}
-
/*
* vmbus_device_release - Final callback release of the vmbus child device
--
1.5.5.6
^ permalink raw reply related
* [PATCH 17/21] Staging: hv: Get rid of the forward declaration for vmbus_remove
From: K. Y. Srinivasan @ 2011-03-10 22:14 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the forward declaration of vmbus_remove by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 59 +++++++++++++++++++--------------------
1 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 35503b6..db5e735 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -50,7 +50,6 @@ struct hv_bus {
struct tasklet_struct event_dpc;
};
-static int vmbus_remove(struct device *device);
static void vmbus_shutdown(struct device *device);
static irqreturn_t vmbus_isr(int irq, void *dev_id);
@@ -251,6 +250,35 @@ static int vmbus_probe(struct device *child_device)
return ret;
}
+/*
+ * vmbus_remove - Remove a vmbus device
+ */
+static int vmbus_remove(struct device *child_device)
+{
+ int ret;
+ struct hv_driver *drv;
+
+
+ if (child_device->driver) {
+ drv = drv_to_hv_drv(child_device->driver);
+
+ /*
+ * Let the specific open-source driver handles the removal if
+ * it can
+ */
+ if (drv->driver.remove) {
+ ret = drv->driver.remove(child_device);
+ } else {
+ DPRINT_ERR(VMBUS_DRV,
+ "remove() method not set for driver - %s",
+ child_device->driver->name);
+ ret = -1;
+ }
+ }
+
+ return 0;
+}
+
/* The one and only one */
static struct hv_bus hv_bus = {
.bus.name = "vmbus",
@@ -799,35 +827,6 @@ void vmbus_child_device_unregister(struct hv_device *device_obj)
}
/*
- * vmbus_remove - Remove a vmbus device
- */
-static int vmbus_remove(struct device *child_device)
-{
- int ret;
- struct hv_driver *drv;
-
-
- if (child_device->driver) {
- drv = drv_to_hv_drv(child_device->driver);
-
- /*
- * Let the specific open-source driver handles the removal if
- * it can
- */
- if (drv->driver.remove) {
- ret = drv->driver.remove(child_device);
- } else {
- DPRINT_ERR(VMBUS_DRV,
- "remove() method not set for driver - %s",
- child_device->driver->name);
- ret = -1;
- }
- }
-
- return 0;
-}
-
-/*
* vmbus_shutdown - Shutdown a vmbus device
*/
static void vmbus_shutdown(struct device *child_device)
--
1.5.5.6
^ permalink raw reply related
* [PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
From: K. Y. Srinivasan @ 2011-03-10 22:14 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the forward declaration of vmbus_probe by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 107 ++++++++++++++++++++--------------------
1 files changed, 53 insertions(+), 54 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index e15c465..35503b6 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -50,7 +50,6 @@ struct hv_bus {
struct tasklet_struct event_dpc;
};
-static int vmbus_probe(struct device *device);
static int vmbus_remove(struct device *device);
static void vmbus_shutdown(struct device *device);
@@ -199,6 +198,59 @@ static int vmbus_match(struct device *device, struct device_driver *driver)
return match;
}
+
+/*
+ * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
+ *
+ * We need a callback because we cannot invoked device_unregister() inside
+ * vmbus_probe() since vmbus_probe() may be invoked inside device_register()
+ * i.e. we cannot call device_unregister() inside device_register()
+ */
+static void vmbus_probe_failed_cb(struct work_struct *context)
+{
+ struct hv_device *device_ctx = (struct hv_device *)context;
+
+ /*
+ * Kick off the process of unregistering the device.
+ * This will call vmbus_remove() and eventually vmbus_device_release()
+ */
+ device_unregister(&device_ctx->device);
+
+ /* put_device(&device_ctx->device); */
+}
+
+/*
+ * vmbus_probe - Add the new vmbus's child device
+ */
+static int vmbus_probe(struct device *child_device)
+{
+ int ret = 0;
+ struct hv_driver *drv =
+ drv_to_hv_drv(child_device->driver);
+ struct hv_device *dev = device_to_hv_device(child_device);
+
+ /* Let the specific open-source driver handles the probe if it can */
+ if (drv->driver.probe) {
+ ret = dev->probe_error =
+ drv->driver.probe(child_device);
+ if (ret != 0) {
+ DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s "
+ "(%p) on driver %s (%d)...",
+ dev_name(child_device), child_device,
+ child_device->driver->name, ret);
+
+ INIT_WORK(&dev->probe_failed_work_item,
+ vmbus_probe_failed_cb);
+ schedule_work(&dev->probe_failed_work_item);
+ }
+ } else {
+ DPRINT_ERR(VMBUS_DRV, "probe() method not set for driver - %s",
+ child_device->driver->name);
+ ret = -1;
+ }
+ return ret;
+}
+
/* The one and only one */
static struct hv_bus hv_bus = {
.bus.name = "vmbus",
@@ -746,59 +798,6 @@ void vmbus_child_device_unregister(struct hv_device *device_obj)
&device_obj->device);
}
-
-/*
- * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
- *
- * We need a callback because we cannot invoked device_unregister() inside
- * vmbus_probe() since vmbus_probe() may be invoked inside device_register()
- * i.e. we cannot call device_unregister() inside device_register()
- */
-static void vmbus_probe_failed_cb(struct work_struct *context)
-{
- struct hv_device *device_ctx = (struct hv_device *)context;
-
- /*
- * Kick off the process of unregistering the device.
- * This will call vmbus_remove() and eventually vmbus_device_release()
- */
- device_unregister(&device_ctx->device);
-
- /* put_device(&device_ctx->device); */
-}
-
-/*
- * vmbus_probe - Add the new vmbus's child device
- */
-static int vmbus_probe(struct device *child_device)
-{
- int ret = 0;
- struct hv_driver *drv =
- drv_to_hv_drv(child_device->driver);
- struct hv_device *dev = device_to_hv_device(child_device);
-
- /* Let the specific open-source driver handles the probe if it can */
- if (drv->driver.probe) {
- ret = dev->probe_error =
- drv->driver.probe(child_device);
- if (ret != 0) {
- DPRINT_ERR(VMBUS_DRV, "probe() failed for device %s "
- "(%p) on driver %s (%d)...",
- dev_name(child_device), child_device,
- child_device->driver->name, ret);
-
- INIT_WORK(&dev->probe_failed_work_item,
- vmbus_probe_failed_cb);
- schedule_work(&dev->probe_failed_work_item);
- }
- } else {
- DPRINT_ERR(VMBUS_DRV, "probe() method not set for driver - %s",
- child_device->driver->name);
- ret = -1;
- }
- return ret;
-}
-
/*
* vmbus_remove - Remove a vmbus device
*/
--
1.5.5.6
^ permalink raw reply related
* [PATCH 15/21] Staging: hv: Get rid of the forward declaration for vmbus_match
From: K. Y. Srinivasan @ 2011-03-10 22:13 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the forward declaration of vmbus_match by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 49 ++++++++++++++++++++-------------------
1 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 97ebeb4..e15c465 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -50,7 +50,6 @@ struct hv_bus {
struct tasklet_struct event_dpc;
};
-static int vmbus_match(struct device *device, struct device_driver *driver);
static int vmbus_probe(struct device *device);
static int vmbus_remove(struct device *device);
static void vmbus_shutdown(struct device *device);
@@ -175,6 +174,31 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
return 0;
}
+
+/*
+ * vmbus_match - Attempt to match the specified device to the specified driver
+ */
+static int vmbus_match(struct device *device, struct device_driver *driver)
+{
+ int match = 0;
+ struct hv_driver *drv = drv_to_hv_drv(driver);
+ struct hv_device *device_ctx = device_to_hv_device(device);
+
+ /* We found our driver ? */
+ if (memcmp(&device_ctx->dev_type, &drv->dev_type,
+ sizeof(struct hv_guid)) == 0) {
+
+ device_ctx->drv = drv->priv;
+ DPRINT_INFO(VMBUS_DRV,
+ "device object (%p) set to driver object (%p)",
+ &device_ctx,
+ device_ctx->drv);
+
+ match = 1;
+ }
+ return match;
+}
+
/* The one and only one */
static struct hv_bus hv_bus = {
.bus.name = "vmbus",
@@ -722,29 +746,6 @@ void vmbus_child_device_unregister(struct hv_device *device_obj)
&device_obj->device);
}
-/*
- * vmbus_match - Attempt to match the specified device to the specified driver
- */
-static int vmbus_match(struct device *device, struct device_driver *driver)
-{
- int match = 0;
- struct hv_driver *drv = drv_to_hv_drv(driver);
- struct hv_device *device_ctx = device_to_hv_device(device);
-
- /* We found our driver ? */
- if (memcmp(&device_ctx->dev_type, &drv->dev_type,
- sizeof(struct hv_guid)) == 0) {
-
- device_ctx->drv = drv->priv;
- DPRINT_INFO(VMBUS_DRV,
- "device object (%p) set to driver object (%p)",
- &device_ctx,
- device_ctx->drv);
-
- match = 1;
- }
- return match;
-}
/*
* vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe()
--
1.5.5.6
^ permalink raw reply related
* [PATCH 14/21] Get rid of the forward declaration for vmbus_uevent
From: K. Y. Srinivasan @ 2011-03-10 22:12 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the forward declaration of vmbus_uevent by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 151 ++++++++++++++++++++--------------------
1 files changed, 75 insertions(+), 76 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 7b9a2c8..97ebeb4 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -54,7 +54,6 @@ static int vmbus_match(struct device *device, struct device_driver *driver);
static int vmbus_probe(struct device *device);
static int vmbus_remove(struct device *device);
static void vmbus_shutdown(struct device *device);
-static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env);
static irqreturn_t vmbus_isr(int irq, void *dev_id);
@@ -101,6 +100,81 @@ static struct device_attribute vmbus_device_attrs[] = {
__ATTR_NULL
};
+/*
+ * vmbus_uevent - add uevent for our device
+ *
+ * This routine is invoked when a device is added or removed on the vmbus to
+ * generate a uevent to udev in the userspace. The udev will then look at its
+ * rule and the uevent generated here to load the appropriate driver
+ */
+static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
+{
+ struct hv_device *dev = device_to_hv_device(device);
+ int ret;
+
+ DPRINT_INFO(VMBUS_DRV, "generating uevent - VMBUS_DEVICE_CLASS_GUID={"
+ "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
+ "%02x%02x%02x%02x%02x%02x%02x%02x}",
+ dev->dev_type.data[3], dev->dev_type.data[2],
+ dev->dev_type.data[1], dev->dev_type.data[0],
+ dev->dev_type.data[5], dev->dev_type.data[4],
+ dev->dev_type.data[7], dev->dev_type.data[6],
+ dev->dev_type.data[8], dev->dev_type.data[9],
+ dev->dev_type.data[10],
+ dev->dev_type.data[11],
+ dev->dev_type.data[12],
+ dev->dev_type.data[13],
+ dev->dev_type.data[14],
+ dev->dev_type.data[15]);
+
+ ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
+ "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
+ "%02x%02x%02x%02x%02x%02x%02x%02x}",
+ dev->dev_type.data[3],
+ dev->dev_type.data[2],
+ dev->dev_type.data[1],
+ dev->dev_type.data[0],
+ dev->dev_type.data[5],
+ dev->dev_type.data[4],
+ dev->dev_type.data[7],
+ dev->dev_type.data[6],
+ dev->dev_type.data[8],
+ dev->dev_type.data[9],
+ dev->dev_type.data[10],
+ dev->dev_type.data[11],
+ dev->dev_type.data[12],
+ dev->dev_type.data[13],
+ dev->dev_type.data[14],
+ dev->dev_type.data[15]);
+
+ if (ret)
+ return ret;
+
+ ret = add_uevent_var(env, "VMBUS_DEVICE_DEVICE_GUID={"
+ "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
+ "%02x%02x%02x%02x%02x%02x%02x%02x}",
+ dev->dev_instance.data[3],
+ dev->dev_instance.data[2],
+ dev->dev_instance.data[1],
+ dev->dev_instance.data[0],
+ dev->dev_instance.data[5],
+ dev->dev_instance.data[4],
+ dev->dev_instance.data[7],
+ dev->dev_instance.data[6],
+ dev->dev_instance.data[8],
+ dev->dev_instance.data[9],
+ dev->dev_instance.data[10],
+ dev->dev_instance.data[11],
+ dev->dev_instance.data[12],
+ dev->dev_instance.data[13],
+ dev->dev_instance.data[14],
+ dev->dev_instance.data[15]);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
/* The one and only one */
static struct hv_bus hv_bus = {
.bus.name = "vmbus",
@@ -649,81 +723,6 @@ void vmbus_child_device_unregister(struct hv_device *device_obj)
}
/*
- * vmbus_uevent - add uevent for our device
- *
- * This routine is invoked when a device is added or removed on the vmbus to
- * generate a uevent to udev in the userspace. The udev will then look at its
- * rule and the uevent generated here to load the appropriate driver
- */
-static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
-{
- struct hv_device *dev = device_to_hv_device(device);
- int ret;
-
- DPRINT_INFO(VMBUS_DRV, "generating uevent - VMBUS_DEVICE_CLASS_GUID={"
- "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x%02x%02x%02x%02x%02x%02x}",
- dev->dev_type.data[3], dev->dev_type.data[2],
- dev->dev_type.data[1], dev->dev_type.data[0],
- dev->dev_type.data[5], dev->dev_type.data[4],
- dev->dev_type.data[7], dev->dev_type.data[6],
- dev->dev_type.data[8], dev->dev_type.data[9],
- dev->dev_type.data[10],
- dev->dev_type.data[11],
- dev->dev_type.data[12],
- dev->dev_type.data[13],
- dev->dev_type.data[14],
- dev->dev_type.data[15]);
-
- ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
- "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x%02x%02x%02x%02x%02x%02x}",
- dev->dev_type.data[3],
- dev->dev_type.data[2],
- dev->dev_type.data[1],
- dev->dev_type.data[0],
- dev->dev_type.data[5],
- dev->dev_type.data[4],
- dev->dev_type.data[7],
- dev->dev_type.data[6],
- dev->dev_type.data[8],
- dev->dev_type.data[9],
- dev->dev_type.data[10],
- dev->dev_type.data[11],
- dev->dev_type.data[12],
- dev->dev_type.data[13],
- dev->dev_type.data[14],
- dev->dev_type.data[15]);
-
- if (ret)
- return ret;
-
- ret = add_uevent_var(env, "VMBUS_DEVICE_DEVICE_GUID={"
- "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x%02x%02x%02x%02x%02x%02x}",
- dev->dev_instance.data[3],
- dev->dev_instance.data[2],
- dev->dev_instance.data[1],
- dev->dev_instance.data[0],
- dev->dev_instance.data[5],
- dev->dev_instance.data[4],
- dev->dev_instance.data[7],
- dev->dev_instance.data[6],
- dev->dev_instance.data[8],
- dev->dev_instance.data[9],
- dev->dev_instance.data[10],
- dev->dev_instance.data[11],
- dev->dev_instance.data[12],
- dev->dev_instance.data[13],
- dev->dev_instance.data[14],
- dev->dev_instance.data[15]);
- if (ret)
- return ret;
-
- return 0;
-}
-
-/*
* vmbus_match - Attempt to match the specified device to the specified driver
*/
static int vmbus_match(struct device *device, struct device_driver *driver)
--
1.5.5.6
^ permalink raw reply related
* [PATCH 13/21] [PATCH 13/21] Staging: hv: Rename vmbus_driver_context structure
From: K. Y. Srinivasan @ 2011-03-10 22:12 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Now that struct vmbus_driver_context is properly
cleaned up, rename this structure appropriately and
cleanup the code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 36 ++++++++++++++++--------------------
1 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 4e45016..7b9a2c8 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -44,12 +44,10 @@ static struct device *root_dev; /* Root device */
struct pci_dev *hv_pci_dev;
/* Main vmbus driver data structure */
-struct vmbus_driver_context {
-
+struct hv_bus {
struct bus_type bus;
struct tasklet_struct msg_dpc;
struct tasklet_struct event_dpc;
-
};
static int vmbus_match(struct device *device, struct device_driver *driver);
@@ -104,7 +102,7 @@ static struct device_attribute vmbus_device_attrs[] = {
};
/* The one and only one */
-static struct vmbus_driver_context vmbus_drv = {
+static struct hv_bus hv_bus = {
.bus.name = "vmbus",
.bus.match = vmbus_match,
.bus.shutdown = vmbus_shutdown,
@@ -374,7 +372,6 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
*/
static int vmbus_bus_init(struct pci_dev *pdev)
{
- struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv;
int ret;
unsigned int vector;
@@ -399,16 +396,16 @@ static int vmbus_bus_init(struct pci_dev *pdev)
}
- vmbus_drv_ctx->bus.name = driver_name;
+ hv_bus.bus.name = driver_name;
/* Initialize the bus context */
- tasklet_init(&vmbus_drv_ctx->msg_dpc, vmbus_on_msg_dpc,
+ tasklet_init(&hv_bus.msg_dpc, vmbus_on_msg_dpc,
(unsigned long)NULL);
- tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_on_event,
+ tasklet_init(&hv_bus.event_dpc, vmbus_on_event,
(unsigned long)NULL);
/* Now, register the bus with LDM */
- ret = bus_register(&vmbus_drv_ctx->bus);
+ ret = bus_register(&hv_bus.bus);
if (ret) {
ret = -1;
goto cleanup;
@@ -423,7 +420,7 @@ static int vmbus_bus_init(struct pci_dev *pdev)
DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d",
pdev->irq);
- bus_unregister(&vmbus_drv_ctx->bus);
+ bus_unregister(&hv_bus.bus);
ret = -1;
goto cleanup;
@@ -441,7 +438,7 @@ static int vmbus_bus_init(struct pci_dev *pdev)
"ERROR - Unable to register vmbus root device");
free_irq(pdev->irq, pdev);
- bus_unregister(&vmbus_drv_ctx->bus);
+ bus_unregister(&hv_bus.bus);
ret = PTR_ERR(root_dev);
goto cleanup;
@@ -456,7 +453,7 @@ static int vmbus_bus_init(struct pci_dev *pdev)
if (ret) {
root_device_unregister(root_dev);
free_irq(pdev->irq, pdev);
- bus_unregister(&vmbus_drv_ctx->bus);
+ bus_unregister(&hv_bus.bus);
goto cleanup;
}
@@ -475,7 +472,6 @@ cleanup:
*/
static void vmbus_bus_exit(void)
{
- struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv;
vmbus_release_unattached_channels();
@@ -487,12 +483,12 @@ static void vmbus_bus_exit(void)
/* Unregister the root bus device */
root_device_unregister(root_dev);
- bus_unregister(&vmbus_drv_ctx->bus);
+ bus_unregister(&hv_bus.bus);
free_irq(hv_pci_dev->irq, hv_pci_dev);
- tasklet_kill(&vmbus_drv_ctx->msg_dpc);
- tasklet_kill(&vmbus_drv_ctx->event_dpc);
+ tasklet_kill(&hv_bus.msg_dpc);
+ tasklet_kill(&hv_bus.event_dpc);
}
@@ -515,7 +511,7 @@ int vmbus_child_driver_register(struct device_driver *drv)
drv, drv->name);
/* The child driver on this vmbus */
- drv->bus = &vmbus_drv.bus;
+ drv->bus = &hv_bus.bus;
ret = driver_register(drv);
@@ -609,7 +605,7 @@ int vmbus_child_device_register(struct hv_device *child_device_obj)
atomic_inc_return(&device_num));
/* The new device belongs to this bus */
- child_device_obj->device.bus = &vmbus_drv.bus; /* device->dev.bus; */
+ child_device_obj->device.bus = &hv_bus.bus; /* device->dev.bus; */
child_device_obj->device.parent = root_dev;
child_device_obj->device.release = vmbus_device_release;
@@ -877,10 +873,10 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
/* Schedules a dpc if necessary */
if (ret > 0) {
if (test_bit(0, (unsigned long *)&ret))
- tasklet_schedule(&vmbus_drv.msg_dpc);
+ tasklet_schedule(&hv_bus.msg_dpc);
if (test_bit(1, (unsigned long *)&ret))
- tasklet_schedule(&vmbus_drv.event_dpc);
+ tasklet_schedule(&hv_bus.event_dpc);
return IRQ_HANDLED;
} else {
--
1.5.5.6
^ permalink raw reply related
* [PATCH 12/21] Staging: hv: Cleanup irq management
From: K. Y. Srinivasan @ 2011-03-10 22:08 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Now that vmbus_driver is a platform pci driver,
cleanup the irq allocation mess by using the standard
irq allocation mechanisms.
Note that this patch generates an error when the checkpatch
script is run because of the IRQF_SAMPLE_RANDOM flag used in
request_irq() function. This interrupt is the only
external event this VM will get and consequently if this
flag (IRQF_SAMPLE_RANDOM) is not specified, experimentally
we have shown that the entropy in the VM will very very low.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index e4855ac..4e45016 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -17,6 +17,8 @@
* Authors:
* Haiyang Zhang <haiyangz@microsoft.com>
* Hank Janssen <hjanssen@microsoft.com>
+ *
+ * 3/9/2011: K. Y. Srinivasan - Significant restructuring and cleanup
*/
#include <linux/init.h>
#include <linux/err.h>
@@ -37,10 +39,6 @@
#include "vmbus_private.h"
-/* FIXME! We need to do this dynamically for PIC and APIC system */
-#define VMBUS_IRQ 0x5
-#define VMBUS_IRQ_VECTOR IRQ5_VECTOR
-
static struct device *root_dev; /* Root device */
struct pci_dev *hv_pci_dev;
@@ -74,7 +72,6 @@ EXPORT_SYMBOL(vmbus_loglevel);
/* (ALL_MODULES << 16 | DEBUG_LVL_ENTEREXIT); */
/* (((VMBUS | VMBUS_DRV)<<16) | DEBUG_LVL_ENTEREXIT); */
-static int vmbus_irq = VMBUS_IRQ;
/* Set up per device attributes in /sys/bus/vmbus/devices/<bus device> */
static struct device_attribute vmbus_device_attrs[] = {
@@ -375,7 +372,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
* - setup the vmbus root device
* - retrieve the channel offers
*/
-static int vmbus_bus_init(void)
+static int vmbus_bus_init(struct pci_dev *pdev)
{
struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv;
int ret;
@@ -418,21 +415,23 @@ static int vmbus_bus_init(void)
}
/* Get the interrupt resource */
- ret = request_irq(vmbus_irq, vmbus_isr, IRQF_SAMPLE_RANDOM,
- driver_name, NULL);
+ ret = request_irq(pdev->irq, vmbus_isr,
+ IRQF_SHARED | IRQF_SAMPLE_RANDOM,
+ driver_name, pdev);
if (ret != 0) {
DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d",
- vmbus_irq);
+ pdev->irq);
bus_unregister(&vmbus_drv_ctx->bus);
ret = -1;
goto cleanup;
}
- vector = VMBUS_IRQ_VECTOR;
- DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", vmbus_irq, vector);
+ vector = IRQ0_VECTOR + pdev->irq;
+ DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", pdev->irq,
+ IRQ0_VECTOR + pdev->irq);
/* Register the root device */
root_dev = root_device_register(driver_name);
@@ -441,7 +440,7 @@ static int vmbus_bus_init(void)
DPRINT_ERR(VMBUS_DRV,
"ERROR - Unable to register vmbus root device");
- free_irq(vmbus_irq, NULL);
+ free_irq(pdev->irq, pdev);
bus_unregister(&vmbus_drv_ctx->bus);
ret = PTR_ERR(root_dev);
@@ -456,7 +455,7 @@ static int vmbus_bus_init(void)
ret = vmbus_connect();
if (ret) {
root_device_unregister(root_dev);
- free_irq(vmbus_irq, NULL);
+ free_irq(pdev->irq, pdev);
bus_unregister(&vmbus_drv_ctx->bus);
goto cleanup;
}
@@ -490,7 +489,7 @@ static void vmbus_bus_exit(void)
bus_unregister(&vmbus_drv_ctx->bus);
- free_irq(vmbus_irq, NULL);
+ free_irq(hv_pci_dev->irq, hv_pci_dev);
tasklet_kill(&vmbus_drv_ctx->msg_dpc);
tasklet_kill(&vmbus_drv_ctx->event_dpc);
@@ -902,7 +901,7 @@ static int __devinit hv_pci_probe(struct pci_dev *pdev,
if (err)
return err;
- err = vmbus_bus_init();
+ err = vmbus_bus_init(pdev);
if (err)
pci_disable_device(pdev);
@@ -942,7 +941,6 @@ static void __exit hv_pci_exit(void)
MODULE_LICENSE("GPL");
MODULE_VERSION(HV_DRV_VERSION);
-module_param(vmbus_irq, int, S_IRUGO);
module_param(vmbus_loglevel, int, S_IRUGO);
module_init(hv_pci_init);
--
1.5.5.6
^ permalink raw reply related
* [PATCH 11/21] Staging: hv: Make vmbus driver a platform pci driver
From: K. Y. Srinivasan @ 2011-03-10 22:08 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Make vmbus driver a platform pci driver. This is
in preparation to cleaning up irq allocation for this
driver.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 63 +++++++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 8b9394a..e4855ac 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -43,6 +43,8 @@
static struct device *root_dev; /* Root device */
+struct pci_dev *hv_pci_dev;
+
/* Main vmbus driver data structure */
struct vmbus_driver_context {
@@ -887,36 +889,24 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
}
}
-static struct dmi_system_id __initdata microsoft_hv_dmi_table[] = {
- {
- .ident = "Hyper-V",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
- DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
- },
- },
- { },
-};
-MODULE_DEVICE_TABLE(dmi, microsoft_hv_dmi_table);
-static int __init vmbus_init(void)
+
+static int __devinit hv_pci_probe(struct pci_dev *pdev,
+ const struct pci_device_id *ent)
{
- DPRINT_INFO(VMBUS_DRV,
- "Vmbus initializing.... current log level 0x%x (%x,%x)",
- vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel));
- /* Todo: it is used for loglevel, to be ported to new kernel. */
+ int err;
- if (!dmi_check_system(microsoft_hv_dmi_table))
- return -ENODEV;
+ hv_pci_dev = pdev;
- return vmbus_bus_init();
-}
+ err = pci_enable_device(pdev);
+ if (err)
+ return err;
-static void __exit vmbus_exit(void)
-{
- vmbus_bus_exit();
- /* Todo: it is used for loglevel, to be ported to new kernel. */
+ err = vmbus_bus_init();
+ if (err)
+ pci_disable_device(pdev);
+
+ return err;
}
/*
@@ -931,10 +921,29 @@ static const struct pci_device_id microsoft_hv_pci_table[] = {
};
MODULE_DEVICE_TABLE(pci, microsoft_hv_pci_table);
+static struct pci_driver platform_driver = {
+ .name = "hv-platform-pci",
+ .probe = hv_pci_probe,
+ .id_table = microsoft_hv_pci_table,
+};
+
+static int __init hv_pci_init(void)
+{
+ return pci_register_driver(&platform_driver);
+}
+
+static void __exit hv_pci_exit(void)
+{
+ vmbus_bus_exit();
+ pci_unregister_driver(&platform_driver);
+}
+
+
+
MODULE_LICENSE("GPL");
MODULE_VERSION(HV_DRV_VERSION);
module_param(vmbus_irq, int, S_IRUGO);
module_param(vmbus_loglevel, int, S_IRUGO);
-module_init(vmbus_init);
-module_exit(vmbus_exit);
+module_init(hv_pci_init);
+module_exit(hv_pci_exit);
--
1.5.5.6
^ permalink raw reply related
* [PATCH 10/21] Staging: hv: Cleanup root device handling
From: K. Y. Srinivasan @ 2011-03-10 22:08 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Now we can complete the cleanup of the root device
management. Use the preferred APIs for creating and
managing the root device. As part of this cleanup get rid
of the root device object from vmbus_driver_context.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 126 ++++++----------------------------------
1 files changed, 18 insertions(+), 108 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index b473f46..8b9394a 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -19,6 +19,7 @@
* Hank Janssen <hjanssen@microsoft.com>
*/
#include <linux/init.h>
+#include <linux/err.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/irq.h>
@@ -40,6 +41,8 @@
#define VMBUS_IRQ 0x5
#define VMBUS_IRQ_VECTOR IRQ5_VECTOR
+static struct device *root_dev; /* Root device */
+
/* Main vmbus driver data structure */
struct vmbus_driver_context {
@@ -47,8 +50,6 @@ struct vmbus_driver_context {
struct tasklet_struct msg_dpc;
struct tasklet_struct event_dpc;
- /* The bus root device */
- struct hv_device device_ctx;
};
static int vmbus_match(struct device *device, struct device_driver *driver);
@@ -60,7 +61,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env);
static irqreturn_t vmbus_isr(int irq, void *dev_id);
static void vmbus_device_release(struct device *device);
-static void vmbus_bus_release(struct device *device);
static ssize_t vmbus_show_device_attr(struct device *dev,
struct device_attribute *dev_attr,
@@ -117,54 +117,6 @@ static struct vmbus_driver_context vmbus_drv = {
static const char *driver_name = "hyperv";
-/*
- * Windows vmbus does not defined this.
- * We defined this to be consistent with other devices
- */
-/* {c5295816-f63a-4d5f-8d1a-4daf999ca185} */
-static const struct hv_guid device_type = {
- .data = {
- 0x16, 0x58, 0x29, 0xc5, 0x3a, 0xf6, 0x5f, 0x4d,
- 0x8d, 0x1a, 0x4d, 0xaf, 0x99, 0x9c, 0xa1, 0x85
- }
-};
-
-/* {ac3760fc-9adf-40aa-9427-a70ed6de95c5} */
-static const struct hv_guid device_id = {
- .data = {
- 0xfc, 0x60, 0x37, 0xac, 0xdf, 0x9a, 0xaa, 0x40,
- 0x94, 0x27, 0xa7, 0x0e, 0xd6, 0xde, 0x95, 0xc5
- }
-};
-
-static struct hv_device *vmbus_device; /* vmbus root device */
-
-
-/*
- * vmbus_dev_add - Callback when the root bus device is added
- */
-static int vmbus_dev_add(struct hv_device *dev, void *info)
-{
- u32 *irqvector = info;
- int ret;
-
- vmbus_device = dev;
-
- memcpy(&vmbus_device->dev_type, &device_type, sizeof(struct hv_guid));
- memcpy(&vmbus_device->dev_instance, &device_id,
- sizeof(struct hv_guid));
-
- /* strcpy(dev->name, "vmbus"); */
- /* SynIC setup... */
- on_each_cpu(hv_synic_init, (void *)irqvector, 1);
-
- /* Connect to VMBus in the root partition */
- ret = vmbus_connect();
-
- /* VmbusSendEvent(device->localPortId+1); */
- return ret;
-}
-
struct onmessage_work_context {
struct work_struct work;
@@ -416,17 +368,14 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
*
* Here, we
* - initialize the vmbus driver context
- * - setup various driver entry points
* - invoke the vmbus hv main init routine
* - get the irq resource
- * - invoke the vmbus to add the vmbus root device
* - setup the vmbus root device
* - retrieve the channel offers
*/
static int vmbus_bus_init(void)
{
struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv;
- struct hv_device *dev_ctx = &vmbus_drv.device_ctx;
int ret;
unsigned int vector;
@@ -483,45 +432,34 @@ static int vmbus_bus_init(void)
DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", vmbus_irq, vector);
- /* Add the root device */
- memset(dev_ctx, 0, sizeof(struct hv_device));
+ /* Register the root device */
+ root_dev = root_device_register(driver_name);
- ret = vmbus_dev_add(dev_ctx, &vector);
- if (ret != 0) {
+ if (IS_ERR(root_dev)) {
DPRINT_ERR(VMBUS_DRV,
- "ERROR - Unable to add vmbus root device");
+ "ERROR - Unable to register vmbus root device");
free_irq(vmbus_irq, NULL);
-
bus_unregister(&vmbus_drv_ctx->bus);
- ret = -1;
+ ret = PTR_ERR(root_dev);
goto cleanup;
}
- /* strcpy(dev_ctx->device.bus_id, dev_ctx->device_obj.name); */
- dev_set_name(&dev_ctx->device, "vmbus_0_0");
-
- /* No need to bind a driver to the root device. */
- dev_ctx->device.parent = NULL;
- /* NULL; vmbus_remove() does not get invoked */
- dev_ctx->device.bus = &vmbus_drv_ctx->bus;
- /* Setup the device dispatch table */
- dev_ctx->device.release = vmbus_bus_release;
-
- /* register the root device */
- ret = device_register(&dev_ctx->device);
+ /*
+ * Notify the hypervisor of our irq and
+ * connect to the host.
+ */
+ on_each_cpu(hv_synic_init, (void *)&vector, 1);
+ ret = vmbus_connect();
if (ret) {
- DPRINT_ERR(VMBUS_DRV,
- "ERROR - Unable to register vmbus root device");
-
+ root_device_unregister(root_dev);
free_irq(vmbus_irq, NULL);
bus_unregister(&vmbus_drv_ctx->bus);
-
- ret = -1;
goto cleanup;
}
+
vmbus_request_offers();
wait_for_completion(&hv_channel_ready);
@@ -538,7 +476,6 @@ static void vmbus_bus_exit(void)
{
struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv;
- struct hv_device *dev_ctx = &vmbus_drv.device_ctx;
vmbus_release_unattached_channels();
vmbus_disconnect();
@@ -547,7 +484,7 @@ static void vmbus_bus_exit(void)
hv_cleanup();
/* Unregister the root bus device */
- device_unregister(&dev_ctx->device);
+ root_device_unregister(root_dev);
bus_unregister(&vmbus_drv_ctx->bus);
@@ -672,7 +609,7 @@ int vmbus_child_device_register(struct hv_device *child_device_obj)
/* The new device belongs to this bus */
child_device_obj->device.bus = &vmbus_drv.bus; /* device->dev.bus; */
- child_device_obj->device.parent = &vmbus_device->device;
+ child_device_obj->device.parent = root_dev;
child_device_obj->device.release = vmbus_device_release;
/*
@@ -873,14 +810,6 @@ static int vmbus_remove(struct device *child_device)
int ret;
struct hv_driver *drv;
- /* Special case root bus device */
- if (child_device->parent == NULL) {
- /*
- * No-op since it is statically defined and handle in
- * vmbus_bus_exit()
- */
- return 0;
- }
if (child_device->driver) {
drv = drv_to_hv_drv(child_device->driver);
@@ -909,14 +838,6 @@ static void vmbus_shutdown(struct device *child_device)
{
struct hv_driver *drv;
- /* Special case root bus device */
- if (child_device->parent == NULL) {
- /*
- * No-op since it is statically defined and handle in
- * vmbus_bus_exit()
- */
- return;
- }
/* The device may not be attached yet */
if (!child_device->driver)
@@ -931,17 +852,6 @@ static void vmbus_shutdown(struct device *child_device)
return;
}
-/*
- * vmbus_bus_release - Final callback release of the vmbus root device
- */
-static void vmbus_bus_release(struct device *device)
-{
- /* FIXME */
- /* Empty release functions are a bug, or a major sign
- * of a problem design, this MUST BE FIXED! */
- dev_err(device, "%s needs to be fixed!\n", __func__);
- WARN_ON(1);
-}
/*
* vmbus_device_release - Final callback release of the vmbus child device
--
1.5.5.6
^ permalink raw reply related
* [PATCH 09/21] Staging: hv: Get rid of vmbus_child_dev_add()
From: K. Y. Srinivasan @ 2011-03-10 22:07 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
The function vmbus_child_dev_add() is a wrapper that can be
eliminated; get rid of it.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/channel_mgmt.c | 2 +-
drivers/staging/hv/vmbus_drv.c | 9 +--------
drivers/staging/hv/vmbus_private.h | 1 -
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c
index 0781c0e..3368809 100644
--- a/drivers/staging/hv/channel_mgmt.c
+++ b/drivers/staging/hv/channel_mgmt.c
@@ -408,7 +408,7 @@ static void vmbus_process_offer(struct work_struct *work)
* binding which eventually invokes the device driver's AddDevice()
* method.
*/
- ret = vmbus_child_dev_add(newchannel->device_obj);
+ ret = vmbus_child_device_register(newchannel->device_obj);
if (ret != 0) {
DPRINT_ERR(VMBUS,
"unable to add child device object (relid %d)",
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 0b91eda..b473f46 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -139,13 +139,6 @@ static const struct hv_guid device_id = {
static struct hv_device *vmbus_device; /* vmbus root device */
-/*
- * vmbus_child_dev_add - Registers the child device with the vmbus
- */
-int vmbus_child_dev_add(struct hv_device *child_dev)
-{
- return vmbus_child_device_register(child_dev);
-}
/*
* vmbus_dev_add - Callback when the root bus device is added
@@ -662,7 +655,7 @@ struct hv_device *vmbus_child_device_create(struct hv_guid *type,
}
/*
- * vmbus_child_device_register - Register the child device on the specified bus
+ * vmbus_child_device_register - Register the child device
*/
int vmbus_child_device_register(struct hv_device *child_device_obj)
{
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h
index c176773..ca050a4 100644
--- a/drivers/staging/hv/vmbus_private.h
+++ b/drivers/staging/hv/vmbus_private.h
@@ -107,7 +107,6 @@ struct hv_device *vmbus_child_device_create(struct hv_guid *type,
struct hv_guid *instance,
struct vmbus_channel *channel);
-int vmbus_child_dev_add(struct hv_device *device);
int vmbus_child_device_register(struct hv_device *child_device_obj);
void vmbus_child_device_unregister(struct hv_device *device_obj);
--
1.5.5.6
^ permalink raw reply related
* [PATCH 08/21] Staging: hv: Change the signature for vmbus_child_device_register()
From: K. Y. Srinivasan @ 2011-03-10 22:07 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
In preparation for getting rid of the vmbus_child_dev_add() function,
modify the signature of vmbus_child_device_register(). Note that
the root device is a global variable.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 7 +++----
drivers/staging/hv/vmbus_private.h | 3 +--
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index e078c59..0b91eda 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -144,7 +144,7 @@ static struct hv_device *vmbus_device; /* vmbus root device */
*/
int vmbus_child_dev_add(struct hv_device *child_dev)
{
- return vmbus_child_device_register(vmbus_device, child_dev);
+ return vmbus_child_device_register(child_dev);
}
/*
@@ -664,8 +664,7 @@ struct hv_device *vmbus_child_device_create(struct hv_guid *type,
/*
* vmbus_child_device_register - Register the child device on the specified bus
*/
-int vmbus_child_device_register(struct hv_device *root_device_obj,
- struct hv_device *child_device_obj)
+int vmbus_child_device_register(struct hv_device *child_device_obj)
{
int ret = 0;
@@ -680,7 +679,7 @@ int vmbus_child_device_register(struct hv_device *root_device_obj,
/* The new device belongs to this bus */
child_device_obj->device.bus = &vmbus_drv.bus; /* device->dev.bus; */
- child_device_obj->device.parent = &root_device_obj->device;
+ child_device_obj->device.parent = &vmbus_device->device;
child_device_obj->device.release = vmbus_device_release;
/*
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h
index 1b88b6f..c176773 100644
--- a/drivers/staging/hv/vmbus_private.h
+++ b/drivers/staging/hv/vmbus_private.h
@@ -108,8 +108,7 @@ struct hv_device *vmbus_child_device_create(struct hv_guid *type,
struct vmbus_channel *channel);
int vmbus_child_dev_add(struct hv_device *device);
-int vmbus_child_device_register(struct hv_device *root_device_obj,
- struct hv_device *child_device_obj);
+int vmbus_child_device_register(struct hv_device *child_device_obj);
void vmbus_child_device_unregister(struct hv_device *device_obj);
/* static void */
--
1.5.5.6
^ permalink raw reply related
* [PATCH 07/21] Staging: hv: Get rid of vmbus_cleanup() function
From: K. Y. Srinivasan @ 2011-03-10 22:06 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the vmbus_cleanup() function by inlining the
necessary code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 11c69c5..e078c59 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -173,15 +173,6 @@ static int vmbus_dev_add(struct hv_device *dev, void *info)
}
-/*
- * vmbus_cleanup - Perform any cleanup when the driver is removed
- */
-static void vmbus_cleanup(void)
-{
-
- hv_cleanup();
-}
-
struct onmessage_work_context {
struct work_struct work;
struct hv_message msg;
@@ -560,7 +551,7 @@ static void vmbus_bus_exit(void)
vmbus_disconnect();
on_each_cpu(hv_synic_cleanup, NULL, 1);
- vmbus_cleanup();
+ hv_cleanup();
/* Unregister the root bus device */
device_unregister(&dev_ctx->device);
--
1.5.5.6
^ permalink raw reply related
* [PATCH 06/21] Staging: hv: Get rid of vmbus_dev_rm() function
From: K. Y. Srinivasan @ 2011-03-10 22:06 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
Get rid of the vmbus_dev_rm() function by inlining
the necessary code.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 8e8a408..11c69c5 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -172,18 +172,6 @@ static int vmbus_dev_add(struct hv_device *dev, void *info)
return ret;
}
-/*
- * vmbus_dev_rm - Callback when the root bus device is removed
- */
-static int vmbus_dev_rm(struct hv_device *dev)
-{
- int ret = 0;
-
- vmbus_release_unattached_channels();
- vmbus_disconnect();
- on_each_cpu(hv_synic_cleanup, NULL, 1);
- return ret;
-}
/*
* vmbus_cleanup - Perform any cleanup when the driver is removed
@@ -568,8 +556,9 @@ static void vmbus_bus_exit(void)
struct hv_device *dev_ctx = &vmbus_drv.device_ctx;
- /* Remove the root device */
- vmbus_dev_rm(dev_ctx);
+ vmbus_release_unattached_channels();
+ vmbus_disconnect();
+ on_each_cpu(hv_synic_cleanup, NULL, 1);
vmbus_cleanup();
--
1.5.5.6
^ permalink raw reply related
* [PATCH 05/21] Staging: hv: Change the signature for vmbus_on_isr()
From: K. Y. Srinivasan @ 2011-03-10 22:06 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
As part of getting getting rid of the hv_driver object from
vmbus_driver_context, change the signature for vmbus_on_isr.
Note that the argument to vmbus_on_isr() is not used.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 4b4483b..8e8a408 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -258,7 +258,7 @@ static void vmbus_on_msg_dpc(unsigned long data)
/*
* vmbus_on_isr - ISR routine
*/
-static int vmbus_on_isr(struct hv_driver *drv)
+static int vmbus_on_isr(void)
{
int ret = 0;
int cpu = smp_processor_id();
@@ -989,8 +989,7 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
{
int ret;
- /* Call to bus driver to handle interrupt */
- ret = vmbus_on_isr(NULL);
+ ret = vmbus_on_isr();
/* Schedules a dpc if necessary */
if (ret > 0) {
--
1.5.5.6
^ permalink raw reply related
* [PATCH 04/21] Staging: hv: Eliminate vmbus_event_dpc()
From: K. Y. Srinivasan @ 2011-03-10 22:05 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
vmbus_event_dpc() was a wrapper function not adding any value;
get rid of it.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/connection.c | 2 +-
drivers/staging/hv/vmbus_drv.c | 11 +----------
drivers/staging/hv/vmbus_private.h | 2 +-
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/hv/connection.c b/drivers/staging/hv/connection.c
index f7df479..fd589e3 100644
--- a/drivers/staging/hv/connection.c
+++ b/drivers/staging/hv/connection.c
@@ -285,7 +285,7 @@ static void process_chn_event(void *context)
/*
* vmbus_on_event - Handler for events
*/
-void vmbus_on_event(void)
+void vmbus_on_event(unsigned long data)
{
int dword;
int maxdword = MAX_NUM_CHANNELS_SUPPORTED >> 5;
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 7e67933..4b4483b 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -56,7 +56,6 @@ static int vmbus_probe(struct device *device);
static int vmbus_remove(struct device *device);
static void vmbus_shutdown(struct device *device);
static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env);
-static void vmbus_event_dpc(unsigned long data);
static irqreturn_t vmbus_isr(int irq, void *dev_id);
@@ -485,7 +484,7 @@ static int vmbus_bus_init(void)
/* Initialize the bus context */
tasklet_init(&vmbus_drv_ctx->msg_dpc, vmbus_on_msg_dpc,
(unsigned long)NULL);
- tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_event_dpc,
+ tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_on_event,
(unsigned long)NULL);
/* Now, register the bus with LDM */
@@ -985,14 +984,6 @@ static void vmbus_device_release(struct device *device)
}
-/*
- * vmbus_event_dpc - Tasklet routine to handle hypervisor events
- */
-static void vmbus_event_dpc(unsigned long data)
-{
- /* Call to bus driver to handle interrupt */
- vmbus_on_event();
-}
static irqreturn_t vmbus_isr(int irq, void *dev_id)
{
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h
index 9f505c4..1b88b6f 100644
--- a/drivers/staging/hv/vmbus_private.h
+++ b/drivers/staging/hv/vmbus_private.h
@@ -129,7 +129,7 @@ int vmbus_post_msg(void *buffer, size_t buflen);
int vmbus_set_event(u32 child_relid);
-void vmbus_on_event(void);
+void vmbus_on_event(unsigned long data);
#endif /* _VMBUS_PRIVATE_H_ */
--
1.5.5.6
^ permalink raw reply related
* [PATCH 03/21] Staging: hv: Get rid of the function vmbus_msg_dpc()
From: K. Y. Srinivasan @ 2011-03-10 22:04 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
vmbus_msg_dpc() was a wrapper adding no additional value;
get rid of this function.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 95654b1..7e67933 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -56,7 +56,6 @@ static int vmbus_probe(struct device *device);
static int vmbus_remove(struct device *device);
static void vmbus_shutdown(struct device *device);
static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env);
-static void vmbus_msg_dpc(unsigned long data);
static void vmbus_event_dpc(unsigned long data);
static irqreturn_t vmbus_isr(int irq, void *dev_id);
@@ -214,7 +213,7 @@ static void vmbus_onmessage_work(struct work_struct *work)
/*
* vmbus_on_msg_dpc - DPC routine to handle messages from the hypervisior
*/
-static void vmbus_on_msg_dpc(struct hv_driver *drv)
+static void vmbus_on_msg_dpc(unsigned long data)
{
int cpu = smp_processor_id();
void *page_addr = hv_context.synic_message_page[cpu];
@@ -484,7 +483,7 @@ static int vmbus_bus_init(void)
vmbus_drv_ctx->bus.name = driver_name;
/* Initialize the bus context */
- tasklet_init(&vmbus_drv_ctx->msg_dpc, vmbus_msg_dpc,
+ tasklet_init(&vmbus_drv_ctx->msg_dpc, vmbus_on_msg_dpc,
(unsigned long)NULL);
tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_event_dpc,
(unsigned long)NULL);
@@ -985,16 +984,6 @@ static void vmbus_device_release(struct device *device)
/* !!DO NOT REFERENCE device_ctx anymore at this point!! */
}
-/*
- * vmbus_msg_dpc - Tasklet routine to handle hypervisor messages
- */
-static void vmbus_msg_dpc(unsigned long data)
-{
- struct hv_driver *driver = (struct hv_driver *)data;
-
- /* Call to bus driver to handle interrupt */
- vmbus_on_msg_dpc(driver);
-}
/*
* vmbus_event_dpc - Tasklet routine to handle hypervisor events
--
1.5.5.6
^ permalink raw reply related
* [PATCH 02/21] Staging: hv: Change the signature for vmbus_cleanup()
From: K. Y. Srinivasan @ 2011-03-10 22:04 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
As part of geting rid of hv_driver object from
vmbus_driver_context, change the signature of
vmbus_cleanup() function. Note that while
vmbus_cleanup() was passed a pointer to hv_driver,
this argument was unused.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 884a4c6..95654b1 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -190,9 +190,8 @@ static int vmbus_dev_rm(struct hv_device *dev)
/*
* vmbus_cleanup - Perform any cleanup when the driver is removed
*/
-static void vmbus_cleanup(struct hv_driver *drv)
+static void vmbus_cleanup(void)
{
- /* struct vmbus_driver *driver = (struct vmbus_driver *)drv; */
hv_cleanup();
}
@@ -574,7 +573,7 @@ static void vmbus_bus_exit(void)
/* Remove the root device */
vmbus_dev_rm(dev_ctx);
- vmbus_cleanup(NULL);
+ vmbus_cleanup();
/* Unregister the root bus device */
device_unregister(&dev_ctx->device);
--
1.5.5.6
^ permalink raw reply related
* [PATCH 01/21] Staging: hv: Simplify root device management
From: K. Y. Srinivasan @ 2011-03-10 22:03 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
Cc: Haiyang Zhang, Mike Sterling, Abhishek Kane, Hank Janssen
In-Reply-To: <[PATCH 00/21] Staging: hv: Cleanup vmbus driver>
As part of simplifying root device management,
get rid of the hv_driver object from
vmbus_driver_context.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/vmbus_drv.c | 41 ++++++++++-----------------------------
1 files changed, 11 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 159dfda..884a4c6 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -42,7 +42,6 @@
/* Main vmbus driver data structure */
struct vmbus_driver_context {
- struct hv_driver drv_obj;
struct bus_type bus;
struct tasklet_struct msg_dpc;
@@ -458,7 +457,6 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
static int vmbus_bus_init(void)
{
struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv;
- struct hv_driver *driver = &vmbus_drv.drv_obj;
struct hv_device *dev_ctx = &vmbus_drv.device_ctx;
int ret;
unsigned int vector;
@@ -474,13 +472,6 @@ static int vmbus_bus_init(void)
sizeof(struct vmbus_channel_packet_page_buffer),
sizeof(struct vmbus_channel_packet_multipage_buffer));
- driver->name = driver_name;
- memcpy(&driver->dev_type, &device_type, sizeof(struct hv_guid));
-
- /* Setup dispatch table */
- driver->dev_add = vmbus_dev_add;
- driver->dev_rm = vmbus_dev_rm;
- driver->cleanup = vmbus_cleanup;
/* Hypervisor initialization...setup hypercall page..etc */
ret = hv_init();
@@ -490,22 +481,16 @@ static int vmbus_bus_init(void)
goto cleanup;
}
- /* Sanity checks */
- if (!driver->dev_add) {
- DPRINT_ERR(VMBUS_DRV, "OnDeviceAdd() routine not set");
- ret = -1;
- goto cleanup;
- }
- vmbus_drv_ctx->bus.name = driver->name;
+ vmbus_drv_ctx->bus.name = driver_name;
/* Initialize the bus context */
tasklet_init(&vmbus_drv_ctx->msg_dpc, vmbus_msg_dpc,
- (unsigned long)driver);
+ (unsigned long)NULL);
tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_event_dpc,
- (unsigned long)driver);
+ (unsigned long)NULL);
- /* Now, register the bus driver with LDM */
+ /* Now, register the bus with LDM */
ret = bus_register(&vmbus_drv_ctx->bus);
if (ret) {
ret = -1;
@@ -514,7 +499,7 @@ static int vmbus_bus_init(void)
/* Get the interrupt resource */
ret = request_irq(vmbus_irq, vmbus_isr, IRQF_SAMPLE_RANDOM,
- driver->name, NULL);
+ driver_name, NULL);
if (ret != 0) {
DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d",
@@ -529,10 +514,10 @@ static int vmbus_bus_init(void)
DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", vmbus_irq, vector);
- /* Call to bus driver to add the root device */
+ /* Add the root device */
memset(dev_ctx, 0, sizeof(struct hv_device));
- ret = driver->dev_add(dev_ctx, &vector);
+ ret = vmbus_dev_add(dev_ctx, &vector);
if (ret != 0) {
DPRINT_ERR(VMBUS_DRV,
"ERROR - Unable to add vmbus root device");
@@ -555,7 +540,7 @@ static int vmbus_bus_init(void)
/* Setup the device dispatch table */
dev_ctx->device.release = vmbus_bus_release;
- /* Setup the bus as root device */
+ /* register the root device */
ret = device_register(&dev_ctx->device);
if (ret) {
DPRINT_ERR(VMBUS_DRV,
@@ -582,17 +567,14 @@ cleanup:
*/
static void vmbus_bus_exit(void)
{
- struct hv_driver *driver = &vmbus_drv.drv_obj;
struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv;
struct hv_device *dev_ctx = &vmbus_drv.device_ctx;
/* Remove the root device */
- if (driver->dev_rm)
- driver->dev_rm(dev_ctx);
+ vmbus_dev_rm(dev_ctx);
- if (driver->cleanup)
- driver->cleanup(driver);
+ vmbus_cleanup(NULL);
/* Unregister the root bus device */
device_unregister(&dev_ctx->device);
@@ -1026,11 +1008,10 @@ static void vmbus_event_dpc(unsigned long data)
static irqreturn_t vmbus_isr(int irq, void *dev_id)
{
- struct hv_driver *driver = &vmbus_drv.drv_obj;
int ret;
/* Call to bus driver to handle interrupt */
- ret = vmbus_on_isr(driver);
+ ret = vmbus_on_isr(NULL);
/* Schedules a dpc if necessary */
if (ret > 0) {
--
1.5.5.6
^ permalink raw reply related
* [PATCH 00/21] Staging: hv: Cleanup vmbus driver
From: K. Y. Srinivasan @ 2011-03-10 21:59 UTC (permalink / raw)
To: kys, gregkh, linux-kernel, devel, virtualization
This patch-set fixes the following issues in the vmbus driver (vmbus_drv.c):
Cleanup root device management: (patches 1/21 through 10/21)
1) Get rid of the hv_driver code from the vmbus abstraction
2) Get rid of unnecessary call sequences and functions
3) Cleanup the management of the root device by using the
standard mechanism for grouping devices under /sys/devices
Make vmbus driver a platform pci device and cleanup irq allocation
(patches 11/21 through 12/21):
1) Make vmbus driver a platform pci driver.
2) Leverage the pci model for allocating irq.
General cleanup of vmbus driver (patches 13/21 though 21/21):
1) Rename vmbus_driver_context structure and do
related cleanup.
2) Get rid of forward declarations by moving code.
Regards,
K. Y
^ permalink raw reply
* Re: Bug inkvm_set_irq
From: Jean-Philippe Menil @ 2011-03-10 8:42 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, kvm, virtualization
In-Reply-To: <20110309135918.GA31019@redhat.com>
Le 09/03/2011 14:59, Michael S. Tsirkin a écrit :
> On Wed, Mar 09, 2011 at 02:12:58PM +0100, Jean-Philippe Menil wrote:
>> Le 09/03/2011 14:00, Michael S. Tsirkin a écrit :
>>> On Wed, Mar 09, 2011 at 01:28:43PM +0100, Jean-Philippe Menil wrote:
>>>> Le 08/03/2011 12:13, Michael S. Tsirkin a écrit :
>>>>> On Fri, Mar 04, 2011 at 10:39:05AM +0100, Jean-Philippe Menil wrote:
>>>>>> Yes, it's a 2.6.37.2 kernel.
>>>>> OK, here's a debugging patch.
>>>>> Please run with slab debugging as previously until you see
>>>>> 'eventfd bug detected!' in dmesg or until there is a crash.
>>>>> It might be also useful to enable timestampts on printk with
>>>>> Symbol: PRINTK_TIME [=y]
>>>>> │ Type : boolean
>>>>> │ Prompt: Show timing information on printks
>>>>>
>>>>> once you see the error, please upload the
>>>>> full dmesg output somewhere to we can track what
>>>>> goes on.
>>>>>
>>>>> Hopefully there won't be an oops this time which
>>>>> should make it easier for you to test (no need to
>>>>> reboot).
>>>>>
>>>>>
>>>>> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
>>>>> index c1f1e3c..3cb679b 100644
>>>>> --- a/virt/kvm/eventfd.c
>>>>> +++ b/virt/kvm/eventfd.c
>>>>> @@ -32,6 +32,7 @@
>>>>> #include<linux/eventfd.h>
>>>>> #include<linux/kernel.h>
>>>>> #include<linux/slab.h>
>>>>> +#include<linux/nmi.h>
>>>>>
>>>>> #include "iodev.h"
>>>>>
>>>>> @@ -43,6 +44,8 @@
>>>>> * --------------------------------------------------------------------
>>>>> */
>>>>>
>>>>> +#define KVM_BAD_PTR ((void*)(long)(0x6b6b6b6b6b6b6b6bull))
>>>>> +
>>>>> struct _irqfd {
>>>>> struct kvm *kvm;
>>>>> struct eventfd_ctx *eventfd;
>>>>> @@ -61,6 +64,13 @@ irqfd_inject(struct work_struct *work)
>>>>> {
>>>>> struct _irqfd *irqfd = container_of(work, struct _irqfd, inject);
>>>>> struct kvm *kvm = irqfd->kvm;
>>>>> + if (kvm == KVM_BAD_PTR) {
>>>>> + printk(KERN_ERR "Eventfd bug detected!\n");
>>>>> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d)\n", __func__,
>>>>> + work, irqfd, kvm, irqfd->gsi);
>>>>> + trigger_all_cpu_backtrace();
>>>>> + return;
>>>>> + }
>>>>>
>>>>> kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 1);
>>>>> kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 0);
>>>>> @@ -75,6 +85,8 @@ irqfd_shutdown(struct work_struct *work)
>>>>> struct _irqfd *irqfd = container_of(work, struct _irqfd, shutdown);
>>>>> u64 cnt;
>>>>>
>>>>> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
>>>>> + work, irqfd, irqfd->kvm, irqfd->gsi);
>>>>> /*
>>>>> * Synchronize with the wait-queue and unhook ourselves to prevent
>>>>> * further events.
>>>>> @@ -91,6 +103,8 @@ irqfd_shutdown(struct work_struct *work)
>>>>> * It is now safe to release the object's resources
>>>>> */
>>>>> eventfd_ctx_put(irqfd->eventfd);
>>>>> + printk(KERN_ERR "kfree at %s(work=%p,irqfd=%p)\n", __func__,
>>>>> + work, irqfd);
>>>>> kfree(irqfd);
>>>>> }
>>>>>
>>>>> @@ -111,6 +125,8 @@ static void
>>>>> irqfd_deactivate(struct _irqfd *irqfd)
>>>>> {
>>>>> BUG_ON(!irqfd_is_active(irqfd));
>>>>> + printk(KERN_ERR "%s(irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
>>>>> + irqfd, irqfd->kvm, irqfd->gsi);
>>>>>
>>>>> list_del_init(&irqfd->list);
>>>>>
>>>>> @@ -178,6 +194,8 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
>>>>>
>>>>> irqfd->kvm = kvm;
>>>>> irqfd->gsi = gsi;
>>>>> + printk(KERN_ERR "%s(irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
>>>>> + irqfd, kvm, gsi);
>>>>> INIT_LIST_HEAD(&irqfd->list);
>>>>> INIT_WORK(&irqfd->inject, irqfd_inject);
>>>>> INIT_WORK(&irqfd->shutdown, irqfd_shutdown);
>>>>> @@ -264,6 +282,8 @@ kvm_irqfd_deassign(struct kvm *kvm, int fd, int gsi)
>>>>> struct _irqfd *irqfd, *tmp;
>>>>> struct eventfd_ctx *eventfd;
>>>>>
>>>>> + printk(KERN_ERR "%s(kvm=%p, gsi=%d)\n", __func__,
>>>>> + kvm, gsi);
>>>>> eventfd = eventfd_ctx_fdget(fd);
>>>>> if (IS_ERR(eventfd))
>>>>> return PTR_ERR(eventfd);
>>>>> @@ -305,6 +325,7 @@ void
>>>>> kvm_irqfd_release(struct kvm *kvm)
>>>>> {
>>>>> struct _irqfd *irqfd, *tmp;
>>>>> + printk(KERN_ERR "%s(kvm=%p)\n", __func__, kvm);
>>>>>
>>>>> spin_lock_irq(&kvm->irqfds.lock);
>>>>>
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>> Hi,
>>>>
>>>> I boot the host with the patched kernel yesterday.
>>>> No crach until now, but two "Eventfd bug detected!" in the log at
>>>> "Mar 9 02:04:31" and "Mar 9 02:15:17"
>>>> You can find part of the log at the following adress:
>>>> http://filex.univ-nantes.fr/get?k=jL4Fe7yfSMN57toAH7V
>>>>
>>>> It a split file of the kern.log (1,4G), so if you need another part
>>>> of the log, let me know.
>>>>
>>>> Thanks for all.
>>>>
>>>> Regards.
>>> Downloading, it's big :)
>>> What about some 1000 lines before and after Eventfd bug detected! line?
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Yes, sorry about that.
>> I could have split my log into a smaller file.
>>
>> I was a little afraid of not transmit enough informations, and i was
>> a bit wide.
>> I hope you can find usefull trace anyway.
>>
>> Regards.
>
> OK, use after free.
>
>
> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.593681]
> kvm_irqfd_assign(irqfd=ffff88045e8d6230,kvm=ffff88085151c000, gsi=26)
> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605359]
> kvm_irqfd_deassign(kvm=ffff88085151c000, gsi=26)
> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605388]
> irqfd_deactivate(irqfd=ffff88045e8d6230,kvm=ffff88085151c000, gsi=26)
> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605461]
> irqfd_shutdown(work=ffff88045e8d62b0,irqfd=ffff88045e8d6230,kvm=ffff88085151c000,
> gsi=26)
> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605509]
> kfree at irqfd_shutdown(work=ffff88045e8d62b0,irqfd=ffff88045e8d6230)
> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605588]
> Eventfd bug detected!
> Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605612]
> irqfd_inject(work=ffff88045e8d6290,irqfd=ffff88045e8d6230,kvm=6b6b6b6b6b6b6b6b,gsi=1802201963)
>
>
> and 1802201963 is also 6b6b6b6b.
>
>
> I suspect that somehow, we get an event from eventfd even
> though we did eventfd_ctx_remove_wait_queue.
> Could you please try the following patch on top?
> When you see Eventfd bug or Wakeup bug, paste some
> last lines.
> For the full log file - better compress with xz.
>
>
> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> index 3cb679b..63aeba5 100644
> --- a/virt/kvm/eventfd.c
> +++ b/virt/kvm/eventfd.c
> @@ -92,6 +92,8 @@ irqfd_shutdown(struct work_struct *work)
> * further events.
> */
> eventfd_ctx_remove_wait_queue(irqfd->eventfd,&irqfd->wait,&cnt);
> + printk(KERN_ERR "remove wq at %s(work=%p,irqfd=%p)\n", __func__,
> + work, irqfd);
>
> /*
> * We know no new events will be scheduled at this point, so block
> @@ -142,6 +144,13 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
> struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait);
> unsigned long flags = (unsigned long)key;
>
> + if (irqfd->kvm == KVM_BAD_PTR) {
> + printk(KERN_ERR "Wakeup bug detected! flags 0x%lx\n", flags);
> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d)\n", __func__,
> + &irqfd->inject, irqfd, irqfd->kvm, irqfd->gsi);
> + trigger_all_cpu_backtrace();
> + return 0;
> + }
> if (flags& POLLIN)
> /* An event has been signaled, inject an interrupt */
> schedule_work(&irqfd->inject);
> @@ -153,6 +162,9 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
>
> spin_lock_irqsave(&kvm->irqfds.lock, flags);
>
> + printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d,active=%d)\n", __func__,
> + &irqfd->inject, irqfd, irqfd->kvm, irqfd->gsi,
> + irqfd_is_active(irqfd));
> /*
> * We must check if someone deactivated the irqfd before
> * we could acquire the irqfds.lock since the item is
>
Hi,
I noted seven "Eventfd bug detected" events during the night, and only
one Wakeup event:
fifth.ah:Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel:
[44867.105868] Eventfd bug detected!
first.ad:Mar 10 01:08:15 ayrshire.u06.univ-nantes.prive kernel:
[34729.771260] Eventfd bug detected!
fourth.ad:Mar 10 02:54:41 ayrshire.u06.univ-nantes.prive kernel:
[41115.140873] Eventfd bug detected!
second.ab:Mar 10 02:41:55 ayrshire.u06.univ-nantes.prive kernel:
[40348.967192] Eventfd bug detected!
seventh.ab:Mar 10 07:52:29 ayrshire.u06.univ-nantes.prive kernel:
[58983.145646] Eventfd bug detected!
sixth.ab:Mar 10 05:19:54 ayrshire.u06.univ-nantes.prive kernel:
[49828.785558] Eventfd bug detected!
third.ae:Mar 10 02:54:07 ayrshire.u06.univ-nantes.prive kernel:
[41081.638633] Eventfd bug detected!
grep -i wakeup *
seventh.ab:Mar 10 07:52:29 ayrshire.u06.univ-nantes.prive kernel:
[58983.154161] [<ffffffffa02cbf96>] vhost_poll_wakeup+0x16/0x20 [vhost_net
Here is a trace, for the thirst event:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.101747]
irqfd_deactivate(irqfd=ffff88042e0b5e00,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.101873]
irqfd_shutdown(work=ffff88042e0b5e80,irqfd=ffff88042e0b5e00,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.101928]
remove wq at irqfd_shutdown(work=ffff88042e0b5e80,irqfd=ffff88042e0b5e00)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.101990]
kfree at irqfd_shutdown(work=ffff88042e0b5e80,irqfd=ffff88042e0b5e00)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.102381]
kvm_irqfd_assign(irqfd=ffff88080f7aa818,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.103796]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.103833]
irqfd_deactivate(irqfd=ffff88080f7aa818,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.103904]
irqfd_shutdown(work=ffff88080f7aa898,irqfd=ffff88080f7aa818,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.103958]
remove wq at irqfd_shutdown(work=ffff88080f7aa898,irqfd=ffff88080f7aa818)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104023]
kfree at irqfd_shutdown(work=ffff88080f7aa898,irqfd=ffff88080f7aa818)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104311]
kvm_irqfd_assign(irqfd=ffff88081a190b78,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104511]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104549]
irqfd_deactivate(irqfd=ffff88081a190b78,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104614]
irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104667]
remove wq at irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104715]
kfree at irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.104911]
kvm_irqfd_assign(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.105868]
Eventfd bug detected!
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.105901]
irqfd_inject(work=ffff88042e0b5e60,irqfd=ffff88042e0b5e00,kvm=6b6b6b6b6b6b6b6b,gsi=1802201963)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.105951]
sending NMI to all CPUs:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.105961]
NMI backtrace for cpu 0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.105986] CPU 0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.105992]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106557]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106581]
Pid: 10, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Dell Inc. PowerEdge M605/0K543T
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106644]
RIP: 0010:[<ffffffff8105fa4b>] [<ffffffff8105fa4b>]
default_send_IPI_mask_sequence_phys+0xbb/0xe0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106706]
RSP: 0018:ffff88045fcb1d50 EFLAGS: 00000046
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106735]
RAX: ffff88087fc00000 RBX: 0000000000000002 RCX: 0000000000000008
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106767]
RDX: 0000000000000001 RSI: 0000000000000020 RDI: 0000000000000020
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106799]
RBP: ffff88045fcb1d90 R08: ffffffff8159faf0 R09: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106831]
R10: 0000000000000000 R11: 0000000000000006 R12: 000000000000c620
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106863]
R13: ffffffff8159faf0 R14: 0000000000000400 R15: 0000000000000286
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106896]
FS: 00007f66f7754720(0000) GS:ffff88007f800000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106944]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.106973]
CR2: 0000000000e64048 CR3: 000000045ea45000 CR4: 00000000000006f0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.107005]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.107037]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.107070]
Process kworker/0:1 (pid: 10, threadinfo ffff88045fcb0000, task
ffff88045fcaae70)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.107117] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.107138]
ffffffff00000000 0000000000000000 ffff88045fcb1d70 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
6b6b6b6b6b6b6b6b ffff88007f814e00 ffffffff81008ba0 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
ffff88045fcb1da0 ffffffff81062c12 ffff88045fcb1dc0 ffffffff8105fb3c
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81008ba0>] ? irqfd_inject+0x0/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81062c12>] physflat_send_IPI_all+0x12/0x20
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff8105fb3c>] arch_trigger_all_cpu_backtrace+0x3c/0x70
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81008c2f>] irqfd_inject+0x8f/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a971b>] process_one_work+0x11b/0x450
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a9e97>] worker_thread+0x157/0x410
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81078519>] ? __wake_up_common+0x59/0x90
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a9d40>] ? worker_thread+0x0/0x410
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810ad8f6>] kthread+0x96/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81041c64>] kernel_thread_helper+0x4/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810ad860>] ? kthread+0x0/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81041c60>] ? kernel_thread_helper+0x0/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
Code: 83 fb 02 44 89 f0 0f 45 c3 89 04 25 00 c3 5f ff eb 9e 4c 89 ff 57
9d 66 66 90 66 90 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f c9 c3 <48> 8b
05 4e fb 53 00 48 89 55 c8 89 4d c0 ff 90 58 01 00 00 48
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81008ba0>] ? irqfd_inject+0x0/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81062c12>] physflat_send_IPI_all+0x12/0x20
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff8105fb3c>] arch_trigger_all_cpu_backtrace+0x3c/0x70
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81008c2f>] irqfd_inject+0x8f/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a971b>] process_one_work+0x11b/0x450
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a9e97>] worker_thread+0x157/0x410
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81078519>] ? __wake_up_common+0x59/0x90
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a9d40>] ? worker_thread+0x0/0x410
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810ad8f6>] kthread+0x96/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81041c64>] kernel_thread_helper+0x4/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810ad860>] ? kthread+0x0/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81041c60>] ? kernel_thread_helper+0x0/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
Pid: 10, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff8105fa4b>] ? default_send_IPI_mask_sequence_phys+0xbb/0xe0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
<<EOE>> [<ffffffff81008ba0>] ? irqfd_inject+0x0/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81062c12>] physflat_send_IPI_all+0x12/0x20
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff8105fb3c>] arch_trigger_all_cpu_backtrace+0x3c/0x70
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81008c2f>] irqfd_inject+0x8f/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a971b>] process_one_work+0x11b/0x450
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a9e97>] worker_thread+0x157/0x410
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81078519>] ? __wake_up_common+0x59/0x90
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810a9d40>] ? worker_thread+0x0/0x410
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810ad8f6>] kthread+0x96/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81041c64>] kernel_thread_helper+0x4/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff810ad860>] ? kthread+0x0/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108011]
[<ffffffff81041c60>] ? kernel_thread_helper+0x0/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110243]
NMI backtrace for cpu 3
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110272] CPU 3
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110280]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110882]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110906]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Dell Inc. PowerEdge M605/0K543T
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110970]
RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111030]
RSP: 0018:ffff88045fcd3ea8 EFLAGS: 00000246
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111059]
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111091]
RDX: 0000000000000000 RSI: ffff88045fcd3ee4 RDI: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111123]
RBP: ffff88045fcd3ea8 R08: 0000000000000000 R09: 0000000000000001
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111155]
R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111186]
R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111220]
FS: 00007fb1eafc6740(0000) GS:ffff88087fc40000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111268]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111297]
CR2: 00007ff12a981de0 CR3: 000000045569f000 CR4: 00000000000006e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111329]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111362]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111395]
Process kworker/0:1 (pid: 0, threadinfo ffff88045fcd2000, task
ffff88045fcca820)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111442] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111463]
ffff88045fcd3ec8 ffffffff8104a016 ffff88045fcd3ee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111515]
ffff88045fcd3ef8 ffffffff8104a168 ffff88045fcd3ee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111566]
ffff88045fcd2010 ffffffff8159faf0 ffff88045fcd3f28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111618]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111648]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111680]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111712]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111745]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111774]
Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84 00 00 00 00 00 55
48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 fb f4 <c9> c3
0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111982]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112007]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112038]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112069]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112099]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112131]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112176]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112198]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112238]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112272]
[<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112303]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112332]
[<ffffffff81066716>] ? native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112361]
<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112399]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112430]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112460]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112024]
NMI backtrace for cpu 2
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112024] CPU 2
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112024]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Dell Inc. PowerEdge M605/0K543T
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
RSP: 0018:ffff88045fcc5ea8 EFLAGS: 00000246
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
RDX: 0000000000000000 RSI: ffff88045fcc5ee4 RDI: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
RBP: ffff88045fcc5ea8 R08: 0000000000000000 R09: 0000000000000001
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
R13: 0000000000000002 R14: 0000000000000000 R15: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
FS: 00007f66f7754720(0000) GS:ffff88007f840000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
CR2: 00007f241ad1f0b8 CR3: 000000045ea45000 CR4: 00000000000006f0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Process kworker/0:1 (pid: 0, threadinfo ffff88045fcc4000, task
ffff88045fcb87e0)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
ffff88045fcc5ec8 ffffffff8104a016 ffff88045fcc5ee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
ffff88045fcc5ef8 ffffffff8104a168 ffff88045fcc5ee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
ffff88045fcc4010 ffffffff8159faf0 ffff88045fcc5f28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84 00 00 00 00 00 55
48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 fb f4 <c9> c3
0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff81066716>] ? native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112616]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
NMI backtrace for cpu 1
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285] CPU 1
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Pid: 0, comm: kworker/0:0 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Dell Inc. PowerEdge M605/0K543T
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
RSP: 0018:ffff88045fcb3ea8 EFLAGS: 00000246
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
RDX: 0000000000000000 RSI: ffff88045fcb3ee4 RDI: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
RBP: ffff88045fcb3ea8 R08: 0000000000000000 R09: ffff88087fc0e408
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
R10: 000028ce70db0d2f R11: 0000000000000001 R12: ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
FS: 00007fb8e1893710(0000) GS:ffff88087fc00000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
CR2: 00007f241aca71a0 CR3: 000000045ed50000 CR4: 00000000000006e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Process kworker/0:0 (pid: 0, threadinfo ffff88045fcb2000, task
ffff88045fcaa7a0)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
ffff88045fcb3ec8 ffffffff8104a016 ffff88045fcb3ee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
ffff88045fcb3ef8 ffffffff8104a168 ffff88045fcb3ee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
ffff88045fcb2010 ffffffff8159faf0 ffff88045fcb3f28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84 00 00 00 00 00 55
48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 fb f4 <c9> c3
0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112285]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
RDX: 0000000000000000 RSI: ffff88045fd11ee4 RDI: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
ffff88045fd11ef8 ffffffff8104a168 ffff88045fd11ee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
ffff88045fd10010 ffffffff8159faf0 ffff88045fd11f28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.110896]
Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84 00 00 00 00 00 55
48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 fb f4 <c9> c3
0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119695]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119695]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119695]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119695]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119985]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119985]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119985]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.119985]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120119]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120164]
[<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
CR2: 00007f241ad1f0b8 CR3: 000000045ed50000 CR4: 00000000000006e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
Process kworker/0:1 (pid: 0, threadinfo ffff88045fd00000, task
ffff88045fcd8860)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
ffff88045fd01ec8 ffffffff8104a016 ffff88045fd01ee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
ffff88045fd01ef8 ffffffff8104a168 ffff88045fd01ee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
ffff88045fd00010 ffffffff8159faf0 ffff88045fd01f28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.112018]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.123585]
NMI backtrace for cpu 7
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.124502]
RAX: 0000000000000000 RBX: 0000000000000007 RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.125007]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.125206] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Dell Inc. PowerEdge M605/0K543T
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
RSP: 0018:ffff88045fd23ea8 EFLAGS: 00000246
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
RAX: 0000000000000000 RBX: 0000000000000006 RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
RDX: 0000000000000000 RSI: ffff88045fd23ee4 RDI: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
RBP: ffff88045fd23ea8 R08: 0000000000000000 R09: ffff88007f8ce408
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
ffff88045fd23ec8 ffffffff8104a016 ffff88045fd23ee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108015]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
R10: 000028ce766a74a3 R11: 0000000000000001 R12: ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
R13: 0000000000000009 R14: 0000000000000000 R15: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
FS: 00007fa0cb316710(0000) GS:ffff88087fd00000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
CR2: 0000000000e64048 CR3: 000000045ea45000 CR4: 00000000000006e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
Process kworker/0:1 (pid: 0, threadinfo ffff88045fd6e000, task
ffff88045fd669a0)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
ffff88045fd6fec8 ffffffff8104a016 ffff88045fd6fee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
ffff88045fd6fef8 ffffffff8104a168 ffff88045fd6fee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
ffff88045fd6e010 ffffffff8159faf0 ffff88045fd6ff28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84 00 00 00 00 00 55
48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 fb f4 <c9> c3
0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff81066716>] ? native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.126621]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
NMI backtrace for cpu 11
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
CPU 11
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Dell Inc. PowerEdge M605/0K543T
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
RSP: 0018:ffff88045fd8fea8 EFLAGS: 00000246
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
RAX: 0000000000000000 RBX: 000000000000000b RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
RDX: 0000000000000000 RSI: ffff88045fd8fee4 RDI: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
RBP: ffff88045fd8fea8 R08: 0000000000000000 R09: ffff88087fd4e408
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
R10: 000028ce71c3578e R11: 0000000000000001 R12: ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
R13: 000000000000000b R14: 0000000000000000 R15: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
FS: 00007fa0ce156740(0000) GS:ffff88087fd40000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
CR2: 00007f2421c3eae0 CR3: 000000045ea45000 CR4: 00000000000006e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Process kworker/0:1 (pid: 0, threadinfo ffff88045fd8e000, task
ffff88045fd86a20)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
ffff88045fd8fec8 ffffffff8104a016 ffff88045fd8fee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
ffff88045fd8fef8 ffffffff8104a168 ffff88045fd8fee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
ffff88045fd8e010 ffffffff8159faf0 ffff88045fd8ff28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84 00 00 00 00 00 55
48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 fb f4 <c9> c3
0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff81066716>] ? native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
<<EOE>> [<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.111333]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
NMI backtrace for cpu 8
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010] CPU 8
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus
hfs minix ntfs vfat msdos fat jfs reiserfs ext4 jbd2 crc16 ext3 jbd
vhost_net macvtap macvlan tun veth powernow_k8 mperf cpufreq_userspace
cpufreq_stats cpufreq_powersave cpufreq_ondemand freq_table
cpufreq_conservative fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables
ipt_LOG xt_multiport xt_limit xt_tcpudp xt_state iptable_filter
ip_tables x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp ext2 mbcache dm_round_robin dm_multipath
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd
soundcore snd_page_alloc shpchp i2c_nforce2 tpm_tis tpm pci_hotplug
psmouse evdev i2c_core tpm_bios dcdbas pcspkr joydev ghes serio_raw
processor thermal_sys hed button xfs exportfs dm_mod sg sr_mod cdrom
usbhid hid usb_storage ses sd_mod enclosure lpfc scsi_transport_fc
ohci_hcd scsi_tgt megaraid_sas scsi_mod bnx2 ehci_hcd [last unloaded:
scsi_wait_sca
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: n]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Dell Inc. PowerEdge M605/0K543T
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
RIP: 0010:[<ffffffff81066716>] [<ffffffff81066716>]
native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
RSP: 0018:ffff88045fd63ea8 EFLAGS: 00000246
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
RDX: 0000000000000000 RSI: ffff88045fd63ee4 RDI: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
RBP: ffff88045fd63ea8 R08: 0000000000000000 R09: ffff88007f90e408
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
R13: 0000000000000008 R14: 0000000000000000 R15: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
FS: 00007fb8e0891710(0000) GS:ffff88007f900000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
CR2: 0000000000e63f28 CR3: 000000045ed50000 CR4: 00000000000006e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
Process kworker/0:1 (pid: 0, threadinfo ffff88045fd62000, task
ffff88045fd34960)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
ffff88045fd63ec8 ffffffff8104a016 ffff88045fd63ee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
ffff88045fd63ef8 ffffffff8104a168 ffff88045fd63ee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
ffff88045fd62010 ffffffff8159faf0 ffff88045fd63f28
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136088]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136098]
irqfd_deactivate(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
Code: 00 00 00 00 00 55 48 89 e5 fa c9 c3 66 0f 1f 84 00 00 00 00 00 55
48 89 e5 fb c9 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 fb f4 <c9> c3 0f
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136661]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136665]
irqfd_deactivate(irqfd=ffff880810a21e00,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136702]
irqfd_shutdown(work=ffff880810a21e80,irqfd=ffff880810a21e00,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136709]
remove wq at irqfd_shutdown(work=ffff880810a21e80,irqfd=ffff880810a21e00)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136715]
kfree at irqfd_shutdown(work=ffff880810a21e80,irqfd=ffff880810a21e00)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010] 1f
84 00 00 00
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136910]
kvm_irqfd_assign(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010] 00
00 55 48 89 e5 f4 c9 c3 66 0f 1f 84
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
[<ffffffff8104a168>] c1e_idle+0x58/0x120
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.108010]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136975]
Pid: 0, comm: kworker/0:1 Not tainted 2.6.37.2-patchjp-110308-c+ #17
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136975]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136975]
<NMI> [<ffffffff8104a786>] ? show_regs+0x26/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136975]
[<ffffffff8105fde1>] nmi_watchdog_tick+0x191/0x1b0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136975]
[<ffffffff813be5f0>] nmi+0x20/0x30
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.136975]
[<ffffffff81066716>] ? native_safe_halt+0x6/0x10
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
FS: 00007f2787814700(0000) GS:ffff88007f940000(0000) knlGS:0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
CR2: 0000000000e63f28 CR3: 000000045ea45000 CR4: 00000000000006e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
Process kworker/0:1 (pid: 0, threadinfo ffff88045fd80000, task
ffff88045fd769e0)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004] Stack:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
ffff88045fd81ec8 ffffffff8104a016 ffff88045fd81ee4 ffffffff8159faf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
ffff88045fd81ef8 ffffffff8104a168 ffff88045fd81ee8 00000000810b3255
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
ffff88045fd80010 ffffffff8159faf0 ffff88045fd81f28 ffffffff8104003b
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
Call Trace:
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
[<ffffffff8104a016>] default_idle+0x46/0xa0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
[<ffffffff8104003b>] cpu_idle+0x6b/0xf0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
[<ffffffff81042ef1>] do_nmi+0x1c1/0x2e0
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.120004]
[<ffffffff813b7247>] start_secondary+0x1b9/0x1be
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.148658]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.148687]
irqfd_deactivate(irqfd=ffff880853b8caa0,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.148759]
irqfd_shutdown(work=ffff880853b8cb20,irqfd=ffff880853b8caa0,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.148814]
remove wq at irqfd_shutdown(work=ffff880853b8cb20,irqfd=ffff880853b8caa0)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.148862]
kfree at irqfd_shutdown(work=ffff880853b8cb20,irqfd=ffff880853b8caa0)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.149086]
kvm_irqfd_assign(irqfd=ffff88081a190b78,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.149379]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=48)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.149416]
irqfd_deactivate(irqfd=ffff88045efd3740,kvm=ffff8804542d0000, gsi=48)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.149540]
irqfd_shutdown(work=ffff88045efd37c0,irqfd=ffff88045efd3740,kvm=ffff8804542d0000,
gsi=48)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.149594]
remove wq at irqfd_shutdown(work=ffff88045efd37c0,irqfd=ffff88045efd3740)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.149643]
kfree at irqfd_shutdown(work=ffff88045efd37c0,irqfd=ffff88045efd3740)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.149922]
kvm_irqfd_assign(irqfd=ffff88080f7aa818,kvm=ffff8804542d0000, gsi=48)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.171869]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.171907]
irqfd_deactivate(irqfd=ffff88081a190b78,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.171989]
irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172111]
remove wq at irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172160]
kfree at irqfd_shutdown(work=ffff88081a190bf8,irqfd=ffff88081a190b78)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172493]
kvm_irqfd_assign(irqfd=ffff88083b062308,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172672]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172710]
irqfd_deactivate(irqfd=ffff88083b062308,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172782]
irqfd_shutdown(work=ffff88083b062388,irqfd=ffff88083b062308,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172836]
remove wq at irqfd_shutdown(work=ffff88083b062388,irqfd=ffff88083b062308)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.172884]
kfree at irqfd_shutdown(work=ffff88083b062388,irqfd=ffff88083b062308)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.173074]
kvm_irqfd_assign(irqfd=ffff88081a190230,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.175303]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.175339]
irqfd_deactivate(irqfd=ffff88081a190230,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.175466]
irqfd_shutdown(work=ffff88081a1902b0,irqfd=ffff88081a190230,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.175521]
remove wq at irqfd_shutdown(work=ffff88081a1902b0,irqfd=ffff88081a190230)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.175569]
kfree at irqfd_shutdown(work=ffff88081a1902b0,irqfd=ffff88081a190230)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.175769]
kvm_irqfd_assign(irqfd=ffff88045eabb668,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.176002]
kvm_irqfd_deassign(kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.176058]
irqfd_deactivate(irqfd=ffff88045eabb668,kvm=ffff8804542d0000, gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.176122]
irqfd_shutdown(work=ffff88045eabb6e8,irqfd=ffff88045eabb668,kvm=ffff8804542d0000,
gsi=24)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.176177]
remove wq at irqfd_shutdown(work=ffff88045eabb6e8,irqfd=ffff88045eabb668)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.176225]
kfree at irqfd_shutdown(work=ffff88045eabb6e8,irqfd=ffff88045eabb668)
Mar 10 03:57:13 ayrshire.u06.univ-nantes.prive kernel: [44867.176427]
kvm_irqfd_assign(irqfd=ffff88045ed96c50,kvm=ffff8804542d0000, gsi=24
You can find all the trace at the following adress:
http://filex.univ-nantes.fr/get?k=R94kna5sckVmdvCoKsn
It's a tar.gz of seven file, from 100k to 200k each ;)
Again, thanks a lot for the time you spent on this.
Regards.
--
Jean-Philippe Menil - Pôle réseau Service IRTS
DSI Université de Nantes
jean-philippe.menil@univ-nantes.fr
Tel : 02.53.48.49.27 - Fax : 02.53.48.49.09
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* [PATCH 02/02] virtio: Add virtio platform driver
From: Magnus Damm @ 2011-03-10 7:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Magnus Damm, mst, virtualization, linux-sh
In-Reply-To: <20110310070541.27327.52089.sendpatchset@t400s>
From: Magnus Damm <damm@opensource.se>
This patch adds a virtio platform driver. The code is based on
the lguest implementation available in drivers/lguest/lguest_device.c
The iomem resource is used to point out the lguest device descriptor,
and the platform data contains two separate callbacks for notification.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/virtio/Kconfig | 11 +
drivers/virtio/Makefile | 1
drivers/virtio/virtio_platform.c | 282 ++++++++++++++++++++++++++++++++++++++
include/linux/virtio_platform.h | 12 +
4 files changed, 306 insertions(+)
--- 0002/drivers/virtio/Kconfig
+++ work/drivers/virtio/Kconfig 2011-03-03 15:56:53.000000000 +0900
@@ -35,3 +35,14 @@ config VIRTIO_BALLOON
config VIRTIO_LGUEST
tristate
+
+config VIRTIO_PLATFORM
+ tristate "Platform driver for virtio devices (EXPERIMENTAL)"
+ select VIRTIO
+ select VIRTIO_RING
+ select VIRTIO_LGUEST
+ ---help---
+ This drivers provides support for virtio based paravirtual device
+ drivers over a platform bus.
+
+ If unsure, say N.
--- 0002/drivers/virtio/Makefile
+++ work/drivers/virtio/Makefile 2011-03-03 15:56:53.000000000 +0900
@@ -3,3 +3,4 @@ obj-$(CONFIG_VIRTIO_RING) += virtio_ring
obj-$(CONFIG_VIRTIO_PCI) += virtio_pci.o
obj-$(CONFIG_VIRTIO_BALLOON) += virtio_balloon.o
obj-$(CONFIG_VIRTIO_LGUEST) += virtio_lguest.o
+obj-$(CONFIG_VIRTIO_PLATFORM) += virtio_platform.o
--- /dev/null
+++ work/drivers/virtio/virtio_platform.c 2011-03-03 16:07:31.000000000 +0900
@@ -0,0 +1,282 @@
+#include <linux/init.h>
+#include <linux/virtio.h>
+#include <linux/virtio_config.h>
+#include <linux/virtio_ring.h>
+#include <linux/lguest_device.h>
+#include <linux/lguest_launcher.h>
+#include <linux/virtio_platform.h>
+#include <linux/platform_device.h>
+#include <linux/interrupt.h>
+#include <linux/err.h>
+#include <linux/slab.h>
+#include <linux/io.h>
+
+static void __iomem *virtio_map(unsigned long phys_addr, unsigned long pages)
+{
+ return ioremap_nocache(phys_addr, PAGE_SIZE*pages);
+}
+
+static void virtio_unmap(void __iomem *addr)
+{
+ iounmap(addr);
+}
+
+static void set_status(struct virtio_device *vdev, u8 status)
+{
+ struct platform_device *pdev = to_platform_device(vdev->dev.parent);
+ struct virtio_platform_data *pdata = pdev->dev.platform_data;
+
+ to_lgdev(vdev)->desc->status = status;
+ pdata->notify_virtio(pdev);
+}
+
+static void lg_set_status(struct virtio_device *vdev, u8 status)
+{
+ BUG_ON(!status);
+ set_status(vdev, status);
+}
+
+static void lg_reset(struct virtio_device *vdev)
+{
+ set_status(vdev, 0);
+}
+
+/*
+ * Virtqueues
+ *
+ * The other piece of infrastructure virtio needs is a "virtqueue": a way of
+ * the Guest device registering buffers for the other side to read from or
+ * write into (ie. send and receive buffers). Each device can have multiple
+ * virtqueues: for example the console driver uses one queue for sending and
+ * another for receiving.
+ *
+ * Fortunately for us, a very fast shared-memory-plus-descriptors virtqueue
+ * already exists in virtio_ring.c. We just need to connect it up.
+ *
+ * We start with the information we need to keep about each virtqueue.
+ */
+
+/*D:140 This is the information we remember about each virtqueue. */
+struct lguest_vq_info {
+ /* A copy of the information contained in the device config. */
+ struct lguest_vqconfig config;
+
+ /* The address where we mapped the virtio ring, so we can unmap it. */
+ void __iomem *pages;
+};
+
+/*
+ * When the virtio_ring code wants to prod the Host, it calls us here and we
+ * call the board specific callback. We hand a pointer to the configuration
+ * so the board code knows which virtqueue we're talking about.
+ */
+static void lg_notify(struct virtqueue *vq)
+{
+ struct platform_device *pdev = to_platform_device(vq->vdev->dev.parent);
+ struct virtio_platform_data *pdata = pdev->dev.platform_data;
+ struct lguest_vq_info *lvq = vq->priv;
+
+ pdata->notify_virtqueue(pdev, &lvq->config);
+}
+
+/*
+ * This routine finds the Nth virtqueue described in the configuration of
+ * this device and sets it up.
+ *
+ * This is kind of an ugly duckling. It'd be nicer to have a standard
+ * representation of a virtqueue in the configuration space, but it seems that
+ * everyone wants to do it differently. The KVM coders want the Guest to
+ * allocate its own pages and tell the Host where they are, but for lguest it's
+ * simpler for the Host to simply tell us where the pages are.
+ */
+static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
+ unsigned index,
+ void (*callback)(struct virtqueue *vq),
+ const char *name)
+{
+ struct lguest_device *ldev = to_lgdev(vdev);
+ struct lguest_vq_info *lvq;
+ struct virtqueue *vq;
+ int err;
+
+ /* We must have this many virtqueues. */
+ if (index >= ldev->desc->num_vq)
+ return ERR_PTR(-ENOENT);
+
+ lvq = kmalloc(sizeof(*lvq), GFP_KERNEL);
+ if (!lvq)
+ return ERR_PTR(-ENOMEM);
+
+ /*
+ * Make a copy of the "struct lguest_vqconfig" entry, which sits after
+ * the descriptor. We need a copy because the config space might not
+ * be aligned correctly.
+ */
+ memcpy(&lvq->config, lg_vq(ldev->desc)+index, sizeof(lvq->config));
+
+ dev_info(&vdev->dev, "Mapping virtqueue %i addr %lx\n", index,
+ (unsigned long)lvq->config.pfn << PAGE_SHIFT);
+ /* Figure out how many pages the ring will take, and map that memory */
+ lvq->pages = virtio_map((unsigned long)lvq->config.pfn << PAGE_SHIFT,
+ DIV_ROUND_UP(vring_size(lvq->config.num,
+ LGUEST_VRING_ALIGN),
+ PAGE_SIZE));
+ if (!lvq->pages) {
+ err = -ENOMEM;
+ goto free_lvq;
+ }
+
+ /*
+ * OK, tell virtio_ring.c to set up a virtqueue now we know its size
+ * and we've got a pointer to its pages.
+ */
+ vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN,
+ vdev, lvq->pages, lg_notify, callback, name);
+ if (!vq) {
+ err = -ENOMEM;
+ goto unmap;
+ }
+
+ /*
+ * Tell the interrupt for this virtqueue to go to the virtio_ring
+ * interrupt handler.
+ *
+ * FIXME: We used to have a flag for the Host to tell us we could use
+ * the interrupt as a source of randomness: it'd be nice to have that
+ * back.
+ */
+ err = request_irq(lvq->config.irq, vring_interrupt, IRQF_SHARED,
+ dev_name(&vdev->dev), vq);
+ if (err)
+ goto destroy_vring;
+
+ /*
+ * Last of all we hook up our 'struct lguest_vq_info" to the
+ * virtqueue's priv pointer.
+ */
+ vq->priv = lvq;
+ return vq;
+
+destroy_vring:
+ vring_del_virtqueue(vq);
+unmap:
+ virtio_unmap(lvq->pages);
+free_lvq:
+ kfree(lvq);
+ return ERR_PTR(err);
+}
+/*:*/
+
+/* Cleaning up a virtqueue is easy */
+static void lg_del_vq(struct virtqueue *vq)
+{
+ struct lguest_vq_info *lvq = vq->priv;
+
+ /* Release the interrupt */
+ free_irq(lvq->config.irq, vq);
+ /* Tell virtio_ring.c to free the virtqueue. */
+ vring_del_virtqueue(vq);
+ /* Unmap the pages containing the ring. */
+ virtio_unmap(lvq->pages);
+ /* Free our own queue information. */
+ kfree(lvq);
+}
+
+static void lg_del_vqs(struct virtio_device *vdev)
+{
+ struct virtqueue *vq, *n;
+
+ list_for_each_entry_safe(vq, n, &vdev->vqs, list)
+ lg_del_vq(vq);
+}
+
+static int lg_find_vqs(struct virtio_device *vdev, unsigned nvqs,
+ struct virtqueue *vqs[],
+ vq_callback_t *callbacks[],
+ const char *names[])
+{
+ struct lguest_device *ldev = to_lgdev(vdev);
+ int i;
+
+ /* We must have this many virtqueues. */
+ if (nvqs > ldev->desc->num_vq)
+ return -ENOENT;
+
+ for (i = 0; i < nvqs; ++i) {
+ vqs[i] = lg_find_vq(vdev, i, callbacks[i], names[i]);
+ if (IS_ERR(vqs[i]))
+ goto error;
+ }
+ return 0;
+
+error:
+ lg_del_vqs(vdev);
+ return PTR_ERR(vqs[i]);
+}
+
+/* The ops structure which hooks everything together. */
+static struct virtio_config_ops lguest_config_ops = {
+ .get_features = lg_get_features,
+ .finalize_features = lg_finalize_features,
+ .get = lg_get,
+ .set = lg_set,
+ .get_status = lg_get_status,
+ .set_status = lg_set_status,
+ .reset = lg_reset,
+ .find_vqs = lg_find_vqs,
+ .del_vqs = lg_del_vqs,
+};
+
+static int virtio_platform_probe(struct platform_device *pdev)
+{
+ struct virtio_platform_data *pdata = pdev->dev.platform_data;
+ struct resource *res;
+ void *devices;
+
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data defined\n");
+ return -EINVAL;
+ }
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (res == NULL) {
+ dev_err(&pdev->dev, "cannot find IO resource\n");
+ return -ENOENT;
+ }
+
+ /* Devices are pointed out using struct resource */
+ devices = virtio_map(res->start, resource_size(res) >> PAGE_SHIFT);
+ lg_scan_devices(devices, &pdev->dev, &lguest_config_ops);
+ return 0;
+}
+
+static int virtio_platform_remove(struct platform_device *pdev)
+{
+ return -ENOTSUPP;
+}
+
+static struct platform_driver virtio_platform_driver = {
+ .driver = {
+ .name = "virtio-platform",
+ .owner = THIS_MODULE,
+ },
+ .probe = virtio_platform_probe,
+ .remove = virtio_platform_remove,
+};
+
+static int __init virtio_platform_init(void)
+{
+ return platform_driver_register(&virtio_platform_driver);
+}
+
+static void __exit virtio_platform_exit(void)
+{
+ platform_driver_unregister(&virtio_platform_driver);
+}
+
+module_init(virtio_platform_init);
+module_exit(virtio_platform_exit);
+
+MODULE_DESCRIPTION("VirtIO Platform Driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:virtio-platform");
--- /dev/null
+++ work/include/linux/virtio_platform.h 2011-03-03 15:56:54.000000000 +0900
@@ -0,0 +1,12 @@
+#ifndef _LINUX_VIRTIO_PLATFORM_H
+#define _LINUX_VIRTIO_PLATFORM_H
+#include <linux/platform_device.h>
+#include <linux/lguest_launcher.h>
+
+struct virtio_platform_data {
+ void (*notify_virtio)(struct platform_device *pdev);
+ void (*notify_virtqueue)(struct platform_device *pdev,
+ struct lguest_vqconfig *config);
+};
+
+#endif /* _LINUX_VIRTIO_PLATFORM_H */
^ permalink raw reply
* [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c
From: Magnus Damm @ 2011-03-10 7:05 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-sh, Magnus Damm, mst, virtualization
In-Reply-To: <20110310070541.27327.52089.sendpatchset@t400s>
From: Magnus Damm <damm@opensource.se>
This patch breaks out code from lguest_device.c to the new file
virtio_lguest.c. The new file is built when CONFIG_VIRTIO_LGUEST
is selected. The x86 architecture is updated to select this kconfig
variable in the case of lguest.
Needed by the virtio platform driver that shares configuration data
structures with lguest.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/x86/lguest/Kconfig | 1
drivers/lguest/lguest_device.c | 209 ----------------------------------------
drivers/virtio/Kconfig | 2
drivers/virtio/Makefile | 1
drivers/virtio/virtio_lguest.c | 205 +++++++++++++++++++++++++++++++++++++++
include/linux/lguest.h | 1
include/linux/lguest_device.h | 46 ++++++++
7 files changed, 258 insertions(+), 207 deletions(-)
--- 0001/arch/x86/lguest/Kconfig
+++ work/arch/x86/lguest/Kconfig 2011-03-03 10:16:11.000000000 +0900
@@ -4,6 +4,7 @@ config LGUEST_GUEST
depends on X86_32
select VIRTUALIZATION
select VIRTIO
+ select VIRTIO_LGUEST
select VIRTIO_RING
select VIRTIO_CONSOLE
help
--- 0001/drivers/lguest/lguest_device.c
+++ work/drivers/lguest/lguest_device.c 2011-03-03 10:16:11.000000000 +0900
@@ -14,6 +14,7 @@
#include <linux/virtio_config.h>
#include <linux/interrupt.h>
#include <linux/virtio_ring.h>
+#include <linux/lguest_device.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <asm/io.h>
@@ -37,137 +38,6 @@ static inline void lguest_unmap(void *ad
iounmap((__force void __iomem *)addr);
}
-/*D:100
- * Each lguest device is just a virtio device plus a pointer to its entry
- * in the lguest_devices page.
- */
-struct lguest_device {
- struct virtio_device vdev;
-
- /* The entry in the lguest_devices page for this device. */
- struct lguest_device_desc *desc;
-};
-
-/*
- * Since the virtio infrastructure hands us a pointer to the virtio_device all
- * the time, it helps to have a curt macro to get a pointer to the struct
- * lguest_device it's enclosed in.
- */
-#define to_lgdev(vd) container_of(vd, struct lguest_device, vdev)
-
-/*D:130
- * Device configurations
- *
- * The configuration information for a device consists of one or more
- * virtqueues, a feature bitmap, and some configuration bytes. The
- * configuration bytes don't really matter to us: the Launcher sets them up, and
- * the driver will look at them during setup.
- *
- * A convenient routine to return the device's virtqueue config array:
- * immediately after the descriptor.
- */
-static struct lguest_vqconfig *lg_vq(const struct lguest_device_desc *desc)
-{
- return (void *)(desc + 1);
-}
-
-/* The features come immediately after the virtqueues. */
-static u8 *lg_features(const struct lguest_device_desc *desc)
-{
- return (void *)(lg_vq(desc) + desc->num_vq);
-}
-
-/* The config space comes after the two feature bitmasks. */
-static u8 *lg_config(const struct lguest_device_desc *desc)
-{
- return lg_features(desc) + desc->feature_len * 2;
-}
-
-/* The total size of the config page used by this device (incl. desc) */
-static unsigned desc_size(const struct lguest_device_desc *desc)
-{
- return sizeof(*desc)
- + desc->num_vq * sizeof(struct lguest_vqconfig)
- + desc->feature_len * 2
- + desc->config_len;
-}
-
-/* This gets the device's feature bits. */
-static u32 lg_get_features(struct virtio_device *vdev)
-{
- unsigned int i;
- u32 features = 0;
- struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
- u8 *in_features = lg_features(desc);
-
- /* We do this the slow but generic way. */
- for (i = 0; i < min(desc->feature_len * 8, 32); i++)
- if (in_features[i / 8] & (1 << (i % 8)))
- features |= (1 << i);
-
- return features;
-}
-
-/*
- * The virtio core takes the features the Host offers, and copies the ones
- * supported by the driver into the vdev->features array. Once that's all
- * sorted out, this routine is called so we can tell the Host which features we
- * understand and accept.
- */
-static void lg_finalize_features(struct virtio_device *vdev)
-{
- unsigned int i, bits;
- struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
- /* Second half of bitmap is features we accept. */
- u8 *out_features = lg_features(desc) + desc->feature_len;
-
- /* Give virtio_ring a chance to accept features. */
- vring_transport_features(vdev);
-
- /*
- * The vdev->feature array is a Linux bitmask: this isn't the same as a
- * the simple array of bits used by lguest devices for features. So we
- * do this slow, manual conversion which is completely general.
- */
- memset(out_features, 0, desc->feature_len);
- bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
- for (i = 0; i < bits; i++) {
- if (test_bit(i, vdev->features))
- out_features[i / 8] |= (1 << (i % 8));
- }
-}
-
-/* Once they've found a field, getting a copy of it is easy. */
-static void lg_get(struct virtio_device *vdev, unsigned int offset,
- void *buf, unsigned len)
-{
- struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
-
- /* Check they didn't ask for more than the length of the config! */
- BUG_ON(offset + len > desc->config_len);
- memcpy(buf, lg_config(desc) + offset, len);
-}
-
-/* Setting the contents is also trivial. */
-static void lg_set(struct virtio_device *vdev, unsigned int offset,
- const void *buf, unsigned len)
-{
- struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
-
- /* Check they didn't ask for more than the length of the config! */
- BUG_ON(offset + len > desc->config_len);
- memcpy(lg_config(desc) + offset, buf, len);
-}
-
-/*
- * The operations to get and set the status word just access the status field
- * of the device descriptor.
- */
-static u8 lg_get_status(struct virtio_device *vdev)
-{
- return to_lgdev(vdev)->desc->status;
-}
-
/*
* To notify on status updates, we (ab)use the NOTIFY hypercall, with the
* descriptor address of the device. A zero status means "reset".
@@ -392,81 +262,6 @@ static struct virtio_config_ops lguest_c
*/
static struct device *lguest_root;
-/*D:120
- * This is the core of the lguest bus: actually adding a new device.
- * It's a separate function because it's neater that way, and because an
- * earlier version of the code supported hotplug and unplug. They were removed
- * early on because they were never used.
- *
- * As Andrew Tridgell says, "Untested code is buggy code".
- *
- * It's worth reading this carefully: we start with a pointer to the new device
- * descriptor in the "lguest_devices" page, and the offset into the device
- * descriptor page so we can uniquely identify it if things go badly wrong.
- */
-static void add_lguest_device(struct lguest_device_desc *d,
- unsigned int offset)
-{
- struct lguest_device *ldev;
-
- /* Start with zeroed memory; Linux's device layer counts on it. */
- ldev = kzalloc(sizeof(*ldev), GFP_KERNEL);
- if (!ldev) {
- printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n",
- offset, d->type);
- return;
- }
-
- /* This devices' parent is the lguest/ dir. */
- ldev->vdev.dev.parent = lguest_root;
- /*
- * The device type comes straight from the descriptor. There's also a
- * device vendor field in the virtio_device struct, which we leave as
- * 0.
- */
- ldev->vdev.id.device = d->type;
- /*
- * We have a simple set of routines for querying the device's
- * configuration information and setting its status.
- */
- ldev->vdev.config = &lguest_config_ops;
- /* And we remember the device's descriptor for lguest_config_ops. */
- ldev->desc = d;
-
- /*
- * register_virtio_device() sets up the generic fields for the struct
- * virtio_device and calls device_register(). This makes the bus
- * infrastructure look for a matching driver.
- */
- if (register_virtio_device(&ldev->vdev) != 0) {
- printk(KERN_ERR "Failed to register lguest dev %u type %u\n",
- offset, d->type);
- kfree(ldev);
- }
-}
-
-/*D:110
- * scan_devices() simply iterates through the device page. The type 0 is
- * reserved to mean "end of devices".
- */
-static void scan_devices(void)
-{
- unsigned int i;
- struct lguest_device_desc *d;
-
- /* We start at the page beginning, and skip over each entry. */
- for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {
- d = lguest_devices + i;
-
- /* Once we hit a zero, stop. */
- if (d->type == 0)
- break;
-
- printk("Device at %i has size %u\n", i, desc_size(d));
- add_lguest_device(d, i);
- }
-}
-
/*D:105
* Fairly early in boot, lguest_devices_init() is called to set up the
* lguest device infrastructure. We check that we are a Guest by checking
@@ -493,7 +288,7 @@ static int __init lguest_devices_init(vo
/* Devices are in a single page above top of "normal" mem */
lguest_devices = lguest_map(max_pfn<<PAGE_SHIFT, 1);
- scan_devices();
+ lg_scan_devices(lguest_devices, lguest_root, &lguest_config_ops);
return 0;
}
/* We do this after core stuff, but before the drivers. */
--- 0001/drivers/virtio/Kconfig
+++ work/drivers/virtio/Kconfig 2011-03-03 10:16:11.000000000 +0900
@@ -33,3 +33,5 @@ config VIRTIO_BALLOON
If unsure, say M.
+config VIRTIO_LGUEST
+ tristate
--- 0001/drivers/virtio/Makefile
+++ work/drivers/virtio/Makefile 2011-03-03 10:16:11.000000000 +0900
@@ -2,3 +2,4 @@ obj-$(CONFIG_VIRTIO) += virtio.o
obj-$(CONFIG_VIRTIO_RING) += virtio_ring.o
obj-$(CONFIG_VIRTIO_PCI) += virtio_pci.o
obj-$(CONFIG_VIRTIO_BALLOON) += virtio_balloon.o
+obj-$(CONFIG_VIRTIO_LGUEST) += virtio_lguest.o
--- /dev/null
+++ work/drivers/virtio/virtio_lguest.c 2011-03-03 10:16:12.000000000 +0900
@@ -0,0 +1,205 @@
+/*P:050
+ * Lguest guests use a very simple method to describe devices. It's a
+ * series of device descriptors contained just above the top of normal Guest
+ * memory.
+ *
+ * We use the standard "virtio" device infrastructure, which provides us with a
+ * console, a network and a block driver. Each one expects some configuration
+ * information and a "virtqueue" or two to send and receive data.
+:*/
+#include <linux/init.h>
+#include <linux/bootmem.h>
+#include <linux/lguest_launcher.h>
+#include <linux/virtio.h>
+#include <linux/virtio_config.h>
+#include <linux/interrupt.h>
+#include <linux/virtio_ring.h>
+#include <linux/lguest_device.h>
+#include <linux/err.h>
+#include <linux/slab.h>
+#include <asm/io.h>
+
+/*D:130
+ * Device configurations
+ *
+ * The configuration information for a device consists of one or more
+ * virtqueues, a feature bitmap, and some configuration bytes. The
+ * configuration bytes don't really matter to us: the Launcher sets them up, and
+ * the driver will look at them during setup.
+ */
+
+/* The features come immediately after the virtqueues. */
+static u8 *lg_features(const struct lguest_device_desc *desc)
+{
+ return (void *)(lg_vq(desc) + desc->num_vq);
+}
+
+/* The config space comes after the two feature bitmasks. */
+static u8 *lg_config(const struct lguest_device_desc *desc)
+{
+ return lg_features(desc) + desc->feature_len * 2;
+}
+
+/* The total size of the config page used by this device (incl. desc) */
+static unsigned desc_size(const struct lguest_device_desc *desc)
+{
+ return sizeof(*desc)
+ + desc->num_vq * sizeof(struct lguest_vqconfig)
+ + desc->feature_len * 2
+ + desc->config_len;
+}
+
+/* This gets the device's feature bits. */
+u32 lg_get_features(struct virtio_device *vdev)
+{
+ unsigned int i;
+ u32 features = 0;
+ struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
+ u8 *in_features = lg_features(desc);
+
+ /* We do this the slow but generic way. */
+ for (i = 0; i < min(desc->feature_len * 8, 32); i++)
+ if (in_features[i / 8] & (1 << (i % 8)))
+ features |= (1 << i);
+
+ return features;
+}
+
+/*
+ * The virtio core takes the features the Host offers, and copies the ones
+ * supported by the driver into the vdev->features array. Once that's all
+ * sorted out, this routine is called so we can tell the Host which features we
+ * understand and accept.
+ */
+void lg_finalize_features(struct virtio_device *vdev)
+{
+ unsigned int i, bits;
+ struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
+ /* Second half of bitmap is features we accept. */
+ u8 *out_features = lg_features(desc) + desc->feature_len;
+
+ /* Give virtio_ring a chance to accept features. */
+ vring_transport_features(vdev);
+
+ /*
+ * The vdev->feature array is a Linux bitmask: this isn't the same as a
+ * the simple array of bits used by lguest devices for features. So we
+ * do this slow, manual conversion which is completely general.
+ */
+ memset(out_features, 0, desc->feature_len);
+ bits = min_t(unsigned, desc->feature_len, sizeof(vdev->features)) * 8;
+ for (i = 0; i < bits; i++) {
+ if (test_bit(i, vdev->features))
+ out_features[i / 8] |= (1 << (i % 8));
+ }
+}
+
+/* Once they've found a field, getting a copy of it is easy. */
+void lg_get(struct virtio_device *vdev, unsigned int offset,
+ void *buf, unsigned len)
+{
+ struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
+
+ /* Check they didn't ask for more than the length of the config! */
+ BUG_ON(offset + len > desc->config_len);
+ memcpy(buf, lg_config(desc) + offset, len);
+}
+
+/* Setting the contents is also trivial. */
+void lg_set(struct virtio_device *vdev, unsigned int offset,
+ const void *buf, unsigned len)
+{
+ struct lguest_device_desc *desc = to_lgdev(vdev)->desc;
+
+ /* Check they didn't ask for more than the length of the config! */
+ BUG_ON(offset + len > desc->config_len);
+ memcpy(lg_config(desc) + offset, buf, len);
+}
+
+/*
+ * The operations to get and set the status word just access the status field
+ * of the device descriptor.
+ */
+u8 lg_get_status(struct virtio_device *vdev)
+{
+ return to_lgdev(vdev)->desc->status;
+}
+
+/*D:120
+ * This is the core of the lguest bus: actually adding a new device.
+ * It's a separate function because it's neater that way, and because an
+ * earlier version of the code supported hotplug and unplug. They were removed
+ * early on because they were never used.
+ *
+ * As Andrew Tridgell says, "Untested code is buggy code".
+ *
+ * It's worth reading this carefully: we start with a pointer to the new device
+ * descriptor in the "lguest_devices" page, and the offset into the device
+ * descriptor page so we can uniquely identify it if things go badly wrong.
+ */
+static void add_lguest_device(struct lguest_device_desc *d,
+ unsigned int offset,
+ struct device *root,
+ struct virtio_config_ops *ops)
+{
+ struct lguest_device *ldev;
+
+ /* Start with zeroed memory; Linux's device layer counts on it. */
+ ldev = kzalloc(sizeof(*ldev), GFP_KERNEL);
+ if (!ldev) {
+ printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n",
+ offset, d->type);
+ return;
+ }
+
+ /* This devices' parent is the lguest/ dir. */
+ ldev->vdev.dev.parent = root;
+ /*
+ * The device type comes straight from the descriptor. There's also a
+ * device vendor field in the virtio_device struct, which we leave as
+ * 0.
+ */
+ ldev->vdev.id.device = d->type;
+ /*
+ * We have a simple set of routines for querying the device's
+ * configuration information and setting its status.
+ */
+ ldev->vdev.config = ops;
+ /* And we remember the device's descriptor. */
+ ldev->desc = d;
+
+ /*
+ * register_virtio_device() sets up the generic fields for the struct
+ * virtio_device and calls device_register(). This makes the bus
+ * infrastructure look for a matching driver.
+ */
+ if (register_virtio_device(&ldev->vdev) != 0) {
+ printk(KERN_ERR "Failed to register lguest dev %u type %u\n",
+ offset, d->type);
+ kfree(ldev);
+ }
+}
+
+/*D:110
+ * lg_scan_devices() simply iterates through the device page. The type 0 is
+ * reserved to mean "end of devices".
+ */
+void lg_scan_devices(void *lguest_devices,
+ struct device *root,
+ struct virtio_config_ops *ops)
+{
+ unsigned int i;
+ struct lguest_device_desc *d;
+
+ /* We start at the page beginning, and skip over each entry. */
+ for (i = 0; i < PAGE_SIZE; i += desc_size(d)) {
+ d = lguest_devices + i;
+
+ /* Once we hit a zero, stop. */
+ if (d->type == 0)
+ break;
+
+ printk("Device at %i has size %u\n", i, desc_size(d));
+ add_lguest_device(d, i, root, ops);
+ }
+}
--- 0001/include/linux/lguest.h
+++ work/include/linux/lguest.h 2011-03-03 10:16:11.000000000 +0900
@@ -71,5 +71,6 @@ struct lguest_data {
unsigned int syscall_vec;
};
extern struct lguest_data lguest_data;
+
#endif /* __ASSEMBLY__ */
#endif /* _LINUX_LGUEST_H */
--- /dev/null
+++ work/include/linux/lguest_device.h 2011-03-03 16:07:51.000000000 +0900
@@ -0,0 +1,46 @@
+#ifndef _LINUX_LGUEST_DEVICE_H
+#define _LINUX_LGUEST_DEVICE_H
+
+#include <linux/virtio.h>
+#include <linux/lguest_launcher.h>
+
+/*D:100
+ * Each lguest device is just a virtio device plus a pointer to its entry
+ * in the lguest_devices page.
+ */
+struct lguest_device {
+ struct virtio_device vdev;
+
+ /* The entry in the lguest_devices page for this device. */
+ struct lguest_device_desc *desc;
+};
+
+u32 lg_get_features(struct virtio_device *vdev);
+void lg_finalize_features(struct virtio_device *vdev);
+void lg_get(struct virtio_device *vdev, unsigned int offset,
+ void *buf, unsigned len);
+void lg_set(struct virtio_device *vdev, unsigned int offset,
+ const void *buf, unsigned len);
+u8 lg_get_status(struct virtio_device *vdev);
+void lg_scan_devices(void *lguest_devices,
+ struct device *root,
+ struct virtio_config_ops *ops);
+
+/*
+ * A convenient routine to return the device's virtqueue config array:
+ * immediately after the descriptor.
+ */
+static inline struct lguest_vqconfig *
+lg_vq(const struct lguest_device_desc *desc)
+{
+ return (void *)(desc + 1);
+}
+
+/*
+ * Since the virtio infrastructure hands us a pointer to the virtio_device all
+ * the time, it helps to have a curt macro to get a pointer to the struct
+ * lguest_device it's enclosed in.
+ */
+#define to_lgdev(vd) container_of(vd, struct lguest_device, vdev)
+
+#endif /* _LINUX_LGUEST_DEVICE_H */
^ permalink raw reply
* [PATCH 00/02] virtio: Virtio platform driver
From: Magnus Damm @ 2011-03-10 7:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Magnus Damm, mst, virtualization, linux-sh
virtio: Virtio platform driver
[PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c
[PATCH 02/02] virtio: Add virtio platform driver
These patches add a virtio platform driver to the Linux kernel. This
platform driver has the same role as the virtio_pci driver, but instead
of building on top of emulated PCI this driver is making use of the
platform bus together with driver specific callbacks.
The virtio platform driver can be seen as a reusable implementation of
the lguest virtio driver - in fact, most code is just taken directly
from lguest_device.c and reworked to fit the platform device driver
abstraction. The first patch breaks out code that can be shared between
lguest and the virtio platform driver.
This code has been used to implement a mailbox interface between the
two processor cores included in the sh7372 SoC. The sh7372 contains
one ARM Cortex-A8 and one SH4AL-DSP core, and in the prototype two
Linux kernels are running in parallel on the same chip. Virtio serves
as a communication link between the two cores.
Tested on the SH architecture, but should work on any architecture.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/x86/lguest/Kconfig | 1
drivers/lguest/lguest_device.c | 209 ----------------------------
drivers/virtio/Kconfig | 13 +
drivers/virtio/Makefile | 2
drivers/virtio/virtio_lguest.c | 205 ++++++++++++++++++++++++++++
drivers/virtio/virtio_platform.c | 282 +++++++++++++++++++++++++++++++++++++++
include/linux/lguest.h | 1
include/linux/lguest_device.h | 46 ++++++
include/linux/virtio_platform.h | 12 +
9 files changed, 564 insertions(+), 207 deletions(-)
^ permalink raw reply
* Re: Bug inkvm_set_irq
From: Michael S. Tsirkin @ 2011-03-09 13:59 UTC (permalink / raw)
To: Jean-Philippe Menil; +Cc: netdev, kvm, virtualization
In-Reply-To: <4D777CDA.3050500@univ-nantes.fr>
On Wed, Mar 09, 2011 at 02:12:58PM +0100, Jean-Philippe Menil wrote:
> Le 09/03/2011 14:00, Michael S. Tsirkin a écrit :
> >On Wed, Mar 09, 2011 at 01:28:43PM +0100, Jean-Philippe Menil wrote:
> >>Le 08/03/2011 12:13, Michael S. Tsirkin a écrit :
> >>>On Fri, Mar 04, 2011 at 10:39:05AM +0100, Jean-Philippe Menil wrote:
> >>>>Yes, it's a 2.6.37.2 kernel.
> >>>OK, here's a debugging patch.
> >>>Please run with slab debugging as previously until you see
> >>>'eventfd bug detected!' in dmesg or until there is a crash.
> >>>It might be also useful to enable timestampts on printk with
> >>> Symbol: PRINTK_TIME [=y]
> >>> │ Type : boolean
> >>> │ Prompt: Show timing information on printks
> >>>
> >>>once you see the error, please upload the
> >>>full dmesg output somewhere to we can track what
> >>>goes on.
> >>>
> >>>Hopefully there won't be an oops this time which
> >>>should make it easier for you to test (no need to
> >>>reboot).
> >>>
> >>>
> >>>diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> >>>index c1f1e3c..3cb679b 100644
> >>>--- a/virt/kvm/eventfd.c
> >>>+++ b/virt/kvm/eventfd.c
> >>>@@ -32,6 +32,7 @@
> >>> #include<linux/eventfd.h>
> >>> #include<linux/kernel.h>
> >>> #include<linux/slab.h>
> >>>+#include<linux/nmi.h>
> >>>
> >>> #include "iodev.h"
> >>>
> >>>@@ -43,6 +44,8 @@
> >>> * --------------------------------------------------------------------
> >>> */
> >>>
> >>>+#define KVM_BAD_PTR ((void*)(long)(0x6b6b6b6b6b6b6b6bull))
> >>>+
> >>> struct _irqfd {
> >>> struct kvm *kvm;
> >>> struct eventfd_ctx *eventfd;
> >>>@@ -61,6 +64,13 @@ irqfd_inject(struct work_struct *work)
> >>> {
> >>> struct _irqfd *irqfd = container_of(work, struct _irqfd, inject);
> >>> struct kvm *kvm = irqfd->kvm;
> >>>+ if (kvm == KVM_BAD_PTR) {
> >>>+ printk(KERN_ERR "Eventfd bug detected!\n");
> >>>+ printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d)\n", __func__,
> >>>+ work, irqfd, kvm, irqfd->gsi);
> >>>+ trigger_all_cpu_backtrace();
> >>>+ return;
> >>>+ }
> >>>
> >>> kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 1);
> >>> kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 0);
> >>>@@ -75,6 +85,8 @@ irqfd_shutdown(struct work_struct *work)
> >>> struct _irqfd *irqfd = container_of(work, struct _irqfd, shutdown);
> >>> u64 cnt;
> >>>
> >>>+ printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
> >>>+ work, irqfd, irqfd->kvm, irqfd->gsi);
> >>> /*
> >>> * Synchronize with the wait-queue and unhook ourselves to prevent
> >>> * further events.
> >>>@@ -91,6 +103,8 @@ irqfd_shutdown(struct work_struct *work)
> >>> * It is now safe to release the object's resources
> >>> */
> >>> eventfd_ctx_put(irqfd->eventfd);
> >>>+ printk(KERN_ERR "kfree at %s(work=%p,irqfd=%p)\n", __func__,
> >>>+ work, irqfd);
> >>> kfree(irqfd);
> >>> }
> >>>
> >>>@@ -111,6 +125,8 @@ static void
> >>> irqfd_deactivate(struct _irqfd *irqfd)
> >>> {
> >>> BUG_ON(!irqfd_is_active(irqfd));
> >>>+ printk(KERN_ERR "%s(irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
> >>>+ irqfd, irqfd->kvm, irqfd->gsi);
> >>>
> >>> list_del_init(&irqfd->list);
> >>>
> >>>@@ -178,6 +194,8 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
> >>>
> >>> irqfd->kvm = kvm;
> >>> irqfd->gsi = gsi;
> >>>+ printk(KERN_ERR "%s(irqfd=%p,kvm=%p, gsi=%d)\n", __func__,
> >>>+ irqfd, kvm, gsi);
> >>> INIT_LIST_HEAD(&irqfd->list);
> >>> INIT_WORK(&irqfd->inject, irqfd_inject);
> >>> INIT_WORK(&irqfd->shutdown, irqfd_shutdown);
> >>>@@ -264,6 +282,8 @@ kvm_irqfd_deassign(struct kvm *kvm, int fd, int gsi)
> >>> struct _irqfd *irqfd, *tmp;
> >>> struct eventfd_ctx *eventfd;
> >>>
> >>>+ printk(KERN_ERR "%s(kvm=%p, gsi=%d)\n", __func__,
> >>>+ kvm, gsi);
> >>> eventfd = eventfd_ctx_fdget(fd);
> >>> if (IS_ERR(eventfd))
> >>> return PTR_ERR(eventfd);
> >>>@@ -305,6 +325,7 @@ void
> >>> kvm_irqfd_release(struct kvm *kvm)
> >>> {
> >>> struct _irqfd *irqfd, *tmp;
> >>>+ printk(KERN_ERR "%s(kvm=%p)\n", __func__, kvm);
> >>>
> >>> spin_lock_irq(&kvm->irqfds.lock);
> >>>
> >>>--
> >>>To unsubscribe from this list: send the line "unsubscribe netdev" in
> >>>the body of a message to majordomo@vger.kernel.org
> >>>More majordomo info at http://vger.kernel.org/majordomo-info.html
> >>Hi,
> >>
> >>I boot the host with the patched kernel yesterday.
> >>No crach until now, but two "Eventfd bug detected!" in the log at
> >>"Mar 9 02:04:31" and "Mar 9 02:15:17"
> >>You can find part of the log at the following adress:
> >>http://filex.univ-nantes.fr/get?k=jL4Fe7yfSMN57toAH7V
> >>
> >>It a split file of the kern.log (1,4G), so if you need another part
> >>of the log, let me know.
> >>
> >>Thanks for all.
> >>
> >>Regards.
> >Downloading, it's big :)
> >What about some 1000 lines before and after Eventfd bug detected! line?
> >--
> >To unsubscribe from this list: send the line "unsubscribe kvm" in
> >the body of a message to majordomo@vger.kernel.org
> >More majordomo info at http://vger.kernel.org/majordomo-info.html
> Yes, sorry about that.
> I could have split my log into a smaller file.
>
> I was a little afraid of not transmit enough informations, and i was
> a bit wide.
> I hope you can find usefull trace anyway.
>
> Regards.
OK, use after free.
Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.593681]
kvm_irqfd_assign(irqfd=ffff88045e8d6230,kvm=ffff88085151c000, gsi=26)
Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605359]
kvm_irqfd_deassign(kvm=ffff88085151c000, gsi=26)
Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605388]
irqfd_deactivate(irqfd=ffff88045e8d6230,kvm=ffff88085151c000, gsi=26)
Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605461]
irqfd_shutdown(work=ffff88045e8d62b0,irqfd=ffff88045e8d6230,kvm=ffff88085151c000,
gsi=26)
Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605509]
kfree at irqfd_shutdown(work=ffff88045e8d62b0,irqfd=ffff88045e8d6230)
Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605588]
Eventfd bug detected!
Mar 9 02:15:17 ayrshire.u06.univ-nantes.prive kernel: [37461.605612]
irqfd_inject(work=ffff88045e8d6290,irqfd=ffff88045e8d6230,kvm=6b6b6b6b6b6b6b6b,gsi=1802201963)
and 1802201963 is also 6b6b6b6b.
I suspect that somehow, we get an event from eventfd even
though we did eventfd_ctx_remove_wait_queue.
Could you please try the following patch on top?
When you see Eventfd bug or Wakeup bug, paste some
last lines.
For the full log file - better compress with xz.
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 3cb679b..63aeba5 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -92,6 +92,8 @@ irqfd_shutdown(struct work_struct *work)
* further events.
*/
eventfd_ctx_remove_wait_queue(irqfd->eventfd, &irqfd->wait, &cnt);
+ printk(KERN_ERR "remove wq at %s(work=%p,irqfd=%p)\n", __func__,
+ work, irqfd);
/*
* We know no new events will be scheduled at this point, so block
@@ -142,6 +144,13 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait);
unsigned long flags = (unsigned long)key;
+ if (irqfd->kvm == KVM_BAD_PTR) {
+ printk(KERN_ERR "Wakeup bug detected! flags 0x%lx\n", flags);
+ printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d)\n", __func__,
+ &irqfd->inject, irqfd, irqfd->kvm, irqfd->gsi);
+ trigger_all_cpu_backtrace();
+ return 0;
+ }
if (flags & POLLIN)
/* An event has been signaled, inject an interrupt */
schedule_work(&irqfd->inject);
@@ -153,6 +162,9 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
spin_lock_irqsave(&kvm->irqfds.lock, flags);
+ printk(KERN_ERR "%s(work=%p,irqfd=%p,kvm=%p,gsi=%d,active=%d)\n", __func__,
+ &irqfd->inject, irqfd, irqfd->kvm, irqfd->gsi,
+ irqfd_is_active(irqfd));
/*
* We must check if someone deactivated the irqfd before
* we could acquire the irqfds.lock since the item is
--
MST
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox