On Mon, Feb 12, 2024 at 01:22:33PM +0530, Srujana Challa wrote: > Currently, virtio_pci_queue_mem_mult function returns 4K when > VIRTIO_PCI_FLAG_PAGE_PER_VQ is set. But this is not correct > when host has page size as 64K. > This patch fixes the same. > > Signed-off-by: Srujana Challa <scha...@marvell.com>
You can't tweak guest visible values like this without compat machinery. It's also going to consume a ton more phys memory - can this break any configs? Why is this a problem? Just with vdpa? > --- > hw/virtio/virtio-pci.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c > index e433879542..028df99991 100644 > --- a/hw/virtio/virtio-pci.c > +++ b/hw/virtio/virtio-pci.c > @@ -316,12 +316,10 @@ static bool virtio_pci_ioeventfd_enabled(DeviceState *d) > return (proxy->flags & VIRTIO_PCI_FLAG_USE_IOEVENTFD) != 0; > } > > -#define QEMU_VIRTIO_PCI_QUEUE_MEM_MULT 0x1000 > - > static inline int virtio_pci_queue_mem_mult(struct VirtIOPCIProxy *proxy) > { > return (proxy->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ) ? > - QEMU_VIRTIO_PCI_QUEUE_MEM_MULT : 4; > + qemu_real_host_page_size() : 4; > } > > static int virtio_pci_ioeventfd_assign(DeviceState *d, EventNotifier > *notifier, > -- > 2.25.1