Skip to content
Snippets Groups Projects
  1. Feb 14, 2023
  2. Feb 13, 2023
    • Peter Maydell's avatar
      Merge tag 'migration-20230213-pull-request' of https://gitlab.com/juan.quintela/qemu into staging · f670b3ee
      Peter Maydell authored
      
      Migration Pull request (take3)
      
      Hi
      
      In this PULL request:
      - Added to leonardo fixes:
      Fixes: b5eea99e ("migration: Add yank feature")
      Reported-by: default avatarLi Xiaohui <xiaohli@redhat.com>
      
      Please apply.
      
      [take 2]
      - rebase to latest upstream
      - fix compilation of linux-user (if have_system was missing) (me)
      - cleanup multifd_load_cleanup(leonardo)
      - Document RAM flags (me)
      
      Please apply.
      
      [take 1]
      This are all the reviewed patches for migration:
      - AVX512 support for xbzrle (Ling Xu)
      - /dev/userfaultd support (Peter Xu)
      - Improve ordering of channels (Peter Xu)
      - multifd cleanups (Li Zhang)
      - Remove spurious files from last merge (me)
        Rebase makes that to you
      - Fix mixup between state_pending_{exact,estimate} (me)
      - Cache RAM size during migration (me)
      - cleanup several functions (me)
      
      Please apply.
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmPppZYACgkQ9IfvGFhy
      # 1yPLvQ//f8D6txzFawaxrfzpSAHnq70Gx+B5GkIwgwB8nlPIC3QELEf5uooM/RGA
      # nSaUctUNOJUWqVGK3vp3jDIep02DzdIUrlOfy96h+pnTMpyMWFC2BexDfveVMUId
      # dw8WCWZkGCFDfIWuKF+GA8eTu6HM1ouzgCJrRmPtCqsikzAPkogPm60hQSTAQxm9
      # Kzdp1SXV1HmyA440vy8rtYf71BKpvb9OJFmwgZ+ICy0rc1aUmgJbKxkwyOgiI2lq
      # ONekpbOg7lzlFVAQu1QHTmYN13bsn4uzwUgdifn1PixFQyRE3AVs4jdTmqeLnoPe
      # Ac6j8v3pDOw/Xf4kpRWUmhkqTMEJt8/lyneJzu1mQkw0wwiUtDvknFgPG8wJsa+J
      # ZQr1cBXQj4IjtkN6+ixF7XYvx3T6pWz0L+/w2+TbFBdLWIrPgFH0yPYjhx7FdDid
      # cjUHyS1a0w9ngnXOxRG8+UNHWCpPOUhXeeiyNioogYZNKu77PFxJVDMe3eB6dXAB
      # pDfl4P129PloKAPafcz9E6Sxr+lIgrETZmsRJlRz4czg18TxlIukMlDtyrepNWti
      # GtIf9xTpP3JKjpHnKbWLaxP5VeFC7kQd0qas4VxD+tDjbJdUZdZMfHcOSS0SMRGe
      # q5LVEzMMIPCQJQIqiLEJ0HTUUOtB8i+bGoirNEbDqhLa/oZwPP8=
      # =TDnO
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 13 Feb 2023 02:51:02 GMT
      # gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>" [full]
      # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
      
      * tag 'migration-20230213-pull-request' of https://gitlab.com/juan.quintela/qemu
      
      : (22 commits)
        ram: Document migration ram flags
        migration/multifd: Move load_cleanup inside incoming_state_destroy
        migration/multifd: Join all multifd threads in order to avoid leaks
        migration/multifd: Remove unnecessary assignment on multifd_load_cleanup()
        migration/multifd: Change multifd_load_cleanup() signature and usage
        migration: Postpone postcopy preempt channel to be after main
        migration: Add a semaphore to count PONGs
        migration: Cleanup postcopy_preempt_setup()
        migration: Rework multi-channel checks on URI
        Update bench-code for addressing CI problem
        AVX512 support for xbzrle_encode_buffer
        migration: I messed state_pending_exact/estimate
        migration: Make ram_save_target_page() a pointer
        migration: Calculate ram size once
        migration: Split ram_bytes_total_common() in two functions
        migration: Make find_dirty_block() return a single parameter
        migration: Simplify ram_find_and_save_block()
        util/userfaultfd: Support /dev/userfaultfd
        linux-headers: Update to v6.1
        multifd: Remove some redundant code
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      f670b3ee
    • Juan Quintela's avatar
      ram: Document migration ram flags · 7b548761
      Juan Quintela authored
      
      0x80 is RAM_SAVE_FLAG_HOOK, it is in qemu-file now.
      Bigger usable flag is 0x200, noticing that.
      We can reuse RAM_SAVe_FLAG_FULL.
      
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      7b548761
    • Leonardo Bras's avatar
      migration/multifd: Move load_cleanup inside incoming_state_destroy · cfc3bcf3
      Leonardo Bras authored
      
      Currently running migration_incoming_state_destroy() without first running
      multifd_load_cleanup() will cause a yank error:
      
      qemu-system-x86_64: ../util/yank.c:107: yank_unregister_instance:
      Assertion `QLIST_EMPTY(&entry->yankfns)' failed.
      (core dumped)
      
      The above error happens in the target host, when multifd is being used
      for precopy, and then postcopy is triggered and the migration finishes.
      This will crash the VM in the target host.
      
      To avoid that, move multifd_load_cleanup() inside
      migration_incoming_state_destroy(), so that the load cleanup becomes part
      of the incoming state destroying process.
      
      Running multifd_load_cleanup() twice can become an issue, though, but the
      only scenario it could be ran twice is on process_incoming_migration_bh().
      So removing this extra call is necessary.
      
      On the other hand, this multifd_load_cleanup() call happens way before the
      migration_incoming_state_destroy() and having this happening before
      dirty_bitmap_mig_before_vm_start() and vm_start() may be a need.
      
      So introduce a new function multifd_load_shutdown() that will mainly stop
      all multifd threads and close their QIOChannels. Then use this function
      instead of multifd_load_cleanup() to make sure nothing else is received
      before dirty_bitmap_mig_before_vm_start().
      
      Fixes: b5eea99e ("migration: Add yank feature")
      Reported-by: default avatarLi Xiaohui <xiaohli@redhat.com>
      Signed-off-by: default avatarLeonardo Bras <leobras@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      cfc3bcf3
    • Leonardo Bras's avatar
      migration/multifd: Join all multifd threads in order to avoid leaks · 10351fba
      Leonardo Bras authored
      
      Current approach will only join threads that are still running.
      
      For the threads not joined, resources or private memory are always kept in
      the process space and never reclaimed before process end, and this risks
      serious memory leaks.
      
      This should usually not represent a big problem, since multifd migration
      is usually just ran at most a few times, and after it succeeds there is
      not much to be done before exiting the process.
      
      Yet still, it should not hurt performance to join all of them.
      
      Fixes: b5eea99e ("migration: Add yank feature")
      Reported-by: default avatarLi Xiaohui <xiaohli@redhat.com>
      Signed-off-by: default avatarLeonardo Bras <leobras@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      10351fba
    • Leonardo Bras's avatar
      migration/multifd: Remove unnecessary assignment on multifd_load_cleanup() · d926f3bb
      Leonardo Bras authored
      
      Before assigning "p->quit = true" for every multifd channel,
      multifd_load_cleanup() will call multifd_recv_terminate_threads() which
      already does the same assignment, while protected by a mutex.
      
      So there is no point doing the same assignment again.
      
      Fixes: b5eea99e ("migration: Add yank feature")
      Reported-by: default avatarLi Xiaohui <xiaohli@redhat.com>
      Signed-off-by: default avatarLeonardo Bras <leobras@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      d926f3bb
    • Leonardo Bras's avatar
      migration/multifd: Change multifd_load_cleanup() signature and usage · e5bac1f5
      Leonardo Bras authored
      
      Since it's introduction in commit f986c3d2 ("migration: Create multifd
      migration threads"), multifd_load_cleanup() never returned any value
      different than 0, neither set up any error on errp.
      
      Even though, on process_incoming_migration_bh() an if clause uses it's
      return value to decide on setting autostart = false, which will never
      happen.
      
      In order to simplify the codebase, change multifd_load_cleanup() signature
      to 'void multifd_load_cleanup(void)', and for every usage remove error
      handling or decision made based on return value != 0.
      
      Fixes: b5eea99e ("migration: Add yank feature")
      Reported-by: default avatarLi Xiaohui <xiaohli@redhat.com>
      Signed-off-by: default avatarLeonardo Bras <leobras@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      e5bac1f5
  3. Feb 11, 2023
  4. Feb 09, 2023
  5. Feb 08, 2023
    • Peter Maydell's avatar
      Merge tag 'pull-tricore-20230208' of https://github.com/bkoppelmann/qemu into staging · 65417c23
      Peter Maydell authored
      tricore insn bugfixes for qemu 8.0
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJTBAABCgA9FiEEbmNqfoPy3Qz6bm43CtLGOWtpyhQFAmPjZjUfHGtiYXN0aWFu
      # QG1haWwudW5pLXBhZGVyYm9ybi5kZQAKCRAK0sY5a2nKFHBmD/9r8dgNWWMYdXrC
      # PO9fNg1lk+zR9AfTBc7YonuNo/aRmoh48r36FCIKPVWIspyXaEpjyCUAA79Lmhw7
      # XGRqDbosa7TNSyQgOfqKyxAc7uISRBSFIQocbTCKTcpwcBpOUhSQFMjwc4yj1HGE
      # D7511nyPd4ekqTVzaLrXwWVIFdefW85F7DoXK2G5k7NyO1I2TBoFdbjosDff4cOu
      # T0ZYPTmZoSvUgP80WUyQPcs0lKk56oFqFsgjtqhmhdGf4FNxxrIMHNhJeZJsHt6I
      # aG1MZbVAyOAGXyLZmu6PFxVOckkoMMZMxXV6rMfgmztt8PxRcvzUu5DceovI2xt4
      # OQb6b13XwHB2ShUCqM8eQAQyAUMrYdjVMu5gLsO5rpzcZz+2cZmUUGXtjZojLRzY
      # m2IyCQIDjR6GlBnLqzD8lKWbW8c7v6bHnhyYZpy1K1I54/dsbia9Hl40v/Ebch5f
      # CYfgJQFe5CfkyY+Ya9bItTf/cfcnmOKpKhmFy3r005BzbSVWJ+Ax3AXKuRey5MF7
      # itHS2wVYq5Fap/SCS4slL/4u/Doo9DybwLRdTXtqMxUcl7WpyjA5L/W5VhJrDb+a
      # F21uAtqaYf+0UHLmGOJRMx3LAf/YvvPQLYO8FmnfVoS6t6V+/B5/eyXPRwmX1mJC
      # jLu6hzzX4kR9zZ7lNhOlv0d9vkt5Sg==
      # =83AO
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 08 Feb 2023 09:07:01 GMT
      # gpg:                using RSA key 6E636A7E83F2DD0CFA6E6E370AD2C6396B69CA14
      # gpg:                issuer "kbastian@mail.uni-paderborn.de"
      # gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>" [full]
      # Primary key fingerprint: 6E63 6A7E 83F2 DD0C FA6E  6E37 0AD2 C639 6B69 CA14
      
      * tag 'pull-tricore-20230208' of https://github.com/bkoppelmann/qemu
      
      :
        tests/tcg/tricore: Add test for ld.h
        target/tricore: Fix OPC1_16_SRO_LD_H translation
        tests/tcg/tricore: Add LD.BU tests
        target/tricore: Fix OPC2_32_BO_LD_BU_PREINC
        tests/tcg/tricore: Add OPC2_32_RRRR_DEXTR tests
        target/tricore: Fix OPC2_32_RRRR_DEXTR
        tests/tcg/tricore: Add tests for RRPW_DEXTR
        target/tricore: Fix RRPW_DEXTR
        tests/tcg/tricore: Add test for OPC2_32_RCRW_INSERT
        target/tricore: Fix OPC2_32_RCRW_INSERT translation
        tests/tcg/tricore: Add test for OPC2_32_RCRW_IMASK
        target/tricore: Fix OPC2_32_RCRW_IMASK translation
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      65417c23
    • Peter Maydell's avatar
      Merge tag 'pull-include-2023-02-06-v2' of https://repo.or.cz/qemu/armbru into staging · ae2b5d83
      Peter Maydell authored
      Header cleanup patches for 2023-02-06
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmPjQRUSHGFybWJydUBy
      # ZWRoYXQuY29tAAoJEDhwtADrkYZTWHwQAI5D2HTRt3peFSPg/tFuYqSGtOobzM5x
      # xdZxjWCtGV+dZ4TsyQ7yJkQ2i6aPjs0LzmTnTIsmf+p1OJSthvp4fQUzfXQauiJy
      # OnNA76v7WjiXB8u8tcXtEkkHNmccp8n4KMjk33TfK/HQVx7lZ2EFurlCkvBr5wki
      # FuDVad6R43ChmvBWdCUOi6G1IklAihm8AN4lBJu3iC7U8bjW4FmLLMitcu5OyKgt
      # v9V4XFAe4eYUIPZ6uH5Lpr5m/qtrRXLe9KOdRUR2vDVL18Cf6Zl7mrUNtv7iV5TI
      # hBOA12ZP5XXf81FXl7e8y3Xi2KXvb/el0wQ7SvtE7XB3Pdbfa5WSGKOc3VxYLmBA
      # 4xUnEbzAogrrruovdk1bmh2LnVzCH66m72xaLCHBvjOU3M6V2B0eeaZ35FxNuFcB
      # toHPAjeuzWkDAscVYcYKuPwnkNOMNqHxEdihrgy6mYLr6nauIYr7Lqgs3SqGqpct
      # /HGy683+J+AqnHFTk1MTRftDxqk/Nku6ntAxLXndkpm3uDvu+iV5d3BfK3A9t7d1
      # A2Y983DU6SiVwpMIv2eDL8sXYxuwIs56ZmPYIcSbqzpCXtdFqwWOTeFET/4vD+8t
      # V3YKJ27jmWQ9bxbLHGPPYSKheuCVBIGsqxouE/Pbj5nXRKm/TeGp+20a4dWdE08r
      # 2WTLAQbVQGD4
      # =5TPW
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 08 Feb 2023 06:28:37 GMT
      # gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
      # gpg:                issuer "armbru@redhat.com"
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * tag 'pull-include-2023-02-06-v2' of https://repo.or.cz/qemu/armbru
      
      :
        Drop duplicate #include
        Don't include headers already included by qemu/osdep.h
        Fix non-first inclusions of qemu/osdep.h
        accel: Clean up includes
        block: Clean up includes
        riscv: Clean up includes
        target/hexagon: Clean up includes
        net: Clean up includes
        migration: Clean up includes
        qga: Clean up includes
        hw/tricore: Clean up includes
        hw/input: Clean up includes
        hw/cxl: Clean up includes
        crypto: Clean up includes
        bsd-user: Clean up includes
        scripts/clean-includes: Improve --git commit message
        scripts/clean-includes: Skip symbolic links
        scripts/clean-includes: Don't claim duplicate headers found when not
        scripts/clean-includes: Fully skip / ignore files
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      ae2b5d83
    • Bastian Koppelmann's avatar
      tests/tcg/tricore: Add test for ld.h · 6e34f54d
      Bastian Koppelmann authored
      this exercises the error reported in
      https://gitlab.com/qemu-project/qemu/-/issues/652
      
      .
      
      Signed-off-by: default avatarBastian Koppelmann <kbastian@mail.uni-paderborn.de>
      Message-Id: <20230203132132.511254-1-kbastian@mail.uni-paderborn.de>
      Signed-off-by: default avatarBastian Koppelmann <kbastian@mail.uni-paderborn.de>
      6e34f54d
Loading