Skip to content
Snippets Groups Projects
  1. Aug 31, 2023
  2. Aug 30, 2023
  3. Aug 29, 2023
  4. Aug 28, 2023
  5. Aug 24, 2023
  6. Aug 23, 2023
  7. Aug 22, 2023
  8. Aug 09, 2023
  9. Aug 08, 2023
  10. Aug 07, 2023
  11. Aug 03, 2023
    • Thomas Huth's avatar
      include/hw/i386/x86-iommu: Fix struct X86IOMMU_MSIMessage for big endian hosts · e1e56c07
      Thomas Huth authored
      
      The first bitfield here is supposed to be used as a 64-bit equivalent
      to the "uint64_t msi_addr" in the union. To make this work correctly
      on big endian hosts, too, the __addr_hi field has to be part of the
      bitfield, and the the bitfield members must be declared with "uint64_t"
      instead of "uint32_t" - otherwise the values are placed in the wrong
      bytes on big endian hosts.
      
      Same applies to the 32-bit "msi_data" field: __resved1 must be part
      of the bitfield, and the members must be declared with "uint32_t"
      instead of "uint16_t".
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20230802135723.178083-7-thuth@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      e1e56c07
    • Thomas Huth's avatar
      hw/i386/intel_iommu: Fix endianness problems related to VTD_IR_TableEntry · 642ba896
      Thomas Huth authored
      
      The code already tries to do some endianness handling here, but
      currently fails badly:
      - While it already swaps the data when logging errors / tracing, it fails
        to byteswap the value before e.g. accessing entry->irte.present
      - entry->irte.source_id is swapped with le32_to_cpu(), though this is
        a 16-bit value
      - The whole union is apparently supposed to be swapped via the 64-bit
        data[2] array, but the struct is a mixture between 32 bit values
        (the first 8 bytes) and 64 bit values (the second 8 bytes), so this
        cannot work as expected.
      
      Fix it by converting the struct to two proper 64-bit bitfields, and
      by swapping the values only once for everybody right after reading
      the data from memory.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <20230802135723.178083-3-thuth@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      642ba896
    • Milan Zamazal's avatar
      hw/virtio: Add a protection against duplicate vu_scmi_stop calls · 63a3520e
      Milan Zamazal authored
      
      The QEMU CI fails in virtio-scmi test occasionally.  As reported by
      Thomas Huth, this happens most likely when the system is loaded and it
      fails with the following error:
      
        qemu-system-aarch64: ../../devel/qemu/hw/pci/msix.c:659:
        msix_unset_vector_notifiers: Assertion `dev->msix_vector_use_notifier && dev->msix_vector_release_notifier' failed.
        ../../devel/qemu/tests/qtest/libqtest.c:200: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped)
      
      As discovered by Fabiano Rosas, the cause is a duplicate invocation of
      msix_unset_vector_notifiers via duplicate vu_scmi_stop calls:
      
        msix_unset_vector_notifiers
        virtio_pci_set_guest_notifiers
        vu_scmi_stop
        vu_scmi_disconnect
        ...
        qemu_chr_write_buffer
      
        msix_unset_vector_notifiers
        virtio_pci_set_guest_notifiers
        vu_scmi_stop
        vu_scmi_set_status
        ...
        qemu_cleanup
      
      While vu_scmi_stop calls are protected by vhost_dev_is_started()
      check, it's apparently not enough.  vhost-user-blk and vhost-user-gpio
      use an extra protection, see f5b22d06 (vhost: recheck dev state in
      the vhost_migration_log routine) for the motivation.  Let's use the
      same in vhost-user-scmi, which fixes the failure above.
      
      Fixes: a5dab090 ("hw/virtio: Add boilerplate for vhost-user-scmi device")
      Signed-off-by: default avatarMilan Zamazal <mzamazal@redhat.com>
      Message-Id: <20230720101037.2161450-1-mzamazal@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      Reviewed-by: default avatarFabiano Rosas <farosas@suse.de>
      63a3520e
  12. Aug 01, 2023
  13. Jul 26, 2023
  14. Jul 25, 2023
Loading