linux-stable/drivers/virtio
Xuan Zhuo 7efb5418f8 virtio_pci: fix the common cfg map size
commit 061b39fdfe upstream.

The function vp_modern_map_capability() takes the size parameter,
which corresponds to the size of virtio_pci_common_cfg. As a result,
this indicates the size of memory area to map.

Now the size is the size of virtio_pci_common_cfg, but some feature(such
as the _F_RING_RESET) needs the virtio_pci_modern_common_cfg, so this
commit changes the size to the size of virtio_pci_modern_common_cfg.

Cc: stable@vger.kernel.org
Fixes: 0b50cece0b ("virtio_pci: introduce helper to get/set queue reset")
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Message-Id: <20231010031120.81272-3-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-02 09:36:46 +01:00
..
Kconfig virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
Makefile virtio: replace restricted mem access flag with callback 2022-08-01 07:42:49 +02:00
virtio.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
virtio_anchor.c virtio: replace restricted mem access flag with callback 2022-08-01 07:42:49 +02:00
virtio_balloon.c virtio_balloon: Fix endless deflation and inflation on arm64 2023-11-02 09:36:45 +01:00
virtio_dma_buf.c dma-buf: move dma-buf symbols into the DMA_BUF module namespace 2021-10-25 14:53:08 +02:00
virtio_input.c virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
virtio_mem.c virtio-mem: check if the config changed before fake offlining memory 2023-08-10 15:51:46 -04:00
virtio_mmio.c virtio-mmio: fix memory leak of vm_dev 2023-11-02 09:36:46 +01:00
virtio_pci_common.c virtio-pci: Fix legacy device flag setting error in probe 2023-08-10 15:24:28 -04:00
virtio_pci_common.h virtio_pci: Optimize virtio_pci_device structure size 2023-06-27 10:47:08 -04:00
virtio_pci_legacy.c virtio-pci: Fix legacy device flag setting error in probe 2023-08-10 15:24:28 -04:00
virtio_pci_legacy_dev.c virtio/virtio_pci_legacy_dev: ensure the correct return value 2022-01-14 18:50:53 -05:00
virtio_pci_modern.c virtio: add VIRTIO_F_NOTIFICATION_DATA feature support 2023-04-21 03:02:35 -04:00
virtio_pci_modern_dev.c virtio_pci: fix the common cfg map size 2023-11-02 09:36:46 +01:00
virtio_ring.c virtio_ring: fix avail_wrap_counter in virtqueue_add_packed 2023-09-13 09:53:48 +02:00
virtio_vdpa.c virtio_vdpa: build affinity masks conditionally 2023-09-13 09:53:48 +02:00