Skip to contentSkip to conversation

misc/pvpanic-pci: Allow automatic loading

PATCH Superseded Eric Auger 3 participants 4 messages Jun 28, 2021 Char and misc drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Eric Auger

author
#0 lore raw

PATCH 1/1 misc/pvpanic-pci: Allow automatic loading

The pvpanic-pci driver does not auto-load and requires manual modprobe. Let's include a device database using the MODULE_DEVICE_TABLE macro.

---
 drivers/misc/pvpanic/pvpanic-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/misc/pvpanic/pvpanic-pci.c +2 -0
index 9ecc4e8559d5d..30290d42d8aa8 100644
@@ -122,4 +122,6 @@ static struct pci_driver pvpanic_pci_driver = {
 	},
 };
 
+MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl);
+
 module_pci_driver(pvpanic_pci_driver);
Signature · 1 line
2.26.3
maintainer
#1 lore raw
Quoted 14 lines · Eric Auger

The pvpanic-pci driver does not auto-load and requires manual modprobe. Let's include a device database using the MODULE_DEVICE_TABLE macro.

---
 drivers/misc/pvpanic/pvpanic-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/misc/pvpanic/pvpanic-pci.c +0 -0
index 9ecc4e8559d5d..30290d42d8aa8 100644

drivers/misc/pvpanic/pvpanic-pci.c static struct pci_driver pvpanic_pci_driver = { · line 126

Quoted 5 lines
drivers/misc/pvpanic/pvpanic-pci.c +2 -0
@@ -122,4 +122,6 @@ static struct pci_driver pvpanic_pci_driver = {
 	},
 };
 
+MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl);
+

Is this something that you need? Or is it created by a tool?

thanks,

greg k-h

author
#2 lore raw

Hi Greg,

Quoted 18 lines · Greg KH
Quoted 17 lines · Eric Auger

The pvpanic-pci driver does not auto-load and requires manual modprobe. Let's include a device database using the MODULE_DEVICE_TABLE macro.

---
 drivers/misc/pvpanic/pvpanic-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/misc/pvpanic/pvpanic-pci.c +0 -0
index 9ecc4e8559d5d..30290d42d8aa8 100644
@@ -122,4 +122,6 @@ static struct pci_driver pvpanic_pci_driver = {
 	},
 };
 
Quoted 3 lines

drivers/misc/pvpanic/pvpanic-pci.c static struct pci_driver pvpanic_pci_driver = { · line 126

Quoted 2 lines
drivers/misc/pvpanic/pvpanic-pci.c +2 -0
+MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl);
+

Is this something that you need? Or is it created by a tool?

the virtual machine monitor (QEMU) exposes the pvpanic-pci device to the guest. On guest side the module exists but currently isn't loaded automatically. So the driver fails to be probed and does not its job of handling guest panic events. We need a SW actor that loads the module and I thought this should be handled that way. If not, please could you advise?

Thank you in advance

Eric

Quoted 5 lines

thanks,

greg k-h

#3 lore raw
Quoted 5 lines · Eric Auger
Quoted 4 lines · Greg KH
Quoted 3 lines · Eric Auger

The pvpanic-pci driver does not auto-load and requires manual modprobe. Let's include a device database using the MODULE_DEVICE_TABLE macro.

...

Quoted 8 lines
Quoted 1 line

Is this something that you need? Or is it created by a tool?

the virtual machine monitor (QEMU) exposes the pvpanic-pci device to the guest. On guest side the module exists but currently isn't loaded automatically. So the driver fails to be probed and does not its job of handling guest panic events. We need a SW actor that loads the module and I thought this should be handled that way. If not, please could you advise?

At least something like about should have been in the commit message. Otherwise the selling point is unclear.

Signature · 2 lines
With Best Regards,
Andy Shevchenko