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: a543b30740f6
Choose a base ref
...
head repository: qemu/qemu
compare: cf51ff87b7f7
Choose a head ref
  • 4 commits
  • 8 files changed
  • 2 contributors

Commits on Jul 26, 2023

  1. virtio-pci: add handling of PCI ATS and Device-TLB enable/disable

    According to PCIe Address Translation Services specification 5.1.3.,
    ATS Control Register has Enable bit to enable/disable ATS. Guest may
    enable/disable PCI ATS and, accordingly, Device-TLB for the VirtIO PCI
    device. So, raise/lower a flag and call a trigger function to pass this
    event to a device implementation.
    
    Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
    Message-Id: <20230512135122.70403-2-viktor@daynix.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    (cherry picked from commit 206e91d)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    (Mjt: include/hw/virtio/virtio.h: skip extra struct field added in 8.0)
    viktor-prutyanov authored and Michael Tokarev committed Jul 26, 2023
    Copy the full SHA
    ddf405b View commit details
    Browse the repository at this point in the history
  2. vhost: register and change IOMMU flag depending on Device-TLB state

    The guest can disable or never enable Device-TLB. In these cases,
    it can't be used even if enabled in QEMU. So, check Device-TLB state
    before registering IOMMU notifier and select unmap flag depending on
    that. Also, implement a way to change IOMMU notifier flag if Device-TLB
    state is changed.
    
    Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2001312
    Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
    Acked-by: Jason Wang <jasowang@redhat.com>
    Message-Id: <20230626091258.24453-2-viktor@daynix.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    (cherry picked from commit ee071f6)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    viktor-prutyanov authored and Michael Tokarev committed Jul 26, 2023
    Copy the full SHA
    f8fc8e6 View commit details
    Browse the repository at this point in the history
  3. virtio-net: pass Device-TLB enable/disable events to vhost

    If vhost is enabled for virtio-net, Device-TLB enable/disable events
    must be passed to vhost for proper IOMMU unmap flag selection.
    
    Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
    Acked-by: Jason Wang <jasowang@redhat.com>
    Message-Id: <20230626091258.24453-3-viktor@daynix.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    (cherry picked from commit cd9b834)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    viktor-prutyanov authored and Michael Tokarev committed Jul 26, 2023
    Copy the full SHA
    b7a54f7 View commit details
    Browse the repository at this point in the history
  4. hw/arm/smmu: Handle big-endian hosts correctly

    The implementation of the SMMUv3 has multiple places where it reads a
    data structure from the guest and directly operates on it without
    doing a guest-to-host endianness conversion.  Since all SMMU data
    structures are little-endian, this means that the SMMU doesn't work
    on a big-endian host.  In particular, this causes the Avocado test
      machine_aarch64_virt.py:Aarch64VirtMachine.test_alpine_virt_tcg_gic_max
    to fail on an s390x host.
    
    Add appropriate byte-swapping on reads and writes of guest in-memory
    data structures so that the device works correctly on big-endian
    hosts.
    
    As part of this we constrain queue_read() to operate only on Cmd
    structs and queue_write() on Evt structs, because in practice these
    are the only data structures the two functions are used with, and we
    need to know what the data structure is to be able to byte-swap its
    parts correctly.
    
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    Tested-by: Thomas Huth <thuth@redhat.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Eric Auger <eric.auger@redhat.com>
    Message-id: 20230717132641.764660-1-peter.maydell@linaro.org
    Cc: qemu-stable@nongnu.org
    (cherry picked from commit c644554)
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    pm215 authored and Michael Tokarev committed Jul 26, 2023
    Copy the full SHA
    cf51ff8 View commit details
    Browse the repository at this point in the history