public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] virtio-balloon: make it spec compliant
@ 2024-07-05 10:08 Michael S. Tsirkin
  2024-07-05 10:08 ` [PATCH 1/2] virtio_balloon: add work around for out of spec QEMU Michael S. Tsirkin
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Michael S. Tsirkin @ 2024-07-05 10:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Duyck, Xuan Zhuo, Andrew Morton, David Hildenbrand

Currently, if VIRTIO_BALLOON_F_FREE_PAGE_HINT is off but
VIRTIO_BALLOON_F_REPORTING is on, then the reporting vq
gets number 3 while spec says it's number 4.
It happens to work because the qemu virtio pci driver
is *also* out of spec.

To fix:
1. add vq4 as per spec
2. to help out the buggy qemu driver, if finding vqs fail,
try with vq3 as reporting.

Fixes: b0c504f15471 ("virtio-balloon: add support for providing free page reports to host")
Cc: "Alexander Duyck" <alexander.h.duyck@linux.intel.com>
Reported-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Michael S. Tsirkin (2):
  virtio_balloon: add work around for out of spec QEMU
  virtio: fix vq # for balloon

 arch/um/drivers/virtio_uml.c           |  4 ++--
 drivers/remoteproc/remoteproc_virtio.c |  4 ++--
 drivers/s390/virtio/virtio_ccw.c       |  4 ++--
 drivers/virtio/virtio_balloon.c        | 19 +++++++++++++++++--
 drivers/virtio/virtio_mmio.c           |  4 ++--
 drivers/virtio/virtio_pci_common.c     |  8 ++++----
 drivers/virtio/virtio_vdpa.c           |  4 ++--
 7 files changed, 31 insertions(+), 16 deletions(-)

-- 
MST


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

end of thread, other threads:[~2024-07-10 11:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-05 10:08 [PATCH 0/2] virtio-balloon: make it spec compliant Michael S. Tsirkin
2024-07-05 10:08 ` [PATCH 1/2] virtio_balloon: add work around for out of spec QEMU Michael S. Tsirkin
2024-07-10  3:11   ` David Hildenbrand
2024-07-10  3:23   ` Jason Wang
2024-07-10  6:16     ` Michael S. Tsirkin
2024-07-10  7:37       ` Jason Wang
2024-07-10 11:36         ` Michael S. Tsirkin
2024-07-05 10:09 ` [PATCH 2/2] virtio: fix vq # when vq skipped Michael S. Tsirkin
2024-07-10  3:11   ` David Hildenbrand
2024-07-10  3:25   ` Jason Wang
2024-07-05 10:15 ` [PATCH 0/2] virtio-balloon: make it spec compliant David Hildenbrand
2024-07-05 10:19   ` Michael S. Tsirkin
2024-07-05 11:00     ` David Hildenbrand
2024-07-05 11:38       ` Michael S. Tsirkin
2024-07-10  3:09         ` David Hildenbrand

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