Skip to content
  1. Mar 15, 2024
  2. Mar 14, 2024
    • Fabiano Rosas's avatar
      migration: Fix iocs leaks during file and fd migration · 74228c59
      Fabiano Rosas authored and Peter Xu's avatar Peter Xu committed
      The memory for the io channels is being leaked in three different ways
      during file migration:
      
      1) if the offset check fails we never drop the ioc reference;
      
      2) we allocate an extra channel for no reason;
      
      3) if multifd is enabled but channel creation fails when calling
         dup(), we leave the previous channels around along with the glib
         polling;
      
      Fix all issues by restructuring the code to first allocate the
      channels and only register the watches when all channels have been
      created.
      
      For multifd, the file and fd migrations can share code because both
      are backed by a QIOChannelFile. For the non-multifd case, the fd needs
      to be separate because it is backed by a QIOChannelSocket.
      
      Fixes: 2dd7ee7a ("migration/multifd: Add incoming QIOChannelFile support")
      Fixes: decdc767
      
       ("migration/multifd: Add mapped-ram support to fd: URI")
      Reported-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
      Signed-off-by: default avatarFabiano Rosas <farosas@suse.de>
      Link: https://lore.kernel.org/r/20240313212824.16974-2-farosas@suse.de
      
      
      Signed-off-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
      74228c59
  3. Mar 13, 2024
  4. Mar 12, 2024
    • npiggin's avatar
      physmem: Fix migration dirty bitmap coherency with TCG memory access · 03bfc218
      npiggin authored and Peter Xu's avatar Peter Xu committed
      The fastpath in cpu_physical_memory_sync_dirty_bitmap() to test large
      aligned ranges forgot to bring the TCG TLB up to date after clearing
      some of the dirty memory bitmap bits. This can result in stores though
      the TCG TLB not setting the dirty memory bitmap and ultimately causes
      memory corruption / lost updates during migration from a TCG host.
      
      Fix this by calling cpu_physical_memory_dirty_bits_cleared() when
      dirty bits have been cleared.
      
      Fixes: aa8dc044
      
       ("migration: synchronize memory bitmap 64bits at a time")
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Tested-by: Thomas Huth's avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20240219061731.232570-1-npiggin@gmail.com>
      [PMD: Split patch in 2: part 2/2, slightly adapt description]
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Link: https://lore.kernel.org/r/20240312201458.79532-4-philmd@linaro.org
      
      
      Signed-off-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
      03bfc218
    • npiggin's avatar
      physmem: Factor cpu_physical_memory_dirty_bits_cleared() out · 86a9ae80
      npiggin authored and Peter Xu's avatar Peter Xu committed
      
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Tested-by: Thomas Huth's avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20240219061731.232570-1-npiggin@gmail.com>
      [PMD: Split patch in 2: part 1/2]
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Link: https://lore.kernel.org/r/20240312201458.79532-3-philmd@linaro.org
      
      
      Signed-off-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
      86a9ae80
    • Philippe Mathieu-Daudé's avatar
      physmem: Expose tlb_reset_dirty_range_all() · 7e8ccf99
      Philippe Mathieu-Daudé authored and Peter Xu's avatar Peter Xu committed
      
      
      In order to call tlb_reset_dirty_range_all() outside of
      system/physmem.c, expose its prototype.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Link: https://lore.kernel.org/r/20240312201458.79532-2-philmd@linaro.org
      
      
      Signed-off-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
      7e8ccf99
    • Fabiano Rosas's avatar
      migration: Fix error handling after dup in file migration · c827fafc
      Fabiano Rosas authored and Peter Xu's avatar Peter Xu committed
      The file migration code was allowing a possible -1 from a failed call
      to dup() to propagate into the new QIOFileChannel::fd before checking
      for validity. Coverity doesn't like that, possibly due to the the
      lseek(-1, ...) call that would ensue before returning from the channel
      creation routine.
      
      Use the newly introduced qio_channel_file_dupfd() to properly check
      the return of dup() before proceeding.
      
      Fixes: CID 1539961
      Fixes: CID 1539965
      Fixes: CID 1539960
      Fixes: 2dd7ee7a ("migration/multifd: Add incoming QIOChannelFile support")
      Fixes: decdc767
      
       ("migration/multifd: Add mapped-ram support to fd: URI")
      Reported-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatar"Daniel P. Berrangé" <berrange@redhat.com>
      Link: https://lore.kernel.org/r/20240311233335.17299-3-farosas@suse.de
      
      
      Signed-off-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
      c827fafc
    • Fabiano Rosas's avatar
      io: Introduce qio_channel_file_new_dupfd · 4760cedc
      Fabiano Rosas authored and Peter Xu's avatar Peter Xu committed
      
      
      Add a new helper function for creating a QIOChannelFile channel with a
      duplicated file descriptor. This saves the calling code from having to
      do error checking on the dup() call.
      
      Suggested-by: default avatar"Daniel P. Berrangé" <berrange@redhat.com>
      Signed-off-by: default avatarFabiano Rosas <farosas@suse.de>
      Reviewed-by: default avatar"Daniel P. Berrangé" <berrange@redhat.com>
      Link: https://lore.kernel.org/r/20240311233335.17299-2-farosas@suse.de
      
      
      Signed-off-by: Peter Xu's avatarPeter Xu <peterx@redhat.com>
      4760cedc
    • Peter Maydell's avatar
      Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging · 35ac6831
      Peter Maydell authored
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQEzBAABCAAdFiEEIV1G9IJGaJ7HfzVi7wSWWzmNYhEFAmXwPUAACgkQ7wSWWzmN
      # YhFnIwgAgctDniJwlRxXB01eVlzXz7IulHnpSby07XEJxENSpGB8ufaeE4eK5gJy
      # NVK6C2+1EU2vRxm4oIdcvtN4C4/jtRbYYjiSTx7eE4FmSkqshSnR5XCV72LDqG3i
      # WbzInjMvYfysmcMXLfrWgxOnVew9WqEzlpEWlc7FfNKnkzBVf+JDztfqCUx0XM7H
      # qefw4ImjqQw993QxJpipXC7aEGUyouB0RIBB71FkCa9ihlh9x7W68evbOI/jTn5q
      # HWuStgS02sKHjRFliMbdbMY77FNUz4Yroo/GKSvGt64atxkQSJqPNAV+/9n18LNy
      # QAH5eK6cXFPOIAaYpADU5kHDVVAFiw==
      # =iBdx
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 12 Mar 2024 11:32:16 GMT
      # gpg:                using RSA key 215D46F48246689EC77F3562EF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
      
      * tag 'net-pull-request' of https://github.com/jasowang/qemu
      
      :
        ebpf: Updated eBPF program and skeleton.
        qmp: Added new command to retrieve eBPF blob.
        virtio-net: Added property to load eBPF RSS with fds.
        ebpf: Added eBPF initialization by fds.
        ebpf: Added eBPF map update through mmap.
        Avoid unaligned fetch in ladr_match()
        e1000e: fix link state on resume
        igb: fix link state on resume
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      35ac6831
    • Peter Maydell's avatar
      Merge tag 'hw-misc-20240312' of https://github.com/philmd/qemu into staging · fe6d4434
      Peter Maydell authored
      Misc HW patch queue
      
      - Rename hw/ide/ahci-internal.h for consistency (Zoltan)
      - More convenient PCI hotplug trace events (Vladimir)
      - Short CLI option to add drives for sam460ex machine (Zoltan)
      - More missing ERRP_GUARD() macros (Zhao)
      - Avoid faulting when unmapped I/O BAR is accessed on SPARC EBUS (Mark)
      - Remove unused includes in hw/core/ (Zhao)
      - New PCF8574 GPIO over I2C model (Dmitriy)
      - Require ObjC on Darwin macOS by default (Peter)
      - Corrected "-smp parameter=1" placement in docs/ (Zhao)
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmXwEJkACgkQ4+MsLN6t
      # wN4A3hAAngVu7VmyrfqYF6jfDMUuRGYaKf4D73/KF6R1PsU+nJdN7UAkECLj8o7g
      # mkcAQu1U3fKCUssF6MJ2a3kU+rD1OkkA/ZcitzgWwEjCK8KVjtMt2HzEqX+B/X+e
      # RUVjXMOMkyV48MF0+yLhJz+lQiDpEBFVxIgssPBNUz1Pw9IfoXp29Bfz+bYBThS4
      # ywAdvCefNzSira0Nt6RWTnvgBHB/1+aLy1uMSt0Xu926zcqoxQJ0b//0flYL8vAf
      # JuSSZuiXPw+oAc3qG3d6aPl3g8DrFn3pvPD471KlFQAnB0dlhEZZqNBPvraySpHl
      # h04Y8teHYj9XfxPtaWfaEdgQCazdkKFR/q7E5c9GU00Rf469BJeuo9Pzkm4kWfbU
      # sbCl8em5biVZ5DpBIOMT3/D0JOyGf7/CM8y5c3Jc92hapx2NdSszkvCicrDE1+i0
      # zEr4N0P/F2x5KFVFkQ3Xzv2Jtzw+iXj6kSE5a5/64GMK29Mqu/EPaSkvwGDQOs3N
      # QJ9mpa4gg47g310a0/nH0i5eVbvGVuzcCMP6VXOBVr18cJ7JFQFFiYcvoTDXNQ2m
      # sq5xUelRimnWfKpawomJXkS+/j0usH61/aQBuDKfj45i8/XFRejCIk0gMWQ9hjyD
      # no1HqDN8CVXtiPNSinC7ctNHU5ClS0xO/BRl0h3PGC7Bl+A2eVY=
      # =JQg1
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 12 Mar 2024 08:21:45 GMT
      # gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
      # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
      # Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE
      
      * tag 'hw-misc-20240312' of https://github.com/philmd/qemu
      
      :
        docs/about/deprecated.rst: Move SMP configurations item to system emulator section
        meson.build: Always require an objc compiler on macos hosts
        hw/gpio: introduce pcf8574 driver
        hw/core: Cleanup unused included headers in numa.c
        hw/core: Cleanup unused included header in machine-qmp-cmds.c
        hw/core: Cleanup unused included headers in cpu-common.c
        sun4u: remap ebus BAR0 to use unassigned_io_ops instead of alias to PCI IO space
        hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend()
        hw/core/qdev-properties-system: Fix missing ERRP_GUARD() for error_prepend()
        hw/core/loader-fit: Fix missing ERRP_GUARD() for error_prepend()
        hw/ppc/sam460ex: Support short options for adding drives
        hw/pci: add some convenient trace-events for pcie and shpc hotplug
        hw/ide/ahci: Rename ahci_internal.h to ahci-internal.h
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      fe6d4434
    • Peter Maydell's avatar
      Merge tag 'migration-20240311-pull-request' of https://gitlab.com/peterx/qemu into staging · 8f3f329f
      Peter Maydell authored
      Migration pull request
      
      - Avihai's fix to allow vmstate iterators to not starve for VFIO
      - Maksim's fix on additional check on precopy load error
      - Fabiano's fix on fdatasync() hang in mapped-ram
      - Jonathan's fix on vring cached access over MMIO regions
      - Cedric's cleanup patches 1-4 out of his error report series
      - Yu's fix for RDMA migration (which used to be broken even for 8.2)
      - Anthony's small cleanup/fix on err message
      - Steve's patches on privatize migration.h
      - Xiang's patchset to enable zero page detections in multifd threads
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZe9+uBIccGV0ZXJ4QHJl
      # ZGhhdC5jb20ACgkQO1/MzfOr1wamaQD/SvmpMEcuRndT9LPSxzXowAGDZTBpYUfv
      # 5XAbx80dS9IBAO8PJJgQJIBHBeacyLBjHP9CsdVtgw5/VW+wCsbfV4AB
      # =xavb
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 11 Mar 2024 21:59:20 GMT
      # gpg:                using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706
      # gpg:                issuer "peterx@redhat.com"
      # gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [marginal]
      # gpg:                 aka "Peter Xu <peterx@redhat.com>" [marginal]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D  D1A9 3B5F CCCD F3AB D706
      
      * tag 'migration-20240311-pull-request' of https://gitlab.com/peterx/qemu
      
      : (34 commits)
        migration/multifd: Add new migration test cases for legacy zero page checking.
        migration/multifd: Enable multifd zero page checking by default.
        migration/multifd: Implement ram_save_target_page_multifd to handle multifd version of MigrationOps::ram_save_target_page.
        migration/multifd: Implement zero page transmission on the multifd thread.
        migration/multifd: Add new migration option zero-page-detection.
        migration/multifd: Allow clearing of the file_bmap from multifd
        migration/multifd: Allow zero pages in file migration
        migration: purge MigrationState from public interface
        migration: delete unused accessors
        migration: privatize colo interfaces
        migration: migration_file_set_error
        migration: migration_is_device
        migration: migration_thread_is_self
        migration: export vcpu_dirty_limit_period
        migration: export migration_is_running
        migration: export migration_is_active
        migration: export migration_is_setup_or_active
        migration: remove migration.h references
        migration: export fewer options
        migration: Fix format in error message
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      8f3f329f
    • Peter Maydell's avatar
      Merge tag 'pull-target-arm-20240311' of... · 1c268991
      Peter Maydell authored
      Merge tag 'pull-target-arm-20240311' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
      
      target-arm queue:
       * contrib/elf2dmp: Improve robustness to corrupt input files
       * docs: update copyright date to the year 2024
       * hw/arm: Deprecate various old Arm machine types
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmXvV4gZHHBldGVyLm1h
      # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3oe5EACvvve9LOJ7UA4teEbn8zzs
      # O7GGsycpu3XWINX98sUi5Cuu+uexkcXsHf2Vg8GABj2fUuA+EEqPIdIWZhVcfB2t
      # RYGPgat/JVTwRUsl38OQ97l4joI2JeW18B20Pmh4/2tbZCJuIHoiHxxb+3aQl6Nl
      # gz/H137ayy+Q5utt1b6z1qXnw4etiUhk4wg2ltGVtAw63w5GZOvamTicSQ1DC3ZP
      # zfbIKW2WpGNjzrC1tCvaW/dNojt2blpZbsnpdPsL8cNE8puo01FnFLsUZCzOtu3m
      # 23uoQq0KjQZBJrU2oZMtshc+sKT/FGPADJ9B+J8jjU0EY6cV+Qo7FT4E78mxzoR0
      # JbY9SLATtY7RE1Fbh3/Am+3OEyb3ZDor5nCux0CWOsuFoBk96dzD7r5MXxM2eft1
      # pGmdJStYysZkdlSyx61bu6OifHOaGjnOe+lYWpaCrVy1U3cO3hbMWH2siSQygppM
      # 8EfjyfadzfST+nAnXfduSgWMv7Nc4ql4GIOxVnMIfGig32PIp545IvM9neh6GIp/
      # 8fzw6TdoCQkHcWaazV1ibPF0ceH6JwRvLIMkWlNpr/QBSNdsx+zkdh7WZD+3S91U
      # XrCAA7hgf7OIvHauSD0ucSbztIiFRMROcHxIoh0ui6BermtaD6fnlei4QcsJI17o
      # 6XZSNSWm5/+JEsn+dcVh4g==
      # =UHyi
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 11 Mar 2024 19:12:08 GMT
      # gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
      # gpg:                issuer "peter.maydell@linaro.org"
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
      # gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [ultimate]
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * tag 'pull-target-arm-20240311' of https://git.linaro.org/people/pmaydell/qemu-arm
      
      :
        docs: update copyright date to the year 2024
        contrib/elf2dmp: Ensure phdrs fit in file
        contrib/elf2dmp: Clamp QEMU note to file size
        contrib/elf2dmp: Use GPtrArray
        MAINTAINERS: Add Akihiko Odaki as a elf2dmp reviewer
        contrib/elf2dmp: Use rol64() to decode
        contrib/elf2dmp: Use lduw_le_p() to read PDB
        contrib/elf2dmp: Ensure segment fits in file
        contrib/elf2dmp: Always destroy PA space
        contrib/elf2dmp: Always check for PA resolution failure
        contrib/elf2dmp: Fix error reporting style in main.c
        contrib/elf2dmp: Fix error reporting style in qemu_elf.c
        contrib/elf2dmp: Fix error reporting style in pdb.c
        contrib/elf2dmp: Fix error reporting style in download.c
        contrib/elf2dmp: Fix error reporting style in addrspace.c
        contrib/elf2dmp: Change pa_space_create() signature
        contrib/elf2dmp: Continue even contexts are lacking
        contrib/elf2dmp: Assume error by default
        contrib/elf2dmp: Remove unnecessary err flags
        hw/arm: Deprecate various old Arm machine types
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      1c268991
    • Andrew Melnychenko's avatar
      ebpf: Updated eBPF program and skeleton. · 0cc14182
      Andrew Melnychenko authored and Jason Wang's avatar Jason Wang committed
      
      
      Updated section name, so libbpf should init/gues proper
      program type without specifications during open/load.
      Also, added map_flags with explicitly declared BPF_F_MMAPABLE.
      Added check for BPF_F_MMAPABLE flag to meson script and
      requirements to libbpf version.
      Also changed fragmentation flag check - some TCP/UDP packets
      may be considered fragmented if DF flag is set.
      
      Signed-off-by: default avatarAndrew Melnychenko <andrew@daynix.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      0cc14182
    • Andrew Melnychenko's avatar
      qmp: Added new command to retrieve eBPF blob. · e88899fa
      Andrew Melnychenko authored and Jason Wang's avatar Jason Wang committed
      Now, the binary objects may be retrieved by id.
      It would require for future qmp commands that may require specific
      eBPF blob.
      
      Added command "request-ebpf". This command returns
      eBPF program encoded base64. The program taken from the
      skeleton and essentially is an ELF object that can be
      loaded in the future with libbpf.
      
      The reason to use the command to provide the eBPF object
      instead of a separate artifact was to avoid issues related
      to finding the eBPF itself. eBPF object is an ELF binary
      that contains the eBPF program and eBPF map description(BTF).
      Overall, eBPF object should contain the program and enough
      metadata to create/load eBPF with libbpf. As the eBPF
      maps/program should correspond to QEMU, the eBPF can't
      be used from different QEMU build.
      
      The first solution was a helper that comes with QEMU
      and loads appropriate eBPF objects. And the issue is
      to find a proper helper if the system has several
      different QEMUs installed and/or built from the source,
      which helpers may not be compatible.
      
      Another issue is QEMU updating while there is a running
      QEMU instance. With an updated helper, it may not be
      possible to hotplug virtio-net device to the already
      running QEMU. Overall, requesting the eBPF object from
      QEMU itself solves possible failures with acceptable effort.
      
      Links:
      [PATCH 3/5] qmp: Added the helper stamp check.
      https://lore.kernel.org/all/20230219162100.174318-4-andrew@daynix.com/
      
      
      
      Signed-off-by: default avatarAndrew Melnychenko <andrew@daynix.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      e88899fa
    • Andrew Melnychenko's avatar
      virtio-net: Added property to load eBPF RSS with fds. · 6b230b7d
      Andrew Melnychenko authored and Jason Wang's avatar Jason Wang committed
      
      
      eBPF RSS program and maps may now be passed during initialization.
      Initially was implemented for libvirt to launch qemu without permissions,
      and initialized eBPF program through the helper.
      
      Signed-off-by: default avatarAndrew Melnychenko <andrew@daynix.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      6b230b7d
    • Andrew Melnychenko's avatar
      ebpf: Added eBPF initialization by fds. · 0524ea05
      Andrew Melnychenko authored and Jason Wang's avatar Jason Wang committed
      
      
      It allows using file descriptors of eBPF provided
      outside of QEMU.
      QEMU may be run without capabilities for eBPF and run
      RSS program provided by management tool(g.e. libvirt).
      
      Signed-off-by: default avatarAndrew Melnychenko <andrew@daynix.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      0524ea05
    • Andrew Melnychenko's avatar
      ebpf: Added eBPF map update through mmap. · 333b3e5f
      Andrew Melnychenko authored and Jason Wang's avatar Jason Wang committed
      
      
      Changed eBPF map updates through mmaped array.
      Mmaped arrays provide direct access to map data.
      It should omit using bpf_map_update_elem() call,
      which may require capabilities that are not present.
      
      Signed-off-by: default avatarAndrew Melnychenko <andrew@daynix.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      333b3e5f
    • Nick Briggs's avatar
      Avoid unaligned fetch in ladr_match() · 6a5287ce
      Nick Briggs authored and Jason Wang's avatar Jason Wang committed
      There is no guarantee that the PCNetState is allocated such that
      csr[8] is allocated on an 8-byte boundary.  Since not all hosts are
      capable of unaligned fetches the 16-bit elements need to be fetched
      individually to avoid a potential fault.  Closes issue #2143
      
      Resolves: qemu-project/qemu#2143
      
      
      Signed-off-by: default avatarNick Briggs <nicholas.h.briggs@gmail.com>
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      6a5287ce
    • Laurent Vivier's avatar
      e1000e: fix link state on resume · 4cadf102
      Laurent Vivier authored and Jason Wang's avatar Jason Wang committed
      On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume()
      that sets link_down to false, and thus activates the link even
      if we have disabled it.
      
      The problem can be reproduced starting qemu in paused state (-S) and
      then set the link to down. When we resume the machine the link appears
      to be up.
      
      Reproducer:
      
         # qemu-system-x86_64 ... -device e1000e,netdev=netdev0,id=net0 -S
      
         {"execute": "qmp_capabilities" }
         {"execute": "set_link", "arguments": {"name": "net0", "up": false}}
         {"execute": "cont" }
      
      To fix the problem, merge the content of e1000e_vm_state_change()
      into e1000e_core_post_load() as e1000 does.
      
      Buglink: https://issues.redhat.com/browse/RHEL-21867
      Fixes: 6f3fbe4e
      
       ("net: Introduce e1000e device emulation")
      Suggested-by: default avatarAkihiko Odaki <akihiko.odaki@daynix.com>
      Signed-off-by: Laurent Vivier's avatarLaurent Vivier <lvivier@redhat.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      4cadf102
    • Laurent Vivier's avatar
      igb: fix link state on resume · 65c2ab80
      Laurent Vivier authored and Jason Wang's avatar Jason Wang committed
      On resume igb_vm_state_change() always calls igb_autoneg_resume()
      that sets link_down to false, and thus activates the link even
      if we have disabled it.
      
      The problem can be reproduced starting qemu in paused state (-S) and
      then set the link to down. When we resume the machine the link appears
      to be up.
      
      Reproducer:
      
         # qemu-system-x86_64 ... -device igb,netdev=netdev0,id=net0 -S
      
         {"execute": "qmp_capabilities" }
         {"execute": "set_link", "arguments": {"name": "net0", "up": false}}
         {"execute": "cont" }
      
      To fix the problem, merge the content of igb_vm_state_change()
      into igb_core_post_load() as e1000 does.
      
      Buglink: https://issues.redhat.com/browse/RHEL-21867
      Fixes: 3a977dee
      
       ("Intrdocue igb device emulation")
      Cc: akihiko.odaki@daynix.com
      Suggested-by: default avatarAkihiko Odaki <akihiko.odaki@daynix.com>
      Signed-off-by: Laurent Vivier's avatarLaurent Vivier <lvivier@redhat.com>
      Signed-off-by: Jason Wang's avatarJason Wang <jasowang@redhat.com>
      65c2ab80
    • Zhao Liu's avatar
      docs/about/deprecated.rst: Move SMP configurations item to system emulator section · afc8b05c
      Zhao Liu authored and Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé committed
      In the commit 54c4ea8f
      
       ("hw/core/machine-smp: Deprecate unsupported
      'parameter=1' SMP configurations"), the SMP related item is put under
      the section "User-mode emulator command line arguments" instead of
      "System emulator command line arguments".
      
      -smp is a system emulator command, so move SMP configurations item to
      system emulator section.
      
      Signed-off-by: default avatarZhao Liu <zhao1.liu@intel.com>
      Reviewed-by: Thomas Huth's avatarThomas Huth <thuth@redhat.com>
      Message-ID: <20240312071512.3283513-1-zhao1.liu@linux.intel.com>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      afc8b05c
  5. Mar 11, 2024