Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qemu/qemu
base: 813bac3d8d70
Choose a base ref
...
head repository: qemu/qemu
compare: 156618d9ea67
Choose a head ref
  • 16 commits
  • 19 files changed
  • 6 contributors

Commits on Aug 29, 2023

  1. softmmu: Fix dirtylimit memory leak

    Fix memory leak in hmp_info_vcpu_dirty_limit,use g_autoptr
    to handle memory deallocation.
    
    Signed-off-by: alloc.young <alloc.young@outlook.com>
    Reviewed-by: Hyman Huang <yong.huang@smartx.com>
    Message-Id: <SA1PR11MB6760B9AB7EAFBDAFB524ED06F5E3A@SA1PR11MB6760.namprd11.prod.outlook.com>
    Signed-off-by: Hyman Huang <yong.huang@smartx.com>
    alloc.young authored and HuangSuiXiao committed Aug 29, 2023
    Copy the full SHA
    58b4def View commit details
    Browse the repository at this point in the history
  2. softmmu/dirtylimit: Convert free to g_free

    Convert free to g_free to match g_new and g_malloc functions.
    
    Fixes: cc2b33e ("softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically")
    Fixes: baa6098 ("softmmu/dirtylimit: Implement virtual CPU throttle")
    Signed-off-by: alloc.young <alloc.young@outlook.com>
    Reviewed-by: Hyman Huang <yong.huang@smartx.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Message-Id: <SA1PR11MB67604ECD85AFF34BEB3072F7F5E3A@SA1PR11MB6760.namprd11.prod.outlook.com>
    Signed-off-by: Hyman Huang <yong.huang@smartx.com>
    alloc.young authored and HuangSuiXiao committed Aug 29, 2023
    Copy the full SHA
    19b14ce View commit details
    Browse the repository at this point in the history
  3. migration/dirtyrate: Fix precision losses and g_usleep overshoot

    Signed-off-by: Andrei Gudkov <gudkov.andrei@huawei.com>
    Reviewed-by: Hyman Huang <yong.huang@smartx.com>
    Message-Id: <8ddb0d40d143f77aab8f602bd494e01e5fa01614.1691161009.git.gudkov.andrei@huawei.com>
    Signed-off-by: Hyman Huang <yong.huang@smartx.com>
    Andrei Gudkov authored and HuangSuiXiao committed Aug 29, 2023
    Copy the full SHA
    3eb8263 View commit details
    Browse the repository at this point in the history
  4. softmmu: Assert data in bounds in iotlb_to_section

    Acked-by: Alex Bennée <alex.bennee@linaro.org>
    Suggested-by: Alex Bennée <alex.bennee@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 29, 2023
    Copy the full SHA
    86e4f93 View commit details
    Browse the repository at this point in the history
  5. softmmu: Use async_run_on_cpu in tcg_commit

    After system startup, run the update to memory_dispatch
    and the tlb_flush on the cpu.  This eliminates a race,
    wherein a running cpu sees the memory_dispatch change
    but has not yet seen the tlb_flush.
    
    Since the update now happens on the cpu, we need not use
    qatomic_rcu_read to protect the read of memory_dispatch.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1826
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1834
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1846
    Tested-by: Alex Bennée <alex.bennee@linaro.org>
    Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 29, 2023
    Copy the full SHA
    0d58c66 View commit details
    Browse the repository at this point in the history
  6. tcg: Remove vecop_list check from tcg_gen_not_vec

    The not pattern is always available via generic expansion.
    See debug block in tcg_can_emit_vecop_list.
    
    Fixes: 11978f6 ("tcg: Fix expansion of INDEX_op_not_vec")
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 29, 2023
    Copy the full SHA
    77fafcb View commit details
    Browse the repository at this point in the history
  7. tcg/sparc64: Disable TCG_TARGET_HAS_extr_i64_i32

    Since a59a293 ("tcg/sparc64: Remove sparc32plus constraints")
    we no longer distinguish registers with 32 vs 64 bits.
    Therefore we can remove support for the backend-specific
    type change opcodes.
    
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 29, 2023
    Copy the full SHA
    dad2f2f View commit details
    Browse the repository at this point in the history
  8. Revert "include/exec: typedef abi_ptr to vaddr in softmmu"

    This reverts commit fc15bfb.
    
    This patch caused a regression for tricore-softmmu,
    ./tests/tcg/tricore-softmmu/test_boot_to_main.c.tst.
    
    Reported-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed Aug 29, 2023
    Copy the full SHA
    669fd61 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2023

  1. block-migration: Ensure we don't crash during migration cleanup

    We can fail the blk_insert_bs() at init_blk_migration(), leaving the
    BlkMigDevState without a dirty_bitmap and BlockDriverState. Account
    for the possibly missing elements when doing cleanup.
    
    Fix the following crashes:
    
    Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
    0x0000555555ec83ef in bdrv_release_dirty_bitmap (bitmap=0x0) at ../block/dirty-bitmap.c:359
    359         BlockDriverState *bs = bitmap->bs;
     #0  0x0000555555ec83ef in bdrv_release_dirty_bitmap (bitmap=0x0) at ../block/dirty-bitmap.c:359
     #1  0x0000555555bba331 in unset_dirty_tracking () at ../migration/block.c:371
     #2  0x0000555555bbad98 in block_migration_cleanup_bmds () at ../migration/block.c:681
    
    Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
    0x0000555555e971ff in bdrv_op_unblock (bs=0x0, op=BLOCK_OP_TYPE_BACKUP_SOURCE, reason=0x0) at ../block.c:7073
    7073        QLIST_FOREACH_SAFE(blocker, &bs->op_blockers[op], list, next) {
     #0  0x0000555555e971ff in bdrv_op_unblock (bs=0x0, op=BLOCK_OP_TYPE_BACKUP_SOURCE, reason=0x0) at ../block.c:7073
     #1  0x0000555555e9734a in bdrv_op_unblock_all (bs=0x0, reason=0x0) at ../block.c:7095
     #2  0x0000555555bbae13 in block_migration_cleanup_bmds () at ../migration/block.c:690
    
    Signed-off-by: Fabiano Rosas <farosas@suse.de>
    Message-id: 20230731203338.27581-1-farosas@suse.de
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Fabiano Rosas authored and Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    f187609 View commit details
    Browse the repository at this point in the history
  2. block: add subcluster_size field to BlockDriverInfo

    This is going to be used in the subsequent commit as requests alignment
    (in particular, during copy-on-read).  This value only makes sense for
    the formats which support subclusters (currently QCOW2 only).  If this
    field isn't set by driver's own bdrv_get_info() implementation, we
    simply set it equal to the cluster size thus treating each cluster as
    having a single subcluster.
    
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Denis V. Lunev <den@openvz.org>
    Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
    Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Message-ID: <20230711172553.234055-2-andrey.drobyshev@virtuozzo.com>
    Andrey Drobyshev authored and Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    c54483b View commit details
    Browse the repository at this point in the history
  3. block/io: align requests to subcluster_size

    When target image is using subclusters, and we align the request during
    copy-on-read, it makes sense to align to subcluster_size rather than
    cluster_size.  Otherwise we end up with unnecessary allocations.
    
    This commit renames bdrv_round_to_clusters() to bdrv_round_to_subclusters()
    and utilizes subcluster_size field of BlockDriverInfo to make necessary
    alignments.  It affects copy-on-read as well as mirror job (which is
    using bdrv_round_to_clusters()).
    
    This change also fixes the following bug with failing assert (covered by
    the test in the subsequent commit):
    
    qemu-img create -f qcow2 base.qcow2 64K
    qemu-img create -f qcow2 -o extended_l2=on,backing_file=base.qcow2,backing_fmt=qcow2 img.qcow2 64K
    qemu-io -c "write -P 0xaa 0 2K" img.qcow2
    qemu-io -C -c "read -P 0x00 2K 62K" img.qcow2
    
    qemu-io: ../block/io.c:1236: bdrv_co_do_copy_on_readv: Assertion `skip_bytes < pnum' failed.
    
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Denis V. Lunev <den@openvz.org>
    Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
    Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Message-ID: <20230711172553.234055-3-andrey.drobyshev@virtuozzo.com>
    Andrey Drobyshev authored and Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    fc6b211 View commit details
    Browse the repository at this point in the history
  4. tests/qemu-iotests/197: add testcase for CoR with subclusters

    Add testcase which checks that allocations during copy-on-read are
    performed on the subcluster basis when subclusters are enabled in target
    image.
    
    This testcase also triggers the following assert with previous commit
    not being applied, so we check that as well:
    
    qemu-io: ../block/io.c:1236: bdrv_co_do_copy_on_readv: Assertion `skip_bytes < pnum' failed.
    
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Denis V. Lunev <den@openvz.org>
    Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
    Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Message-ID: <20230711172553.234055-4-andrey.drobyshev@virtuozzo.com>
    Andrey Drobyshev authored and Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    e2f9382 View commit details
    Browse the repository at this point in the history
  5. aio-posix: zero out io_uring sqe user_data

    liburing does not clear sqe->user_data. We must do it ourselves to avoid
    undefined behavior in process_cqe() when user_data is used.
    
    Note that fdmon-io_uring is currently disabled, so this is a latent bug
    that does not affect users. Let's merge this fix now to make it easier
    to enable fdmon-io_uring in the future (and I'm working on that).
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Message-ID: <20230426212639.82310-1-stefanha@redhat.com>
    Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    87ec6f5 View commit details
    Browse the repository at this point in the history
  6. Merge tag 'pull-tcg-20230829-2' of https://gitlab.com/rth7680/qemu in…

    …to staging
    
    softmmu: Use async_run_on_cpu in tcg_commit
    tcg: Remove vecop_list check from tcg_gen_not_vec
    tcg/sparc64: Disable TCG_TARGET_HAS_extr_i64_i32
    Revert "include/exec: typedef abi_ptr to vaddr in softmmu"
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTuOcYdHHJpY2hhcmQu
    # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9gGwf/QzbRP8MknlCZXrkZ
    # ykIZAkE4gRUb64Wzc2Oz1XaueltgBGRCS338oE8umtcLKTngZ8rVFD/LPTIEyAEY
    # SOzdHEJLPMSUv54rjAV8W4mVku81E9QvzOgz8PIzFM0mDiPJ/lG6JBTee/IZJHr3
    # cW9W/2XMEz2rS2ONPj7WXbVbk/1ao29JFlhcWKNauUfqrNWK+VWOpo2w5qfgJruz
    # mjOSiMErU7SijytrKG9GP3Ri1JGskocfGcYYPofz8j6lmQoZrT6aYUj2tJTL8rvQ
    # Js+JCP8ZCXFO8/2jJqOivQccBGmLi8wf6Ke777xE0tAqfzXqBOp4tvJbv28e8lja
    # p+Lqhg==
    # =KPna
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Tue 29 Aug 2023 14:32:38 EDT
    # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
    # gpg:                issuer "richard.henderson@linaro.org"
    # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
    # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
    
    * tag 'pull-tcg-20230829-2' of https://gitlab.com/rth7680/qemu:
      Revert "include/exec: typedef abi_ptr to vaddr in softmmu"
      tcg/sparc64: Disable TCG_TARGET_HAS_extr_i64_i32
      tcg: Remove vecop_list check from tcg_gen_not_vec
      softmmu: Use async_run_on_cpu in tcg_commit
      softmmu: Assert data in bounds in iotlb_to_section
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    ef9d20c View commit details
    Browse the repository at this point in the history
  7. Merge tag 'dirtylimit-dirtyrate-pull-request' of https://github.com/n…

    …ewfriday/qemu into staging
    
    Dirtylimit and dirtyrate 20230829 patches PULL request
    
    Correct memory leaks in dirtylimit and accuracy losses in
    dirtyrate, respectively; make minor corrections to overshoot
    and memory deallocation.
    
    This is v3 with a signed tag. Please apply.
    
    Thanks, Yong.
    
    # -----BEGIN PGP SIGNATURE-----
    # Version: GnuPG v2.0.22 (GNU/Linux)
    #
    # iQIcBAABAgAGBQJk7VtOAAoJEN/yI9az/suchasP/j/7DQTggrrB/2lWhB79BTrT
    # L+Tgljh9zynrJeL/OjvE7VD3sxDcHQmHprGT7FkdgIdd3fHl8GHnFz8L1CMLg63E
    # i/4SY3RFIvmMqMrmBNx77+D6nSfezKrkwmoln7VGjK6rC0s86PRok+Dxf4SaoP1i
    # cCeFOq2O0U/im1fQQl0uETqxYAX+StVRhnpWTqpPFBBaVCmCGQx3WWXGXXFOl5PB
    # JNLgDX3lxSpSIfRK9vCb61gFe8gMp+5hUDZgfUln9fmXrO6NsVgHEjvsMqm9UZO1
    # tNGSh1GNmO2du6m2iCzVChB8bfe9P3g/XAubfRIkqZtWZK8lhz1mVQEg4wJ4VgX1
    # uMAi8gzpMV5Rdiy9MWYZW9sCuoiZepksBuGtrFMBXXyCpP76N+uWshfj+/Mp2mt0
    # 475ZiC4silwCeRDWH4UkTyNQtc7+WVRjZP0ToXuUOSyWFdyRPCQdAIDlUacxk/9p
    # BSymBM2P760oa4IMCwhey5/WaFdfFFcMD4e2UwfTpafwY5uwVOTxN23k7+iCivQs
    # 3RbP8ghvakgNPTO+1HcdoRW/LrjnGn1mZ5qvLj1+f7slP5NEsBDZVEylQJIHjXh4
    # oE8OwB/rRexlUGRUuIgMpVeEk8/LcEMy73I+dj/zSkfQEw8KuCp6EUB5HFiciS0/
    # IG5X0TdcvAdicG8qmDGx
    # =NKkN
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Mon 28 Aug 2023 22:43:26 EDT
    # gpg:                using RSA key DFF223D6B3FECB9C
    # gpg: Can't check signature: No public key
    
    * tag 'dirtylimit-dirtyrate-pull-request' of https://github.com/newfriday/qemu:
      migration/dirtyrate: Fix precision losses and g_usleep overshoot
      softmmu/dirtylimit: Convert free to g_free
      softmmu: Fix dirtylimit memory leak
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    ee89152 View commit details
    Browse the repository at this point in the history
  8. Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu in…

    …to staging
    
    Pull request
    
    v3:
    - Drop UFS emulation due to CI failures
    - Add "aio-posix: zero out io_uring sqe user_data"
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmTvLIEACgkQnKSrs4Gr
    # c8itVggAka3RMkEclbeW7JKJBOolm3oUuJTobV8oJfDNMQ8mmom9JkXVUctyPWQT
    # EF+oeqZz1omjr0Dk7YEA2toCahTbXm/UsG7i6cZg8JXPl6e9sOne0j+p5zO5x/kc
    # YlG43SBQJHdp/BfTm/gvwUh0W2on0wadaeEV82m3ZyIrZGTgNcrC1p1gj5dwF5VX
    # SqW02mgALETECyJpo8O7y9vNUYGxEtETG9jzAhtrugGpYk4bPeXlm/rc+2zwV+ET
    # YCnfUvhjhlu5vS4nkta6natg0If16ODjy35vWYm/aGlgveGTqQq9HWgTL71eNuxm
    # Smn+hJHuvkyBclKjbGiiO1W1MuG1/g==
    # =UvNK
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Wed 30 Aug 2023 07:48:17 EDT
    # gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
    # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [ultimate]
    # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [ultimate]
    # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
    
    * tag 'block-pull-request' of https://gitlab.com/stefanha/qemu:
      aio-posix: zero out io_uring sqe user_data
      tests/qemu-iotests/197: add testcase for CoR with subclusters
      block/io: align requests to subcluster_size
      block: add subcluster_size field to BlockDriverInfo
      block-migration: Ensure we don't crash during migration cleanup
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Stefan Hajnoczi committed Aug 30, 2023
    Copy the full SHA
    156618d View commit details
    Browse the repository at this point in the history