qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e6db5d: vhost-vdpa: Do not send empty IOTLB u


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] e6db5d: vhost-vdpa: Do not send empty IOTLB update batches
Date: Sun, 05 Sep 2021 07:54:08 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: e6db5df7e2c6e64846f47a6785a9a67f08574790
      
https://github.com/qemu/qemu/commit/e6db5df7e2c6e64846f47a6785a9a67f08574790
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost-vdpa.c
    M include/hw/virtio/vhost-vdpa.h

  Log Message:
  -----------
  vhost-vdpa: Do not send empty IOTLB update batches

With the introduction of the batch hinting, meaningless batches can be
created with no IOTLB updates if the memory region was skipped by
vhost_vdpa_listener_skipped_section. This is the case of host notifiers
memory regions, device un/realize, and others. This causes the vdpa
device to receive dma mapping settings with no changes, a possibly
expensive operation for nothing.

To avoid that, VHOST_IOTLB_BATCH_BEGIN hint is delayed until we have a
meaningful (not skipped section) mapping or unmapping operation, and
VHOST_IOTLB_BATCH_END is not written unless at least one of _UPDATE /
_INVALIDATE has been issued.

v3:
  * Use a bool instead of a counter avoiding potential number wrapping
  * Fix bad check on _commit
  * Move VHOST_BACKEND_F_IOTLB_BATCH check to
    vhost_vdpa_iotlb_batch_begin_once

v2 (from RFC):
  * Rename misleading name
  * Abstract start batching function for listener_add/del

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20210812140933.226288-1-eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 1f89d3b91e3e222e468d98057f5eaf8ebac0e7bf
      
https://github.com/qemu/qemu/commit/1f89d3b91e3e222e468d98057f5eaf8ebac0e7bf
  Author: Yajun Wu <yajunw@nvidia.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  hw/virtio: Fix leak of host-notifier memory-region

If call virtio_queue_set_host_notifier_mr fails, should free
host-notifier memory-region.

Fixes: 44866521bd ("vhost-user: support registering external host notifiers")
Signed-off-by: Yajun Wu <yajunw@nvidia.com>
Message-Id: <1629077555-19907-1-git-send-email-yajunw@nvidia.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 699f2e535d930017153423e0f326b34b29ad1f54
      
https://github.com/qemu/qemu/commit/699f2e535d930017153423e0f326b34b29ad1f54
  Author: Denis Plotnikov <den-plotnikov@yandex-team.ru>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  vhost: make SET_VRING_ADDR, SET_FEATURES send replies

On vhost-user-blk migration, qemu normally sends a number of commands
to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated.
Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and
VHOST_USER_SET_VRING_ADDR per each started ring to enable "used ring"
data logging.
The issue is that qemu doesn't wait for reply from the vhost daemon
for these commands which may result in races between qemu expectation
of logging starting and actual login starting in vhost daemon.

The race can appear as follows: on migration setup, qemu enables dirty page
logging by sending VHOST_USER_SET_FEATURES. The command doesn't arrive to a
vhost-user-blk daemon immediately and the daemon needs some time to turn the
logging on internally. If qemu doesn't wait for reply, after sending the
command, qemu may start migrateing memory pages to a destination. At this time,
the logging may not be actually turned on in the daemon but some guest pages,
which the daemon is about to write to, may have already been transferred
without logging to the destination. Since the logging wasn't turned on,
those pages won't be transferred again as dirty. So we may end up with
corrupted data on the destination.
The same scenario is applicable for "used ring" data logging, which is
turned on with VHOST_USER_SET_VRING_ADDR command.

To resolve this issue, this patch makes qemu wait for the command result
explicitly if VHOST_USER_PROTOCOL_F_REPLY_ACK is negotiated and logging enabled.

Signed-off-by: Denis Plotnikov <den-plotnikov@yandex-team.ru>

Message-Id: <20210809104824.78830-1-den-plotnikov@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: aa29466b48cdae3c42fb305f135d1bfb884b9930
      
