diff options
author | Daniil Tatianin <d-tatianin@yandex-team.ru> | 2022-09-06 10:31:11 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-10-07 09:41:51 -0400 |
commit | 8edd56735baa7f58aa504d0f2c4ed6f893630cce (patch) | |
tree | 33bff33b89f44959ee084ca2e45f3537f4b0f79f /hw/block/meson.build | |
parent | f1c25f295dc784a2e8270d94c8d12d8a55a0882c (diff) | |
download | qemu-8edd56735baa7f58aa504d0f2c4ed6f893630cce.zip qemu-8edd56735baa7f58aa504d0f2c4ed6f893630cce.tar.gz qemu-8edd56735baa7f58aa504d0f2c4ed6f893630cce.tar.bz2 |
vhost-user-blk: dynamically resize config space based on features
Make vhost-user-blk backwards compatible when migrating from older VMs
running with modern features turned off, the same way it was done for
virtio-blk in 20764be0421c ("virtio-blk: set config size depending on the features enabled")
It's currently impossible to migrate from an older VM with
vhost-user-blk (with disable-legacy=off) because of errors like this:
qemu-system-x86_64: get_pci_config_device: Bad config data: i=0x10 read: 41 device: 1 cmask: ff wmask: 80 w1cmask:0
qemu-system-x86_64: Failed to load PCIDevice:config
qemu-system-x86_64: Failed to load virtio-blk:virtio
qemu-system-x86_64: error while loading state for instance 0x0 of device '0000:00:05.0:00.0:02.0/virtio-blk'
qemu-system-x86_64: load of migration failed: Invalid argument
This is caused by the newer (destination) VM requiring a bigger BAR0
alignment because it has to cover a bigger configuration space, which
isn't actually needed since those additional config fields are not
active (write-zeroes/discard).
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20220906073111.353245-6-d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/block/meson.build')
-rw-r--r-- | hw/block/meson.build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/meson.build b/hw/block/meson.build index 8ee1f1f..1908abd 100644 --- a/hw/block/meson.build +++ b/hw/block/meson.build @@ -17,6 +17,6 @@ softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c')) softmmu_ss.add(when: 'CONFIG_TC58128', if_true: files('tc58128.c')) specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c', 'virtio-blk-common.c')) -specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c')) +specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c', 'virtio-blk-common.c')) subdir('dataplane') |