Message ID | 20250212054450.578449-1-suravee.suthikulpanit@amd.com (mailing list archive) |
---|---|
Headers | show |
Series | hw/i386/amd_iommu: Add migration support | expand |
On Wed, Feb 12, 2025 at 05:44:48AM +0000, Suravee Suthikulpanit wrote: > Currently, amd-iommu device does not support migration. This series addresses > an issue due hidden AMDVI-PCI device enumeration. Then introduces migratable > VMStateDescription, which saves necessary parameters for the device. > > Changes from v2: > (https://lore.kernel.org/all/20250206051856.323651-1-suravee.suthikulpanit@amd.com) > * Add patch 1/2 Fails build on 32 bit: https://gitlab.com/mstredhat/qemu/-/jobs/9202574769 In file included from ../include/qemu/osdep.h:53, from ../hw/i386/amd_iommu.c:23: ../include/qemu/compiler.h:70:35: error: invalid operands to binary - (have ‘uint64_t *’ {aka ‘long long unsigned int *’} and ‘size_t *’ {aka ‘unsigned int *’}) 70 | #define type_check(t1,t2) ((t1*)0 - (t2*)0) | ^ ../include/migration/vmstate.h:269:6: note: in expansion of macro ‘type_check’ 269 | type_check(_type, typeof_field(_state, _field))) | ^~~~~~~~~~ ../include/migration/vmstate.h:320:21: note: in expansion of macro ‘vmstate_offset_value’ 320 | .offset = vmstate_offset_value(_state, _field, _type), \ | ^~~~~~~~~~~~~~~~~~~~ ../include/migration/vmstate.h:853:5: note: in expansion of macro ‘VMSTATE_SINGLE_TEST’ 853 | VMSTATE_SINGLE_TEST(_field, _state, NULL, _version, _info, _type) | ^~~~~~~~~~~~~~~~~~~ ../include/migration/vmstate.h:903:5: note: in expansion of macro ‘VMSTATE_SINGLE’ 903 | VMSTATE_SINGLE(_f, _s, _v, vmstate_info_uint64, uint64_t) | ^~~~~~~~~~~~~~ ../include/migration/vmstate.h:937:5: note: in expansion of macro ‘VMSTATE_UINT64_V’ 937 | VMSTATE_UINT64_V(_f, _s, 0) | ^~~~~~~~~~~~~~~~ ../hw/i386/amd_iommu.c:1635:7: note: in expansion of macro ‘VMSTATE_UINT64’ 1635 | VMSTATE_UINT64(devtab_len, AMDVIState), | ^~~~~~~~~~~~~~ > Suravee Suthikulpanit (2): > hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow > full control over the PCI device creation > hw/i386/amd_iommu: Allow migration when explicitly create the > AMDVI-PCI device > > hw/i386/acpi-build.c | 8 ++-- > hw/i386/amd_iommu.c | 111 +++++++++++++++++++++++++++++++++---------- > hw/i386/amd_iommu.h | 3 +- > 3 files changed, 91 insertions(+), 31 deletions(-) > > -- > 2.34.1