https://github.com/qemu/qemu/commit/aa29466b48cdae3c42fb305f135d1bfb884b9930
  Author: Ani Sinha <ani@anisinha.ca>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/acpi/ich9.c
    M hw/acpi/piix4.c
    M hw/i386/acpi-build.c
    M hw/i386/pc.c
    M hw/i386/pc_q35.c
    M include/hw/acpi/acpi.h

  Log Message:
  -----------
  hw/acpi: define PIIX4 acpi pci hotplug property strings at a single place

Now that we have "acpi-pci-hotplug-with-bridge-support" PIIX4 PM property being
used for both q35 and i440fx machine types, it is better that we defined this
property string at a single place within a header file like other PIIX4
properties. We can then use this single definition at all the places that needs
it instead of duplicating the string everywhere. While at it, this change also
adds a definition for "acpi-root-pci-hotplug" PIIX4 PM property and uses
this definition at all places that were formally using the string value.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20210816083214.105740-1-ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 67cebca328ab86d00ff0ecfc5dc59228a0d3256e
      
https://github.com/qemu/qemu/commit/67cebca328ab86d00ff0ecfc5dc59228a0d3256e
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/isa/lpc_ich9.c

  Log Message:
  -----------
  q35: catch invalid cpu hotplug configuration

Related: https://bugzilla.redhat.com//show_bug.cgi?id=1985924
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210812102341.3316254-1-kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: fe8adae3455c3e43473bc23b00d257f6d41d24c3
      
https://github.com/qemu/qemu/commit/fe8adae3455c3e43473bc23b00d257f6d41d24c3
  Author: Ani Sinha <ani@anisinha.ca>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M configs/devices/mips-softmmu/common.mak
    M hw/acpi/Kconfig
    A hw/acpi/acpi-cpu-hotplug-stub.c
    A hw/acpi/acpi-mem-hotplug-stub.c
    A hw/acpi/acpi-nvdimm-stub.c
    A hw/acpi/acpi-pci-hotplug-stub.c
    M hw/acpi/meson.build

  Log Message:
  -----------
  hw/acpi: refactor acpi hp modules so that targets can just use what they need

Currently various acpi hotplug modules like cpu hotplug, memory hotplug, pci
hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is turned on.
This brings in support for whole lot of subsystems that some targets like
mips does not need. They are added just to satisfy symbol dependencies. This
is ugly and should be avoided. Targets should be able to pull in just what they
need and no more. For example, mips only needs support for PIIX4 and does not
need acpi pci hotplug support or cpu hotplug support or memory hotplug support
etc. This change is an effort to clean this up.
In this change, new config variables are added for various acpi hotplug
subsystems. Targets like mips can only enable PIIX4 support and not the rest
of all the other modules which were being previously pulled in as a part of
CONFIG_ACPI_X86. Function stubs make sure that symbols which piix4 needs but
are not required by mips (for example, symbols specific to pci hotplug etc)
are available to satisfy the dependencies.

Currently, this change only addresses issues with mips malta targets. In future
we might be able to clean up other targets which are similarly pulling in lot
of unnecessary hotplug modules by enabling ACPI_X86.

This change should also address issues such as the following:
https://gitlab.com/qemu-project/qemu/-/issues/221
https://gitlab.com/qemu-project/qemu/-/issues/193

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20210812071409.492299-1-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 9b1d929adb24bc4e613447c0fcc70479154e488f
      
https://github.com/qemu/qemu/commit/9b1d929adb24bc4e613447c0fcc70479154e488f
  Author: Tiberiu Georgescu <tiberiu.georgescu@nutanix.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost-backend.c
    M hw/virtio/vhost.c
    M include/hw/virtio/vhost-backend.h
    M include/hw/virtio/vhost.h

  Log Message:
  -----------
  hw/virtio: move vhost_set_backend_type() to vhost.c

Just a small refactor patch.

vhost_set_backend_type() gets called only in vhost.c, so we can move the
function there and make it static. We can then extern the visibility of
kernel_ops, to match the other VhostOps in vhost-backend.h.
The VhostOps constants now make more sense in vhost.h

