public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] add support for pci in the pvpanic driver
@ 2021-02-12  9:17 Mihai Carabas
  2021-02-12  9:17 ` [PATCH v2 1/3] misc/pvpanic: split-up generic and platform dependent code Mihai Carabas
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Mihai Carabas @ 2021-02-12  9:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: gregkh, arnd, rdunlap, bobo.shaobowang, Mihai Carabas

This patchset adds support for PCI in the pvpanic driver. The device already
got in qemu [1].

v2:
- mmio -> MMIO, pci -> PCI suggested by Randy Dunlap.
- group pvpanic-common.c and mmio.c in the same module. The intention was to
  have only one module and the common code splitted up to be re-used by the
  pvpanic-pci module in the next patch.
- add a new patch where add the licenses for the new files (when I moved the
  code to mmio.c I preserved the original licenses there)
- properly clean-up PCI device when driver removed.

How to test:

Run a VM with latest qemu which has the pvpanic-pci device:
qemu-system-aarch64  -device pvpanic-pci

Generate a panic in the guest:
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

Observe in the QMP console the panic events received by the device:

{"timestamp": {"seconds": 1613122186, "microseconds": 141729}, "event":
"GUEST_PANICKED", "data": {"action": "pause"}}

{"timestamp": {"seconds": 1613122186, "microseconds": 141833}, "event":
"GUEST_PANICKED", "data": {"action": "poweroff"}}

{"timestamp": {"seconds": 1613122186, "microseconds": 141896}, "event":
"SHUTDOWN", "data": {"guest": true, "reason": "guest-panic"}}


[1] https://github.com/qemu/qemu/commit/9df52f58e76e904fb141b10318362d718f470db2

Mihai Carabas (3):
  misc/pvpanic: split-up generic and platform dependent code
  misc/pvpanic: add PCI driver
  misc/pvpanic: add license

 drivers/misc/Kconfig                  |   9 +--
 drivers/misc/Makefile                 |   2 +-
 drivers/misc/pvpanic.c                | 111 ----------------------------------
 drivers/misc/pvpanic/Kconfig          |  27 +++++++++
 drivers/misc/pvpanic/Makefile         |  11 ++++
 drivers/misc/pvpanic/mmio.c           |  83 +++++++++++++++++++++++++
 drivers/misc/pvpanic/pci.c            |  56 +++++++++++++++++
 drivers/misc/pvpanic/pvpanic-common.c |  60 ++++++++++++++++++
 drivers/misc/pvpanic/pvpanic.h        |  17 ++++++
 9 files changed, 256 insertions(+), 120 deletions(-)
 delete mode 100644 drivers/misc/pvpanic.c
 create mode 100644 drivers/misc/pvpanic/Kconfig
 create mode 100644 drivers/misc/pvpanic/Makefile
 create mode 100644 drivers/misc/pvpanic/mmio.c
 create mode 100644 drivers/misc/pvpanic/pci.c
 create mode 100644 drivers/misc/pvpanic/pvpanic-common.c
 create mode 100644 drivers/misc/pvpanic/pvpanic.h

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-02-12 12:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-12  9:17 [PATCH v2] add support for pci in the pvpanic driver Mihai Carabas
2021-02-12  9:17 ` [PATCH v2 1/3] misc/pvpanic: split-up generic and platform dependent code Mihai Carabas
2021-02-12 10:12   ` Arnd Bergmann
2021-02-12 10:17   ` Greg KH
2021-02-12 10:29     ` Mihai Carabas
2021-02-12 11:00       ` Greg KH
2021-02-12 12:26   ` kernel test robot
2021-02-12  9:17 ` [PATCH v2 2/3] misc/pvpanic: add PCI driver Mihai Carabas
2021-02-12 10:15   ` Arnd Bergmann
2021-02-12 10:18   ` Greg KH
2021-02-12 10:23     ` Arnd Bergmann
2021-02-12  9:17 ` [PATCH v2 3/3] misc/pvpanic: add license Mihai Carabas
2021-02-12 10:13   ` Arnd Bergmann
2021-02-12 10:15   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox