Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Xuan Zhuo
On Thu, 18 Aug 2022 16:40:23 +0800, Jason Wang wrote: > On Thu, Aug 18, 2022 at 4:13 PM Xuan Zhuo wrote: > > > > On Thu, 18 Aug 2022 16:10:45 +0800, Jason Wang wrote: > > > On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo > > > wrote: > > > > > > > > Legacy virtio pci has no way to communicate a cha

Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Jason Wang
On Thu, Aug 18, 2022 at 4:13 PM Xuan Zhuo wrote: > > On Thu, 18 Aug 2022 16:10:45 +0800, Jason Wang wrote: > > On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo > > wrote: > > > > > > Legacy virtio pci has no way to communicate a change in vq size to > > > the hypervisor. If ring sizes don't match hyp

Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Xuan Zhuo
On Thu, 18 Aug 2022 16:10:45 +0800, Jason Wang wrote: > On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo wrote: > > > > Legacy virtio pci has no way to communicate a change in vq size to > > the hypervisor. If ring sizes don't match hypervisor will happily > > corrupt memory. > > > > We add a check to

Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Jason Wang
On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo wrote: > > Legacy virtio pci has no way to communicate a change in vq size to > the hypervisor. If ring sizes don't match hypervisor will happily > corrupt memory. > > We add a check to vring size before calling > vp_legacy_set_queue_address(). Checking t

[PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-17 Thread Xuan Zhuo
Legacy virtio pci has no way to communicate a change in vq size to the hypervisor. If ring sizes don't match hypervisor will happily corrupt memory. We add a check to vring size before calling vp_legacy_set_queue_address(). Checking the memory range directly is a bit cumbersome. Signed-off-by: Xu