Suggested-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Tiberiu Georgescu <tiberiu.georgescu@nutanix.com>
Message-Id: <20210809134015.67941-1-tiberiu.georgescu@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: edb40732bfb2e1a1a38e6249a9497012b181c6a8
      
https://github.com/qemu/qemu/commit/edb40732bfb2e1a1a38e6249a9497012b181c6a8
  Author: Alyssa Ross <hi@alyssa.is>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  vhost-user: add missing space in error message

This would previously give error messages like

> Received unexpected msg type.Expected 0 received 1

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20210806143926.315725-1-hi@alyssa.is>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3a83db5df34090d872dc1dccf36064849f8f90eb
      
https://github.com/qemu/qemu/commit/3a83db5df34090d872dc1dccf36064849f8f90eb
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M include/hw/acpi/generic_event_device.h

  Log Message:
  -----------
  acpi: Delete broken ACPI_GED_X86 macro

The macro never worked and never will, because the
AcpiGedX86State type never existed.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20210805193431.307761-2-ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b914e741e91ad2b1515dcded57ff5a5e07ec353d
      
https://github.com/qemu/qemu/commit/b914e741e91ad2b1515dcded57ff5a5e07ec353d
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/pci-host/i440fx.c

  Log Message:
  -----------
  Use PCI_HOST_BRIDGE macro

OBJECT_CHECK(PciHostState, ..., TYPE_PCI_HOST_BRIDGE) is exactly
what the PCI_HOST_BRIDGE macro does.  We can just use the macro
instead of using OBJECT_CHECK manually.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20210805193431.307761-7-ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: fd51e54fa10221e5a8add894c38cc1cf199f4bc4
      
https://github.com/qemu/qemu/commit/fd51e54fa10221e5a8add894c38cc1cf199f4bc4
  Author: David Hildenbrand <david@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/virtio-balloon.c

  Log Message:
  -----------
  virtio-balloon: don't start free page hinting if postcopy is possible

Postcopy never worked properly with 'free-page-hint=on', as there are
at least two issues:

1) With postcopy, the guest will never receive a VIRTIO_BALLOON_CMD_ID_DONE
   and consequently won't release free pages back to the OS once
   migration finishes.

   The issue is that for postcopy, we won't do a final bitmap sync while
   the guest is stopped on the source and
   virtio_balloon_free_page_hint_notify() will only call
   virtio_balloon_free_page_done() on the source during
   PRECOPY_NOTIFY_CLEANUP, after the VM state was already migrated to
   the destination.

2) Once the VM touches a page on the destination that has been excluded
   from migration on the source via qemu_guest_free_page_hint() while
   postcopy is active, that thread will stall until postcopy finishes
   and all threads are woken up. (with older Linux kernels that won't
   retry faults when woken up via userfaultfd, we might actually get a
   SEGFAULT)

   The issue is that the source will refuse to migrate any pages that
   are not marked as dirty in the dirty bmap -- for example, because the
   page might just have been sent. Consequently, the faulting thread will
   stall, waiting for the page to be migrated -- which could take quite
   a while and result in guest OS issues.

While we could fix 1) comparatively easily, 2) is harder to get right and
might require more involved RAM migration changes on source and destination
[1].

As it never worked properly, let's not start free page hinting in the
precopy notifier if the postcopy migration capability was enabled to fix
it easily. Capabilities cannot be enabled once migration is already
running.

Note 1: in the future we might either adjust migration code on the source
        to track pages that have actually been sent or adjust
        migration code on source and destination  to eventually send
        pages multiple times from the source and and deal with pages
        that are sent multiple times on the destination.

Note 2: virtio-mem has similar issues, however, access to "unplugged"
        memory by the guest is very rare and we would have to be very
        lucky for it to happen during migration. The spec states
        "The driver SHOULD NOT read from unplugged memory blocks ..."
        and "The driver MUST NOT write to unplugged memory blocks".
        virtio-mem will move away from virtio_balloon_free_page_done()
        soon and handle this case explicitly on the destination.

