From: Xixin Liu <liuxixin@kylinos.cn>
To: linux-block@vger.kernel.org
Cc: virtualization@lists.linux.dev, mst@redhat.com,
jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
eperezma@redhat.com, pbonzini@redhat.com, stefanha@redhat.com,
axboe@kernel.dk, linux-kernel@vger.kernel.org,
liuxixin@kylinos.cn
Subject: [PATCH v3 0/2] virtio: PCI AER error_detected and virtio-blk shutdown
Date: Thu, 6 Aug 2026 09:20:00 +0800 [thread overview]
Message-ID: <cover.virtio-blk-ers-v3.1785920716.git.liuxixin@kylinos.cn> (raw)
In-Reply-To: <cover.virtio-blk-ers-v2.1785468000.git.liuxixin@kylinos.cn>
Hi,
This series fills in missing PCI AER callbacks on virtio-pci, and adds
matching virtio-blk pieces for queue_rq after VQ removal plus
system-shutdown teardown.
virtio-pci only registered reset_prepare/reset_done. Without
.error_detected the recovery core votes NO_AER_DRIVER on the first
broadcast, and report_perm_failure_detected skips the driver callback
whenever overall status is not RECOVERED. Patch 1 registers
.error_detected and .slot_reset: frozen/unknown call
virtio_device_reset_prepare() then NEED_RESET; after a successful PCI
reset, slot_reset restores config and calls virtio_device_reset_done();
perm_failure only virtio_break_device() and DISCONNECT. AER bus reset
via pci_bus_error_reset does not invoke .reset_prepare, so quiesce and
restore for that path live in error_detected and slot_reset. The
existing .reset_prepare and .reset_done still serve FLR.
Patch 2 fails new requests early in virtio_queue_rq when vqs were
removed during frozen reset_prepare. It also registers
virtio_driver.shutdown for reboot and poweroff via virtio_dev_shutdown,
with freeze-before-break reclaim and blk_mark_disk_dead().
Changes since v2, thanks to Michael for the review:
- perm_failure: only virtio_break_device()
- default and frozen share one quiesce then NEED_RESET path
- Add .slot_reset to restore after successful AER PCI reset
- Drop PCI common to drv->shutdown wiring; virtio-blk .shutdown for
system shutdown via virtio_dev_shutdown
Based on linux-next next-20260730.
Thanks,
Xixin Liu
---
Xixin Liu (2):
virtio-pci: add error_detected and slot_reset for AER
virtio-blk: add shutdown and fail queue_rq after VQ teardown
drivers/block/virtio_blk.c | 36 ++++++++++++++++++++++++++++++
drivers/virtio/virtio_pci_common.c | 53 +++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
--
2.43.0
next prev parent reply other threads:[~2026-08-07 6:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 2:00 [PATCH v1 0/2] virtio: PCI ERS permanent failure teardown for virtio-blk Xixin Liu
2026-06-10 6:20 ` [PATCH v1 1/2] virtio-pci: add error_detected for PCI AER recovery Xixin Liu
2026-06-12 10:00 ` [PATCH v1 2/2] virtio-blk: mark disk dead on ERS permanent failure Xixin Liu
2026-07-30 23:13 ` Michael S. Tsirkin
2026-07-31 3:29 ` Xixin Liu
2026-06-15 14:52 ` [PATCH v1 0/2] virtio: PCI ERS permanent failure teardown for virtio-blk Stefan Hajnoczi
2026-07-31 3:20 ` [PATCH v2 " Xixin Liu
2026-07-31 3:17 ` [PATCH v2 1/2] virtio-pci: add error_detected for PCI AER recovery Xixin Liu
2026-08-02 21:10 ` Michael S. Tsirkin
2026-08-07 6:15 ` Xixin Liu
2026-07-31 3:19 ` [PATCH v2 2/2] virtio-blk: mark disk dead on ERS permanent failure Xixin Liu
2026-08-02 20:59 ` Michael S. Tsirkin
2026-08-07 6:16 ` Xixin Liu
2026-08-06 1:20 ` Xixin Liu [this message]
2026-08-06 1:15 ` [PATCH v3 1/2] virtio-pci: add error_detected and slot_reset for AER Xixin Liu
2026-08-06 1:20 ` [PATCH v3 2/2] virtio-blk: add shutdown and fail queue_rq after VQ teardown Xixin Liu
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=cover.virtio-blk-ers-v3.1785920716.git.liuxixin@kylinos.cn \
--to=liuxixin@kylinos.cn \
--cc=axboe@kernel.dk \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/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