* [PATCH v2] misc/pvpanic-pci: Allow automatic loading
@ 2021-06-29 7:22 Eric Auger
2021-07-08 11:58 ` Eric Auger
0 siblings, 1 reply; 2+ messages in thread
From: Eric Auger @ 2021-06-29 7:22 UTC (permalink / raw)
To: eric.auger.pro, eric.auger, linux-kernel, mihai.carabas, gregkh,
andriy.shevchenko
Cc: arnd, pizhenwei, pbonzini, joe, drjones
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.
Instead of requiring manual modprobe, let's include a device
database using the MODULE_DEVICE_TABLE macro and let the
module auto-load when the guest gets exposed with such a
pvpanic-pci device.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
v1 -> v2:
- enhance the commit message with additional info (Greg, Andy)
---
drivers/misc/pvpanic/pvpanic-pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/misc/pvpanic/pvpanic-pci.c b/drivers/misc/pvpanic/pvpanic-pci.c
index 9ecc4e8559d5d..30290d42d8aa8 100644
--- a/drivers/misc/pvpanic/pvpanic-pci.c
+++ b/drivers/misc/pvpanic/pvpanic-pci.c
@@ -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);
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] misc/pvpanic-pci: Allow automatic loading
2021-06-29 7:22 [PATCH v2] misc/pvpanic-pci: Allow automatic loading Eric Auger
@ 2021-07-08 11:58 ` Eric Auger
0 siblings, 0 replies; 2+ messages in thread
From: Eric Auger @ 2021-07-08 11:58 UTC (permalink / raw)
To: eric.auger.pro, linux-kernel, mihai.carabas, gregkh, andriy.shevchenko
Cc: arnd, pizhenwei, pbonzini, joe, drjones
Hi Greg,
On 6/29/21 9:22 AM, Eric Auger wrote:
> 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.
>
> Instead of requiring manual modprobe, let's include a device
> database using the MODULE_DEVICE_TABLE macro and let the
> module auto-load when the guest gets exposed with such a
> pvpanic-pci device.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
Maybe I misunderstood your question on the v1. This patch does not
result from an issue found by a tool/script but was identified while
exercising the pvpanic-pci use case "manually".
Thanks
Eric
>
> ---
>
> v1 -> v2:
> - enhance the commit message with additional info (Greg, Andy)
> ---
> drivers/misc/pvpanic/pvpanic-pci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/misc/pvpanic/pvpanic-pci.c b/drivers/misc/pvpanic/pvpanic-pci.c
> index 9ecc4e8559d5d..30290d42d8aa8 100644
> --- a/drivers/misc/pvpanic/pvpanic-pci.c
> +++ b/drivers/misc/pvpanic/pvpanic-pci.c
> @@ -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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-08 11:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 7:22 [PATCH v2] misc/pvpanic-pci: Allow automatic loading Eric Auger
2021-07-08 11:58 ` Eric Auger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).