[1] https://lkml.kernel.org/r/e79fd18c-aa62-c1d8-c7f3-ba3fc2c25fc8@redhat.com

Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT")
Cc: qemu-stable@nongnu.org
Cc: Wei Wang <wei.w.wang@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210708095339.20274-2-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>


  Commit: 2d050ed07c97a88202dac3eef64263e1f2556bfe
      
https://github.com/qemu/qemu/commit/2d050ed07c97a88202dac3eef64263e1f2556bfe
  Author: David Hildenbrand <david@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/virtio-balloon.c

  Log Message:
  -----------
  virtio-balloon: free page hinting cleanups

Let's compress the code a bit to improve readability. We can drop the
vm_running check in virtio_balloon_free_page_start() as it's already
properly checked in the single caller.

Cc: Wei Wang <wei.w.wang@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210708095339.20274-3-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: dd014b4f4967e85c021033193d70d7526b7214cb
      
https://github.com/qemu/qemu/commit/dd014b4f4967e85c021033193d70d7526b7214cb
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/virtio-bus.c
    M include/hw/virtio/virtio-bus.h

  Log Message:
  -----------
  virtio-bus: introduce iommu_enabled()

This patch introduce a new method for the virtio-bus for the transport
to report whether or not the IOMMU is enabled for the device.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210804034803.1644-2-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3d1e5d86feab9402be448ab3bc507ae21acfa298
      
https://github.com/qemu/qemu/commit/3d1e5d86feab9402be448ab3bc507ae21acfa298
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/virtio-pci.c

  Log Message:
  -----------
  virtio-pci: implement iommu_enabled()

This patch implements the PCI transport version of iommu_enabled. This
is done by comparing the address space returned by
pci_device_iommu_address_space() against address_space_memory.

Note that an ideal approach is to use pci_device_iommu_address_space()
in get_dma_as(), but it might not work well since the IOMMU could be
initialized after the virtio-pci device is initialized.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210804034803.1644-3-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ae4003738ff0e1e5e6e6ff6e7c593bb443d5df04
      
https://github.com/qemu/qemu/commit/ae4003738ff0e1e5e6e6ff6e7c593bb443d5df04
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: correctly detect the enabling IOMMU

Vhost used to compare the dma_as against the address_space_memory to
detect whether the IOMMU is enabled or not. This might not work well
since the virito-bus may call get_dma_as if VIRTIO_F_IOMMU_PLATFORM is
set without an actual IOMMU enabled when device is plugged. In the
case of PCI where pci_get_address_space() is used, the bus master as
is returned. So vhost actually tries to enable device IOTLB even if
the IOMMU is not enabled. This will lead a lots of unnecessary
transactions between vhost and Qemu and will introduce a huge drop of
the performance.

For PCI, an ideal approach is to use pci_device_iommu_address_space()
just for get_dma_as. But Qemu may choose to initialize the IOMMU after
the virtio-pci which lead a wrong address space is returned during
device plugged. So this patch switch to use transport specific way via
iommu_enabled() to detect the IOMMU during vhost start. In this case,
we are fine since we know the IOMMU is initialized correctly.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210804034803.1644-4-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: e77af21a7a28e7b39f8e1f9b46d26d23d9a2396a
      
https://github.com/qemu/qemu/commit/e77af21a7a28e7b39f8e1f9b46d26d23d9a2396a
  Author: Jingqi Liu <jingqi.liu@intel.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/i386/pc.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  hw/i386/acpi-build: Get NUMA information from struct NumaState

