qemu-e2k/hw
Daniil Tatianin 8edd56735b 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 20764be042 ("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>
2022-10-07 09:41:51 -04:00
..
9pfs
acpi hw/acpi: Add ospm_status hook implementation for acpi-ged 2022-09-22 16:38:28 +01:00
adc hw/adc: Make adci[*] R/W in NPCM7XX ADC 2022-07-18 13:20:14 +01:00
alpha
arm hw/arm/virt: Fix devicetree warning about the SMMU node 2022-09-29 17:55:06 +01:00
audio
avr
block vhost-user-blk: dynamically resize config space based on features 2022-10-07 09:41:51 -04:00
char serial: Allow unaligned i/o access 2022-09-29 14:38:05 +04:00
core include/hw/core: Create struct CPUJumpCache 2022-10-04 12:13:12 -07:00
cpu
cris
cxl hw/cxl: Correctly handle variable sized mailbox input payloads. 2022-08-17 13:08:11 -04:00
display vhost-user: Call qemu_socketpair() instead of socketpair() 2022-09-29 14:38:05 +04:00
dma
gpio hw/gpio/aspeed: Don't let guests modify input pins 2022-07-14 16:24:38 +02:00
hppa lasips2: remove legacy lasips2_initfn() function 2022-07-18 19:28:46 +01:00
hyperv
i2c hw/i2c/pmbus: Add idle state to return 0xff's 2022-07-14 16:24:38 +02:00
i386 x86: re-initialize RNG seed when selecting kernel 2022-10-01 21:16:36 +02:00
ide hw/ide/core.c: Implement ATA INITIALIZE_DEVICE_PARAMETERS command 2022-09-30 18:43:44 +02:00
input pckbd: remove legacy i8042_mm_init() function 2022-07-18 19:28:46 +01:00
intc hw/intc/xics: Avoid dynamic stack allocation 2022-09-22 16:38:28 +01:00
ipack
ipmi ipmi:smbus: Add a check around a memcpy 2022-08-01 06:40:50 -05:00
isa
loongarch hw/loongarch: Improve acpi dsdt table 2022-09-20 15:44:25 +08:00
m68k m68k: align bootinfo strings and data to 4 bytes 2022-09-26 23:37:22 +02:00
mem mem/cxl_type3: fix GPF DVSEC 2022-09-29 21:18:40 +02:00
microblaze hw/microblaze: pass random seed to fdt 2022-09-21 19:59:56 +02:00
mips hw/mips/malta: turn off x86 specific features of PIIX4_PM 2022-08-08 23:23:11 +02:00
misc monitor: expose monitor_puts to rest of code 2022-10-06 11:53:40 +01:00
net virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size 2022-10-07 09:41:51 -04:00
nios2 hw/nios2: virt: pass random seed to fdt 2022-07-22 19:01:44 +02:00
nubus
nvme hw/nvme: do not enable ioeventfd by default 2022-08-01 12:01:21 +02:00
nvram x86: return modified setup_data only if read as memory, not as file 2022-09-27 11:30:59 +02:00
openrisc hw/openrisc: virt: pass random seed to fdt 2022-09-04 07:02:57 +01:00
pci
pci-bridge
pci-host hw/pci-host: pnv_phb{3, 4}: Fix heap out-of-bound access failure 2022-09-20 12:31:53 -03:00
pcmcia
ppc hw/ppc/pnv: Avoid dynamic stack allocation 2022-09-22 16:38:28 +01:00
rdma
remote Use g_new() & friends where that makes obvious sense 2022-10-04 00:10:11 +02:00
riscv hw/riscv: opentitan: Expose the resetvec as a SoC property 2022-09-27 07:04:38 +10:00
rtc goldfish_rtc: Add big-endian property 2022-09-04 07:02:56 +01:00
rx hw/rx: pass random seed to fdt 2022-07-22 19:01:44 +02:00
s390x s390x/s390-virtio-ccw: add zpcii-disable machine property 2022-09-26 17:23:47 +02:00
scsi hw/virtio: move vhd->started check into helper and add FIXME 2022-10-07 09:41:51 -04:00
sd block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
sensor hw/sensor: Add Renesas ISL69259 device model 2022-07-14 16:24:38 +02:00
sh4
smbios smbios: sanitize type from external type before checking have_fields_bitmap 2022-09-18 09:17:40 +02:00
sparc
sparc64
ssi hw/ssi: ibex_spi: update reg addr 2022-09-27 07:04:38 +10:00
timer hw/intc: Move mtimer/mtimecmp to aclint 2022-09-07 09:19:10 +02:00
tpm tpm_crb: Avoid backend startup just before shutdown under Xen 2022-09-09 17:55:59 -04:00
tricore
usb usb: make usbnet work with xhci. 2022-09-27 07:59:26 -04:00
vfio vfio/common: Fix vfio_iommu_type1_info use after free 2022-09-27 14:26:42 -06:00
virtio virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size 2022-10-07 09:41:51 -04:00
watchdog watchdog: remove -watchdog option 2022-09-29 11:40:28 +02:00
xen hw/xen: set pci Atomic Ops requests for passthrough device 2022-09-27 14:23:23 +01:00
xenpv
xtensa
Kconfig
meson.build