On Mon, Feb 14 2022, Jean-Philippe Brucker <jean-phili...@linaro.org> wrote:
> Replace the VIRTIO_IOMMU_F_BYPASS feature with > VIRTIO_IOMMU_F_BYPASS_CONFIG, which enables a config space bit to switch > global bypass on and off. > > Add a boot-bypass option, which defaults to 'on' to be in line with > other vIOMMUs and to allow running firmware/bootloader that are unaware > of the IOMMU. x86 doesn't need a workaround to boot with virtio-iommu > anymore. > > Since v2 [1]: > * Added the new bypass bits to the migration stream. > As discussed on the v2 thread, we assume that cross-version > compatibility is not required for live migration at the moment, so we > only increase the version number. Patch 2 says: "We add the bypass > field to the migration stream without introducing subsections, based > on the assumption that this virtio-iommu device isn't being used in > production enough to require cross-version migration at the moment > (all previous version required workarounds since they didn't support > ACPI and boot-bypass)." > > [1] > https://lore.kernel.org/qemu-devel/20220127142940.671333-1-jean-phili...@linaro.org/ One thing that we could do to avoid surprises in the unlikely case that somebody has a virtio-iommu device and wants to migrate to an older machine version is to add a migration blocker for the virtio-iommu device for all compat machines for versions 6.2 or older (i.e. only 7.0 or newer machine types can have a migratable virtio-iommu device starting with QEMU 7.0.) Not too complicated to implement, but I'm not sure whether we'd add too much code to prevent something very unlikely to happen anyway. I would not insist on it :) Otherwise, I didn't spot problems in this series.