Since commits aa57020774b ("numa: move numa global variable
nb_numa_nodes into MachineState") and 7e721e7b10e ("numa: move
numa global variable numa_info into MachineState"), we can get
NUMA information completely from MachineState::numa_state.

Remove PCMachineState::numa_nodes and PCMachineState::node_mem,
since they are just copied from MachineState::numa_state.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
Message-Id: <20210823011254.28506-1-jingqi.liu@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 6c1ebe75ae7a9f873c40b9582d7f14c6fe4129ea
      
https://github.com/qemu/qemu/commit/6c1ebe75ae7a9f873c40b9582d7f14c6fe4129ea
  Author: Ani Sinha <ani@anisinha.ca>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/pci-host/i440fx.c
    M include/hw/pci-host/i440fx.h
    M stubs/meson.build
    R stubs/pci-host-piix.c

  Log Message:
  -----------
  hw/pci: remove all references to find_i440fx function

commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed all
uses of find_i440fx() function. This has been replaced by the more generic call
acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx
machine type as well as for the q35 machine type. There seems to be no more any
need to maintain a i440fx specific version of the api call. Remove it.

Tested by building from a clean tree successfully.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210825031949.919376-2-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 028f1a88ab1fff40aa134192da609943f7f67a5e
      
https://github.com/qemu/qemu/commit/028f1a88ab1fff40aa134192da609943f7f67a5e
  Author: Ani Sinha <ani@anisinha.ca>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/acpi/pcihp.c

  Log Message:
  -----------
  hw/acpi: use existing references to pci device struct within functions

There is no need to use fresh typecasts to get references to pci device structs
when there is an existing reference to pci device struct. Use existing 
reference.
Minor cleanup.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210825031949.919376-3-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c2ea98c3172149a119d81bca9c9a99ccfa36ea37
      
https://github.com/qemu/qemu/commit/c2ea98c3172149a119d81bca9c9a99ccfa36ea37
  Author: Ani Sinha <ani@anisinha.ca>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Added myself as a reviewer for acpi/smbios subsystem

I have developed an interest in this space and hopefully can lend some
helping hand to Igor and Michael in reviewing simpler patches.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20210825031949.919376-4-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7f51beddadbc7d879a4f0979c1cf330f7010161a
      
https://github.com/qemu/qemu/commit/7f51beddadbc7d879a4f0979c1cf330f7010161a
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  hw/virtio: Document virtio_queue_packed_empty_rcu is called within RCU

While virtio_queue_packed_empty_rcu() uses the '_rcu' suffix,
it is not obvious it is called within rcu_read_lock(). All other
functions from this file called with the RCU locked have a comment
describing it. Document this one similarly for consistency.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210826172658.2116840-2-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: b116d6c319661b59d0461f771f407e47f54a8c80
      
https://github.com/qemu/qemu/commit/b116d6c319661b59d0461f771f407e47f54a8c80
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  hw/virtio: Remove NULL check in virtio_free_region_cache()

virtio_free_region_cache() is called within call_rcu(),
always with a non-NULL argument. Ensure new code keep it
that way by replacing the NULL check by an assertion.
Add a comment this function is called within call_rcu().

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210826172658.2116840-3-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: c6effa9cf59f0191865f2f65d8a7398abff0490f
      
https://github.com/qemu/qemu/commit/c6effa9cf59f0191865f2f65d8a7398abff0490f
  Author: Yuwei Zhang <zhangyuwei.9149@bytedance.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  hw/virtio: Add flatview update in vhost_user_cleanup()

Qemu will crash on vhost backend unexpected exit and re-connect                 
                                                         │
in some case due to access released memory.

Signed-off-by: Yuwei Zhang <zhangyuwei.9149@bytedance.com>
Message-Id: <20210830123433.45727-1-zhangyuwei.9149@bytedance.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f88435148dd38a9c609de348abc9ae231f2dbfc0
      
https://github.com/qemu/qemu/commit/f88435148dd38a9c609de348abc9ae231f2dbfc0
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M tests/vhost-user-bridge.c

  Log Message:
  -----------
  tests/vhost-user-bridge.c: Sanity check socket path length

The vhost-user-bridge binary accepts a UNIX socket path on
the command line. Sanity check that this is short enough to
fit into a sockaddr_un before copying it in.

Fixes: Coverity CID 1432866
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210901152632.25511-1-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 6b3dc992592db5f8a5c1a1c9bdf4a9973d062e7b
      
https://github.com/qemu/qemu/commit/6b3dc992592db5f8a5c1a1c9bdf4a9973d062e7b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M tests/vhost-user-bridge.c

  Log Message:
  -----------
  tests/vhost-user-bridge.c: Fix typo in help message

Fix a typo in the help message printed by vhost-user-bridge.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210901152713.25701-1-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 12021b53a42301915dfd27081b4b43370787fe38
      
https://github.com/qemu/qemu/commit/12021b53a42301915dfd27081b4b43370787fe38
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: remove unused variable "acked_features"

"acked_features" is unused, let's remove that.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-2-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 2a83e97ee89d17ba843b6dbabdd139a508e122c5
      
https://github.com/qemu/qemu/commit/2a83e97ee89d17ba843b6dbabdd139a508e122c5
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/virtio/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: correctly return err in vhost_vdpa_set_backend_cap()

We should return error code instead of zero, otherwise there's no way
for the caller to detect the failure.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-3-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 40f962ffeba627cd65121a7b2883f145e79c9c4c
      
https://github.com/qemu/qemu/commit/40f962ffeba627cd65121a7b2883f145e79c9c4c
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  vhost_net: remove the meaningless assignment in vhost_net_start_one()

The nvqs and vqs have been initialized during vhost_net_init() and are
not expected to change during the life cycle of vhost_net
structure. So this patch removes the meaningless assignment.

Reviewed-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-4-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 5fc13603a6bec4451cf1062ae6bdb6a2ab81a69c
      
https://github.com/qemu/qemu/commit/5fc13603a6bec4451cf1062ae6bdb6a2ab81a69c
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M include/hw/virtio/vhost.h

  Log Message:
  -----------
  vhost: use unsigned int for nvqs

Switch to use unsigned int for nvqs since it's not expected to be
negative.

Reviewed-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-5-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 6a756d1495fc0a852b119f7ecbb7a20131f0aba7
      
https://github.com/qemu/qemu/commit/6a756d1495fc0a852b119f7ecbb7a20131f0aba7
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M hw/net/vhost_net.c
    M include/net/vhost_net.h
    M net/tap.c
    M net/vhost-user.c
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost_net: do not assume nvqs is always 2

This patch switches to initialize dev.nvqs from the VhostNetOptions
instead of assuming it was 2. This is useful for implementing control
virtqueue support which will be a single vhost_net structure with a
single cvq.

Note that nvqs is still set to 2 for all users and this patch does not
change functionality.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-6-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 9ff7a54bcf9cc2ecb7433a971d4e28199b539fd2
      
https://github.com/qemu/qemu/commit/9ff7a54bcf9cc2ecb7433a971d4e28199b539fd2
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()

The VhostVDPAState is just allocated by qemu_new_net_client() via
g_malloc0() in net_vhost_vdpa_init(). So s->vhost_net is NULL for
sure, let's remove this unnecessary check in vhost_vdpa_add().

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-7-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f47a47e458bc12fbc2dc940ad9bb6cb8199f75bd
      
https://github.com/qemu/qemu/commit/f47a47e458bc12fbc2dc940ad9bb6cb8199f75bd
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: don't cleanup twice in vhost_vdpa_add()

The previous vhost_net_cleanup is sufficient for freeing, calling
vhost_vdpa_del() in this case will lead an extra round of free. Note
that this kind of "double free" is safe since vhost_dev_cleanup() zero
the whole structure.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-8-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ab36edcfeaa292ca4c49c7ebb505f122ef06f9cc
      
https://github.com/qemu/qemu/commit/ab36edcfeaa292ca4c49c7ebb505f122ef06f9cc
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()

Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-9-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a97ef87a205ee957c367ebc7621bd9860ad6047d
      
https://github.com/qemu/qemu/commit/a97ef87a205ee957c367ebc7621bd9860ad6047d
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: tweak the error label in vhost_vdpa_add()

Introduce new error label to avoid the unnecessary checking of net
pointer.

Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-10-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 74af5eec832f56d6565415d3bb879a75d5f80190
      
https://github.com/qemu/qemu/commit/74af5eec832f56d6565415d3bb879a75d5f80190
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()

Vhost_vdpa_add() can fail for various reasons, so the assertion of the
succeed is wrong. Instead, we should free the NetClientState and
propagate the error to the caller

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-11-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 499c8b4de96eecc554a03e452226f79f169a233b
      
https://github.com/qemu/qemu/commit/499c8b4de96eecc554a03e452226f79f169a233b
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-09-04 (Sat, 04 Sep 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: remove the unncessary queue_index assignment

The queue_index of NetClientState should be assigned in set_netdev()
afterwards, so trying to net_vhost_vdpa_init() is meaningless. This
patch removes this.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20210903091031.47303-12-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 88afdc92b644120e0182c8567e1b1d236e471b12
      
https://github.com/qemu/qemu/commit/88afdc92b644120e0182c8567e1b1d236e471b12
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-09-05 (Sun, 05 Sep 2021)

  Changed paths:
    M MAINTAINERS
    M configs/devices/mips-softmmu/common.mak
    M hw/acpi/Kconfig
    A hw/acpi/acpi-cpu-hotplug-stub.c
    A hw/acpi/acpi-mem-hotplug-stub.c
    A hw/acpi/acpi-nvdimm-stub.c
    A hw/acpi/acpi-pci-hotplug-stub.c
    M hw/acpi/ich9.c
    M hw/acpi/meson.build
    M hw/acpi/pcihp.c
    M hw/acpi/piix4.c
    M hw/i386/acpi-build.c
    M hw/i386/pc.c
    M hw/i386/pc_q35.c
    M hw/isa/lpc_ich9.c
    M hw/net/vhost_net.c
    M hw/pci-host/i440fx.c
    M hw/virtio/vhost-backend.c
    M hw/virtio/vhost-user.c
    M hw/virtio/vhost-vdpa.c
    M hw/virtio/vhost.c
    M hw/virtio/virtio-balloon.c
    M hw/virtio/virtio-bus.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio.c
    M include/hw/acpi/acpi.h
    M include/hw/acpi/generic_event_device.h
    M include/hw/i386/pc.h
    M include/hw/pci-host/i440fx.h
    M include/hw/virtio/vhost-backend.h
    M include/hw/virtio/vhost-vdpa.h
    M include/hw/virtio/vhost.h
    M include/hw/virtio/virtio-bus.h
    M include/net/vhost_net.h
    M net/tap.c
    M net/vhost-user.c
    M net/vhost-vdpa.c
    M stubs/meson.build
    R stubs/pci-host-piix.c
    M tests/vhost-user-bridge.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pc,pci,virtio: fixes, cleanups

Fixes, cleanups all over the place.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Sat 04 Sep 2021 22:34:10 BST
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream: (35 commits)
  vhost-vdpa: remove the unncessary queue_index assignment
  vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()
  vhost-vdpa: tweak the error label in vhost_vdpa_add()
  vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()
  vhost-vdpa: don't cleanup twice in vhost_vdpa_add()
  vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()
  vhost_net: do not assume nvqs is always 2
  vhost: use unsigned int for nvqs
  vhost_net: remove the meaningless assignment in vhost_net_start_one()
  vhost-vdpa: correctly return err in vhost_vdpa_set_backend_cap()
  vhost-vdpa: remove unused variable "acked_features"
  tests/vhost-user-bridge.c: Fix typo in help message
  tests/vhost-user-bridge.c: Sanity check socket path length
  hw/virtio: Add flatview update in vhost_user_cleanup()
  hw/virtio: Remove NULL check in virtio_free_region_cache()
  hw/virtio: Document virtio_queue_packed_empty_rcu is called within RCU
  MAINTAINERS: Added myself as a reviewer for acpi/smbios subsystem
  hw/acpi: use existing references to pci device struct within functions
  hw/pci: remove all references to find_i440fx function
  hw/i386/acpi-build: Get NUMA information from struct NumaState
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/31ebff513fad...88afdc92b644



reply via email to

[Prev in Thread] Current Thread [Next in Thread]