From: Mihai Carabas <mihai.carabas@oracle.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, arnd@arndb.de,
bobo.shaobowang@huawei.com, rdunlap@infradead.org,
Mihai Carabas <mihai.carabas@oracle.com>
Subject: [PATCH v5] add support for pci in the pvpanic driver
Date: Tue, 16 Mar 2021 14:20:26 +0200 [thread overview]
Message-ID: <1615897229-4055-1-git-send-email-mihai.carabas@oracle.com> (raw)
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.
v3:
- drop patch 3 with licenses and add them when creating files
- create a new patch (2/3) which allowes multiple pvpanic instances
v4:
- fix Makefile in patch 1/3 and 3/3 for pvpanic.o as suggested by Arnd
v5:
- rebase on 5.12
- fix a warning caused by one of the patches
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: probe multiple instances
misc/pvpanic: add PCI driver
drivers/misc/Kconfig | 9 +-
drivers/misc/Makefile | 2 +-
drivers/misc/pvpanic.c | 160 ------------------------------------
drivers/misc/pvpanic/Kconfig | 25 ++++++
drivers/misc/pvpanic/Makefile | 8 ++
drivers/misc/pvpanic/pvpanic-mmio.c | 129 +++++++++++++++++++++++++++++
drivers/misc/pvpanic/pvpanic-pci.c | 102 +++++++++++++++++++++++
drivers/misc/pvpanic/pvpanic.c | 144 ++++++++++++++++++++++++++++++++
drivers/misc/pvpanic/pvpanic.h | 21 +++++
9 files changed, 431 insertions(+), 169 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/pvpanic-mmio.c
create mode 100644 drivers/misc/pvpanic/pvpanic-pci.c
create mode 100644 drivers/misc/pvpanic/pvpanic.c
create mode 100644 drivers/misc/pvpanic/pvpanic.h
--
1.8.3.1
next reply other threads:[~2021-03-16 13:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 12:20 Mihai Carabas [this message]
2021-03-16 12:20 ` [PATCH v5 1/3] misc/pvpanic: split-up generic and platform dependent code Mihai Carabas
2021-03-16 16:44 ` Greg KH
2021-03-16 12:20 ` [PATCH v5 2/3] misc/pvpanic: probe multiple instances Mihai Carabas
2021-03-16 16:46 ` Greg KH
2021-03-16 12:20 ` [PATCH v5 3/3] misc/pvpanic: add PCI driver Mihai Carabas
2021-03-16 16:48 ` Greg KH
2021-03-16 17:08 ` Mihai Carabas
2021-03-16 17:29 ` Greg KH
2021-03-16 18:02 ` Mihai Carabas
2021-03-16 18:16 ` Greg KH
2021-03-17 0:02 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1615897229-4055-1-git-send-email-mihai.carabas@oracle.com \
--to=mihai.carabas@oracle.com \
--cc=arnd@arndb.de \
--cc=bobo.shaobowang@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).