summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorAbhin Parekadan Jose <abhinjoses@gmail.com>2026-08-02 17:40:58 +0000
committerMichael S. Tsirkin <mst@redhat.com>2026-09-04 17:06:03 -0400
commitb138982c3bb93a7299b7287a399a8c33bdc3f5f5 (patch)
treeda69e8fd383b1402158fe1ba9615767ca57089a2 /scripts/Makefile.thinlto
parent425bb65a8e17557a1130a969ca37f1128a9d81b3 (diff)
downloadlinux-next-b138982c3bb93a7299b7287a399a8c33bdc3f5f5.tar.gz
linux-next-b138982c3bb93a7299b7287a399a8c33bdc3f5f5.zip
virtio_pci_modern_dev: warn once on invalid status
vp_modern_get_status() returns the raw device_status byte as read from the common configuration structure (struct virtio_pci_common_cfg, mapped via the VIRTIO_PCI_CAP_COMMON_CFG capability). That byte should only ever contain some combination of the status bits defined by the virtio spec (bits 0-3, 6-7); bits 4 and 5 are reserved and a spec-compliant device must never set them. A value with any other bit set means either the device is violating the spec, or the read never reached real device state at all -- e.g. because a write of 0x0000 to the PCI_COMMAND register (config space offset 4) clears the Memory Space Enable bit, causing the device to stop responding to memory-mapped register accesses -- effectively simulating an unresponsive/removed device without a real hot-unplug. In that case the MMIO read returns the bus's synthesized all-ones response instead of real device state. Add VIRTIO_STATUS_ERROR() to the uapi header to recognize such values, and warn once from vp_modern_get_status() when it sees one, so the bogus status is visible at its source rather than only showing up as confusing behavior in callers. Signed-off-by: Abhin Parekadan Jose <abhinjoses@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260802174059.4082-2-abhinjoses@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions