Message ID | 20230222174915.5647-1-avihaih@nvidia.com (mailing list archive) |
---|---|
Headers | show |
Series | vfio: Add migration pre-copy support and device dirty tracking | expand |
On 22/02/2023 19:48, Avihai Horon wrote: > Changes from v1 [4]: > - Rebased on latest master branch. As part of it, made some changes in > pre-copy to adjust it to Juan's new patches: > 1. Added a new patch that passes threshold_size parameter to > .state_pending_{estimate,exact}() handlers. > 2. Added a new patch that refactors vfio_save_block(). > 3. Changed the pre-copy patch to cache and report pending pre-copy > size in the .state_pending_estimate() handler. > - Removed unnecessary P2P code. This should be added later on when P2P > support is added. (Alex) > - Moved the dirty sync to be after the DMA unmap in vfio_dma_unmap() > (patch #11). (Alex) > - Stored vfio_devices_all_device_dirty_tracking()'s value in a local > variable in vfio_get_dirty_bitmap() so it can be re-used (patch #11). > - Refactored the viommu device dirty tracking ranges creation code to > make it clearer (patch #15). > - Changed overflow check in vfio_iommu_range_is_device_tracked() to > emphasize that we specifically check for 2^64 wrap around (patch #15). > - Added R-bs / Acks. > > Thanks. > > [1] > https://lore.kernel.org/qemu-devel/167658846945.932837.1420176491103357684.stgit@omen/ > > [2] > https://lore.kernel.org/kvm/20221206083438.37807-3-yishaih@nvidia.com/ > > [3] > https://lore.kernel.org/netdev/20220908183448.195262-4-yishaih@nvidia.com/ and here is v1 link: [4] https://lore.kernel.org/qemu-devel/20230126184948.10478-1-avihaih@nvidia.com/ Thanks.
There are various errors running this through the CI on gitlab. This one seems bogus but needs to be resolved regardless: https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . -iquote /builds/alex.williamson/qemu -iquote /builds/alex.williamson/qemu/include -iquote /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 2789 1772 | if (ret) { 2790 | ^ 32-bit builds have some actual errors though: https://gitlab.com/alex.williamson/qemu/-/jobs/3817940719 FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o 2601cc -m32 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . -iquote /builds/alex.williamson/qemu -iquote /builds/alex.williamson/qemu/include -iquote /builds/alex.williamson/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c 2602../hw/vfio/common.c: In function 'vfio_device_feature_dma_logging_start_create': 2603../hw/vfio/common.c:1572:27: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 2604 1572 | control->ranges = (uint64_t)ranges; 2605 | ^ 2606../hw/vfio/common.c:1596:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 2607 1596 | control->ranges = (uint64_t)ranges; 2608 | ^ 2609../hw/vfio/common.c: In function 'vfio_device_feature_dma_logging_start_destroy': 2610../hw/vfio/common.c:1620:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 2611 1620 | (struct vfio_device_feature_dma_logging_range *)control->ranges; 2612 | ^ 2613../hw/vfio/common.c: In function 'vfio_device_dma_logging_report': 2614../hw/vfio/common.c:1810:22: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 2615 1810 | report->bitmap = (uint64_t)bitmap; 2616 | ^ Thanks, Alex
On 2/22/23 21:55, Alex Williamson wrote: > > There are various errors running this through the CI on gitlab. > > This one seems bogus but needs to be resolved regardless: > > https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 > FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o > 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . -iquote /builds/alex.williamson/qemu -iquote /builds/alex.williamson/qemu/include -iquote /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c > 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: > 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > 2789 1772 | if (ret) { > 2790 | ^ The routine to fix is vfio_devices_start_dirty_page_tracking(). The compiler is doing some inlining. Thanks, C.
On 22/02/2023 22:55, Alex Williamson wrote: > External email: Use caution opening links or attachments > > > There are various errors running this through the CI on gitlab. > > This one seems bogus but needs to be resolved regardless: > > https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 > FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o > 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . -iquote /builds/alex.williamson/qemu -iquote /builds/alex.williamson/qemu/include -iquote /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c > 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: > 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > 2789 1772 | if (ret) { > 2790 | ^ > > 32-bit builds have some actual errors though: > > https://gitlab.com/alex.williamson/qemu/-/jobs/3817940719 > FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o > 2601cc -m32 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . -iquote /builds/alex.williamson/qemu -iquote /builds/alex.williamson/qemu/include -iquote /builds/alex.williamson/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c > 2602../hw/vfio/common.c: In function 'vfio_device_feature_dma_logging_start_create': > 2603../hw/vfio/common.c:1572:27: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > 2604 1572 | control->ranges = (uint64_t)ranges; > 2605 | ^ > 2606../hw/vfio/common.c:1596:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > 2607 1596 | control->ranges = (uint64_t)ranges; > 2608 | ^ > 2609../hw/vfio/common.c: In function 'vfio_device_feature_dma_logging_start_destroy': > 2610../hw/vfio/common.c:1620:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > 2611 1620 | (struct vfio_device_feature_dma_logging_range *)control->ranges; > 2612 | ^ > 2613../hw/vfio/common.c: In function 'vfio_device_dma_logging_report': > 2614../hw/vfio/common.c:1810:22: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > 2615 1810 | report->bitmap = (uint64_t)bitmap; > 2616 | ^ Sure, I will fix these errors. Thanks.
On 23/02/2023 12:05, Cédric Le Goater wrote: > External email: Use caution opening links or attachments > > > On 2/22/23 21:55, Alex Williamson wrote: >> >> There are various errors running this through the CI on gitlab. >> >> This one seems bogus but needs to be resolved regardless: >> >> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 >> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >> 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. >> -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader >> -I/usr/include/pixman-1 -I/usr/include/capstone >> -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include >> -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 >> -g -isystem /builds/alex.williamson/qemu/linux-headers -isystem >> linux-headers -iquote . -iquote /builds/alex.williamson/qemu -iquote >> /builds/alex.williamson/qemu/include -iquote >> /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE >> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 >> -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -Wundef >> -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes >> -Wredundant-decls -Wold-style-declaration -Wold-style-definition >> -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self >> -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels >> -Wexpansion-to-defined -Wimplicit-fallthrough=2 >> -Wmissing-format-attribute -Wno-missing-include-dirs >> -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE >> -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H >> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >> 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: >> 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used >> uninitialized in this function [-Werror=maybe-uninitialized] >> 2789 1772 | if (ret) { >> 2790 | ^ > > > The routine to fix is vfio_devices_start_dirty_page_tracking(). The > compiler > is doing some inlining. > I don't think I understand how inlining could cause it. Could you elaborate on this? I thought that the compiler just missed the initialization of ret because it happens in the if else statement, and that simply doing "int ret = 0;" would solve it. Thanks.
On 23/02/2023 14:56, Avihai Horon wrote: > On 22/02/2023 22:55, Alex Williamson wrote: >> There are various errors running this through the CI on gitlab. >> >> This one seems bogus but needs to be resolved regardless: >> >> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 >> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >> 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. >> -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader >> -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/glib-2.0 >> -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall >> -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem >> /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . >> -iquote /builds/alex.williamson/qemu -iquote >> /builds/alex.williamson/qemu/include -iquote >> /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE >> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE >> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >> -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security >> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs >> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >> -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value >> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >> -isystemlinux-headers -DNEED_CPU_H >> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >> 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: >> 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used uninitialized in this >> function [-Werror=maybe-uninitialized] >> 2789 1772 | if (ret) { >> 2790 | ^ >> >> 32-bit builds have some actual errors though: >> >> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940719 >> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >> 2601cc -m32 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm >> -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 >> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 >> -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g >> -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers >> -iquote . -iquote /builds/alex.williamson/qemu -iquote >> /builds/alex.williamson/qemu/include -iquote >> /builds/alex.williamson/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE >> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE >> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >> -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security >> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs >> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >> -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value >> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >> -isystemlinux-headers -DNEED_CPU_H >> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >> 2602../hw/vfio/common.c: In function >> 'vfio_device_feature_dma_logging_start_create': >> 2603../hw/vfio/common.c:1572:27: error: cast from pointer to integer of >> different size [-Werror=pointer-to-int-cast] >> 2604 1572 | control->ranges = (uint64_t)ranges; >> 2605 | ^ >> 2606../hw/vfio/common.c:1596:23: error: cast from pointer to integer of >> different size [-Werror=pointer-to-int-cast] >> 2607 1596 | control->ranges = (uint64_t)ranges; >> 2608 | ^ >> 2609../hw/vfio/common.c: In function >> 'vfio_device_feature_dma_logging_start_destroy': >> 2610../hw/vfio/common.c:1620:9: error: cast to pointer from integer of >> different size [-Werror=int-to-pointer-cast] >> 2611 1620 | (struct vfio_device_feature_dma_logging_range >> *)control->ranges; >> 2612 | ^ >> 2613../hw/vfio/common.c: In function 'vfio_device_dma_logging_report': >> 2614../hw/vfio/common.c:1810:22: error: cast from pointer to integer of >> different size [-Werror=pointer-to-int-cast] >> 2615 1810 | report->bitmap = (uint64_t)bitmap; >> 2616 | ^ > > Sure, I will fix these errors. Just a thought: should the pre-copy series be moved towards the end of this series, given that it's more of an improvement of downtime than a must-have like dirty tracking? Joao
On 24/02/2023 21:26, Joao Martins wrote: > External email: Use caution opening links or attachments > > > On 23/02/2023 14:56, Avihai Horon wrote: >> On 22/02/2023 22:55, Alex Williamson wrote: >>> There are various errors running this through the CI on gitlab. >>> >>> This one seems bogus but needs to be resolved regardless: >>> >>> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 >>> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >>> 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. >>> -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader >>> -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/glib-2.0 >>> -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall >>> -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem >>> /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . >>> -iquote /builds/alex.williamson/qemu -iquote >>> /builds/alex.williamson/qemu/include -iquote >>> /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE >>> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE >>> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >>> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >>> -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security >>> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs >>> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >>> -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value >>> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >>> -isystemlinux-headers -DNEED_CPU_H >>> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >>> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >>> 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: >>> 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used uninitialized in this >>> function [-Werror=maybe-uninitialized] >>> 2789 1772 | if (ret) { >>> 2790 | ^ >>> >>> 32-bit builds have some actual errors though: >>> >>> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940719 >>> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >>> 2601cc -m32 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm >>> -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 >>> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 >>> -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g >>> -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers >>> -iquote . -iquote /builds/alex.williamson/qemu -iquote >>> /builds/alex.williamson/qemu/include -iquote >>> /builds/alex.williamson/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE >>> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE >>> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >>> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >>> -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security >>> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs >>> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >>> -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value >>> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >>> -isystemlinux-headers -DNEED_CPU_H >>> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >>> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >>> 2602../hw/vfio/common.c: In function >>> 'vfio_device_feature_dma_logging_start_create': >>> 2603../hw/vfio/common.c:1572:27: error: cast from pointer to integer of >>> different size [-Werror=pointer-to-int-cast] >>> 2604 1572 | control->ranges = (uint64_t)ranges; >>> 2605 | ^ >>> 2606../hw/vfio/common.c:1596:23: error: cast from pointer to integer of >>> different size [-Werror=pointer-to-int-cast] >>> 2607 1596 | control->ranges = (uint64_t)ranges; >>> 2608 | ^ >>> 2609../hw/vfio/common.c: In function >>> 'vfio_device_feature_dma_logging_start_destroy': >>> 2610../hw/vfio/common.c:1620:9: error: cast to pointer from integer of >>> different size [-Werror=int-to-pointer-cast] >>> 2611 1620 | (struct vfio_device_feature_dma_logging_range >>> *)control->ranges; >>> 2612 | ^ >>> 2613../hw/vfio/common.c: In function 'vfio_device_dma_logging_report': >>> 2614../hw/vfio/common.c:1810:22: error: cast from pointer to integer of >>> different size [-Werror=pointer-to-int-cast] >>> 2615 1810 | report->bitmap = (uint64_t)bitmap; >>> 2616 | ^ >> Sure, I will fix these errors. > Just a thought: should the pre-copy series be moved towards the end of this > series, given that it's more of an improvement of downtime than a must-have like > dirty tracking? Given recent discussion, maybe it would be better to split this series and go one step at a time: Start with basic support for device dirty tracking (without vIOMMU support), then add pre-copy and then add vIOMMU support to device dirty tracking. Thanks.
On 2/23/23 16:07, Avihai Horon wrote: > > On 23/02/2023 12:05, Cédric Le Goater wrote: >> External email: Use caution opening links or attachments >> >> >> On 2/22/23 21:55, Alex Williamson wrote: >>> >>> There are various errors running this through the CI on gitlab. >>> >>> This one seems bogus but needs to be resolved regardless: >>> >>> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 >>> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >>> 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/glib-2.0 -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . -iquote /builds/alex.williamson/qemu -iquote /builds/alex.williamson/qemu/include -iquote /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >>> -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >>> 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: >>> 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] >>> 2789 1772 | if (ret) { >>> 2790 | ^ >> >> >> The routine to fix is vfio_devices_start_dirty_page_tracking(). The compiler >> is doing some inlining. >> > I don't think I understand how inlining could cause it. > Could you elaborate on this? The compiler reports an error in routine 'vfio_listener_log_global_start' but the fix should be in 'vfio_devices_start_dirty_page_tracking'. Surely because the compiler optimization inlines the latter. > > I thought that the compiler just missed the initialization of ret because it happens in the if else statement, and that simply doing "int ret = 0;" would solve it. Yes. This will work. Thanks, C.
On 2/26/23 18:00, Avihai Horon wrote: > > On 24/02/2023 21:26, Joao Martins wrote: >> External email: Use caution opening links or attachments >> >> >> On 23/02/2023 14:56, Avihai Horon wrote: >>> On 22/02/2023 22:55, Alex Williamson wrote: >>>> There are various errors running this through the CI on gitlab. >>>> >>>> This one seems bogus but needs to be resolved regardless: >>>> >>>> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 >>>> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >>>> 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. >>>> -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader >>>> -I/usr/include/pixman-1 -I/usr/include/capstone -I/usr/include/glib-2.0 >>>> -I/usr/lib/s390x-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall >>>> -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem >>>> /builds/alex.williamson/qemu/linux-headers -isystem linux-headers -iquote . >>>> -iquote /builds/alex.williamson/qemu -iquote >>>> /builds/alex.williamson/qemu/include -iquote >>>> /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE >>>> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE >>>> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >>>> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >>>> -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security >>>> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs >>>> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >>>> -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value >>>> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >>>> -isystemlinux-headers -DNEED_CPU_H >>>> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >>>> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >>>> 2787../hw/vfio/common.c: In function ‘vfio_listener_log_global_start’: >>>> 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used uninitialized in this >>>> function [-Werror=maybe-uninitialized] >>>> 2789 1772 | if (ret) { >>>> 2790 | ^ >>>> >>>> 32-bit builds have some actual errors though: >>>> >>>> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940719 >>>> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >>>> 2601cc -m32 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm >>>> -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 >>>> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 >>>> -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g >>>> -isystem /builds/alex.williamson/qemu/linux-headers -isystem linux-headers >>>> -iquote . -iquote /builds/alex.williamson/qemu -iquote >>>> /builds/alex.williamson/qemu/include -iquote >>>> /builds/alex.williamson/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE >>>> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE >>>> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >>>> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >>>> -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security >>>> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs >>>> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >>>> -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value >>>> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >>>> -isystemlinux-headers -DNEED_CPU_H >>>> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >>>> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c ../hw/vfio/common.c >>>> 2602../hw/vfio/common.c: In function >>>> 'vfio_device_feature_dma_logging_start_create': >>>> 2603../hw/vfio/common.c:1572:27: error: cast from pointer to integer of >>>> different size [-Werror=pointer-to-int-cast] >>>> 2604 1572 | control->ranges = (uint64_t)ranges; >>>> 2605 | ^ >>>> 2606../hw/vfio/common.c:1596:23: error: cast from pointer to integer of >>>> different size [-Werror=pointer-to-int-cast] >>>> 2607 1596 | control->ranges = (uint64_t)ranges; >>>> 2608 | ^ >>>> 2609../hw/vfio/common.c: In function >>>> 'vfio_device_feature_dma_logging_start_destroy': >>>> 2610../hw/vfio/common.c:1620:9: error: cast to pointer from integer of >>>> different size [-Werror=int-to-pointer-cast] >>>> 2611 1620 | (struct vfio_device_feature_dma_logging_range >>>> *)control->ranges; >>>> 2612 | ^ >>>> 2613../hw/vfio/common.c: In function 'vfio_device_dma_logging_report': >>>> 2614../hw/vfio/common.c:1810:22: error: cast from pointer to integer of >>>> different size [-Werror=pointer-to-int-cast] >>>> 2615 1810 | report->bitmap = (uint64_t)bitmap; >>>> 2616 | ^ >>> Sure, I will fix these errors. >> Just a thought: should the pre-copy series be moved towards the end of this >> series, given that it's more of an improvement of downtime than a must-have like >> dirty tracking? > > Given recent discussion, maybe it would be better to split this series and go one step at a time: > Start with basic support for device dirty tracking (without vIOMMU support), then add pre-copy and then add vIOMMU support to device dirty tracking. and add the fixes first in the series. They could be merged quickly. Thanks, C.
On 27/02/2023 15:50, Cédric Le Goater wrote: > External email: Use caution opening links or attachments > > > On 2/26/23 18:00, Avihai Horon wrote: >> >> On 24/02/2023 21:26, Joao Martins wrote: >>> External email: Use caution opening links or attachments >>> >>> >>> On 23/02/2023 14:56, Avihai Horon wrote: >>>> On 22/02/2023 22:55, Alex Williamson wrote: >>>>> There are various errors running this through the CI on gitlab. >>>>> >>>>> This one seems bogus but needs to be resolved regardless: >>>>> >>>>> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 >>>>> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >>>>> 2786s390x-linux-gnu-gcc -m64 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. >>>>> -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader >>>>> -I/usr/include/pixman-1 -I/usr/include/capstone >>>>> -I/usr/include/glib-2.0 >>>>> -I/usr/lib/s390x-linux-gnu/glib-2.0/include >>>>> -fdiagnostics-color=auto -Wall >>>>> -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem >>>>> /builds/alex.williamson/qemu/linux-headers -isystem linux-headers >>>>> -iquote . >>>>> -iquote /builds/alex.williamson/qemu -iquote >>>>> /builds/alex.williamson/qemu/include -iquote >>>>> /builds/alex.williamson/qemu/tcg/s390x -pthread -U_FORTIFY_SOURCE >>>>> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 >>>>> -D_LARGEFILE_SOURCE >>>>> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >>>>> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >>>>> -Wold-style-declaration -Wold-style-definition -Wtype-limits >>>>> -Wformat-security >>>>> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body >>>>> -Wnested-externs >>>>> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >>>>> -Wmissing-format-attribute -Wno-missing-include-dirs >>>>> -Wno-shift-negative-value >>>>> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >>>>> -isystemlinux-headers -DNEED_CPU_H >>>>> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >>>>> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >>>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >>>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >>>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c >>>>> ../hw/vfio/common.c >>>>> 2787../hw/vfio/common.c: In function >>>>> ‘vfio_listener_log_global_start’: >>>>> 2788../hw/vfio/common.c:1772:8: error: ‘ret’ may be used >>>>> uninitialized in this >>>>> function [-Werror=maybe-uninitialized] >>>>> 2789 1772 | if (ret) { >>>>> 2790 | ^ >>>>> >>>>> 32-bit builds have some actual errors though: >>>>> >>>>> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940719 >>>>> FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o >>>>> 2601cc -m32 -Ilibqemu-aarch64-softmmu.fa.p -I. -I.. -Itarget/arm >>>>> -I../target/arm -Iqapi -Itrace -Iui -Iui/shader >>>>> -I/usr/include/pixman-1 >>>>> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include >>>>> -I/usr/include/sysprof-4 >>>>> -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 >>>>> -O2 -g >>>>> -isystem /builds/alex.williamson/qemu/linux-headers -isystem >>>>> linux-headers >>>>> -iquote . -iquote /builds/alex.williamson/qemu -iquote >>>>> /builds/alex.williamson/qemu/include -iquote >>>>> /builds/alex.williamson/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE >>>>> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 >>>>> -D_LARGEFILE_SOURCE >>>>> -fno-strict-aliasing -fno-common -fwrapv -Wundef -Wwrite-strings >>>>> -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls >>>>> -Wold-style-declaration -Wold-style-definition -Wtype-limits >>>>> -Wformat-security >>>>> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body >>>>> -Wnested-externs >>>>> -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 >>>>> -Wmissing-format-attribute -Wno-missing-include-dirs >>>>> -Wno-shift-negative-value >>>>> -Wno-psabi -fstack-protector-strong -fPIE -isystem../linux-headers >>>>> -isystemlinux-headers -DNEED_CPU_H >>>>> '-DCONFIG_TARGET="aarch64-softmmu-config-target.h"' >>>>> '-DCONFIG_DEVICES="aarch64-softmmu-config-devices.h"' -MD -MQ >>>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -MF >>>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o.d -o >>>>> libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o -c >>>>> ../hw/vfio/common.c >>>>> 2602../hw/vfio/common.c: In function >>>>> 'vfio_device_feature_dma_logging_start_create': >>>>> 2603../hw/vfio/common.c:1572:27: error: cast from pointer to >>>>> integer of >>>>> different size [-Werror=pointer-to-int-cast] >>>>> 2604 1572 | control->ranges = (uint64_t)ranges; >>>>> 2605 | ^ >>>>> 2606../hw/vfio/common.c:1596:23: error: cast from pointer to >>>>> integer of >>>>> different size [-Werror=pointer-to-int-cast] >>>>> 2607 1596 | control->ranges = (uint64_t)ranges; >>>>> 2608 | ^ >>>>> 2609../hw/vfio/common.c: In function >>>>> 'vfio_device_feature_dma_logging_start_destroy': >>>>> 2610../hw/vfio/common.c:1620:9: error: cast to pointer from >>>>> integer of >>>>> different size [-Werror=int-to-pointer-cast] >>>>> 2611 1620 | (struct vfio_device_feature_dma_logging_range >>>>> *)control->ranges; >>>>> 2612 | ^ >>>>> 2613../hw/vfio/common.c: In function >>>>> 'vfio_device_dma_logging_report': >>>>> 2614../hw/vfio/common.c:1810:22: error: cast from pointer to >>>>> integer of >>>>> different size [-Werror=pointer-to-int-cast] >>>>> 2615 1810 | report->bitmap = (uint64_t)bitmap; >>>>> 2616 | ^ >>>> Sure, I will fix these errors. >>> Just a thought: should the pre-copy series be moved towards the end >>> of this >>> series, given that it's more of an improvement of downtime than a >>> must-have like >>> dirty tracking? >> >> Given recent discussion, maybe it would be better to split this >> series and go one step at a time: >> Start with basic support for device dirty tracking (without vIOMMU >> support), then add pre-copy and then add vIOMMU support to device >> dirty tracking. > > and add the fixes first in the series. They could be merged quickly. Yes, of course. I will add them. Thanks.