virtio-pci: reduce modern_mem_bar size
commitd9997d89a4a09a330a056929d06d4b7b0b7a8239
authorMarcel Apfelbaum <marcel@redhat.com>
Wed, 7 Sep 2016 15:02:25 +0000 (7 18:02 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 9 Sep 2016 17:58:34 +0000 (9 20:58 +0300)
tree5e4e10bea0a4a1c27cde5ba67458a52bbd4c3a84
parent14c985cffa6cb177fc01a163d8bcf227c104718c
virtio-pci: reduce modern_mem_bar size

Currently each VQ Notification Virtio Capability is allocated
on a different page. The idea is to enable split drivers within
guests, however there are no known plans to do that.
The allocation will result in a 8MB BAR, more than various
guest firmwares pre-allocates for PCI Bridges hotplug process.

Reserve 4 bytes per VQ by default and add a new parameter
"page-per-vq" to be used with split drivers.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-pci.c
hw/virtio/virtio-pci.h
include/hw/compat.h