qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9aa47e: vhost-vdpa: negotiate VIRTIO_NET_F_ST


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 9aa47e: vhost-vdpa: negotiate VIRTIO_NET_F_STATUS with driver
Date: Sun, 01 Nov 2020 11:05:19 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9aa47edd4ee69fa0628c5f9adb52d5050a5bce6a
      
https://github.com/qemu/qemu/commit/9aa47edd4ee69fa0628c5f9adb52d5050a5bce6a
  Author: Si-Wei Liu <si-wei.liu@oracle.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: negotiate VIRTIO_NET_F_STATUS with driver

Vendor driver may not support or implement config
interrupt delivery for link status notifications.
In this event, vendor driver is expected to NACK
the feature, but guest will keep link always up.

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Message-Id: <1601582985-14944-1-git-send-email-si-wei.liu@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 384c2561bddfa00cd3eaf9edbc1af6c7c120511f
      
https://github.com/qemu/qemu/commit/384c2561bddfa00cd3eaf9edbc1af6c7c120511f
  Author: Stefano Garzarella <sgarzare@redhat.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

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

  Log Message:
  -----------
  vhost-vsock: set vhostfd to non-blocking mode

vhost IOTLB API uses read()/write() to exchange iotlb messages with
the kernel module.
The QEMU implementation expects a non-blocking fd, indeed commit
c471ad0e9b ("vhost_net: device IOTLB support") set it for vhost-net.

Without this patch, if we enable iommu for the vhost-vsock device,
QEMU can hang when exchanging IOTLB messages.

As commit 894022e616 ("net: check if the file descriptor is valid
before using it") did for tap, let's use qemu_try_set_nonblock()
when fd is provided by the user.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20201029144849.70958-1-sgarzare@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: acab9d8a9e31cc85ec95e5432500575680e7f07b
      
https://github.com/qemu/qemu/commit/acab9d8a9e31cc85ec95e5432500575680e7f07b
  Author: Ben Widawsky <ben.widawsky@intel.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

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

  Log Message:
  -----------
  acpi/crs: Prevent bad ranges for host bridges

Prevent _CRS resources being quietly chopped off and instead throw an
assertion. _CRS is used by host bridges to declare regions of io and/or
memory that they consume. On some (all?) platforms the host bridge
doesn't have PCI header space and so they need some way to convey the
information.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>

Message-Id: <20201026193924.985014-1-ben.widawsky@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>


  Commit: 9390255468e33811e6791d5afef3113a40770aba
      
https://github.com/qemu/qemu/commit/9390255468e33811e6791d5afef3113a40770aba
  Author: Ben Widawsky <ben.widawsky@intel.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

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

  Log Message:
  -----------
  acpi/crs: Support ranges > 32b for hosts

According to PCIe spec 5.0 Type 1 header space Base Address Registers
are defined by 7.5.1.2.1 Base Address Registers (same as Type 0). The
_CRS region should allow for the same range (up to 64b). Prior to this
change, any host bridge utilizing more than 32b for the BAR would have
the address truncated and likely lead to conflicts when the operating
systems reads the _CRS object.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>

Message-Id: <20201026193924.985014-2-ben.widawsky@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>


  Commit: 8acb3218b98c5f1bc02597ce5985fd02da7af0b1
      
https://github.com/qemu/qemu/commit/8acb3218b98c5f1bc02597ce5985fd02da7af0b1
  Author: Philippe Mathieu-Daudé <philmd@redhat.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

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

  Log Message:
  -----------
  hw/virtio/vhost-vdpa: Fix Coverity CID 1432864

Fix uninitialized value issues reported by Coverity:

  Field 'msg.reserved' is uninitialized when calling write().

Fixes: a5bd05800f8 ("vhost-vdpa: batch updating IOTLB mappings")
Reported-by: Coverity (CID 1432864: UNINIT)
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201028154004.776760-1-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b06fe3e703f833866914c03c3fb0acc02385c824
      
https://github.com/qemu/qemu/commit/b06fe3e703f833866914c03c3fb0acc02385c824
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  hw/pci: Extract pci_bus_change_irq_level() from pci_change_irq_level()

Extract pci_bus_change_irq_level() from pci_change_irq_level() to
make it clearer it operates on the bus.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201024203900.3619498-2-f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 459ca8bfa41b42b9d80739929f09f792207f15f3
      
https://github.com/qemu/qemu/commit/459ca8bfa41b42b9d80739929f09f792207f15f3
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: Assert irqnum is between 0 and bus->nirqs in pci_bus_change_irq_level

These assertions similar to those in the adjacent pci_bus_get_irq_level()
function ensure that irqnum lies within the valid PCI bus IRQ range.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20201011082022.3016-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201024203900.3619498-3-f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 170a6794efde98fb1ad70f59d4cd9af7decf279d
      
https://github.com/qemu/qemu/commit/170a6794efde98fb1ad70f59d4cd9af7decf279d
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: Don't special case vq->used_phys in vhost_get_log_size()

The first loop in vhost_get_log_size() computes the size of the dirty log
bitmap so that it allows to track changes in the entire guest memory, in
terms of GPA.

When not using a vIOMMU, the address of the vring's used structure,
vq->used_phys, is a GPA. It is thus already covered by the first loop.

When using a vIOMMU, vq->used_phys is a GIOVA that will be translated
to an HVA when the vhost backend needs to update the used structure. It
will log the corresponding GPAs into the bitmap but it certainly won't
log the GIOVA.

So in any case, vq->used_phys shouldn't be explicitly used to size the
bitmap. Drop the second loop.

This fixes a crash of the source when migrating a guest using in-kernel
vhost-net and iommu_platform=on on POWER, because DMA regions are put
over 0x800000000000000ULL. The resulting insanely huge log size causes
g_malloc0() to abort.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1879349
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <160208823418.29027.15172801181796272300.stgit@bahia.lan>
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: 0259c78ca79190df6e307a6ae43886dcb69eb92a
      
https://github.com/qemu/qemu/commit/0259c78ca79190df6e307a6ae43886dcb69eb92a
  Author: Eduardo Habkost <ehabkost@redhat.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M include/hw/i386/pc.h
    M include/hw/i386/x86.h
    M softmmu/vl.c

  Log Message:
  -----------
  pc: Implement -no-hpet as sugar for -machine hpet=on

Get rid of yet another global variable.

The default will be hpet=on only if CONFIG_HPET=y.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20201021144716.1536388-1-ehabkost@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4c70875372b821b045e84f462466a5c04b091ef5
      
https://github.com/qemu/qemu/commit/4c70875372b821b045e84f462466a5c04b091ef5
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pci: advertise a page aligned ATS

After Linux kernel commit 61363c1474b1 ("iommu/vt-d: Enable ATS only
if the device uses page aligned address."), ATS will be only enabled
if device advertises a page aligned request.

Unfortunately, vhost-net is the only user and we don't advertise the
aligned request capability in the past since both vhost IOTLB and
address_space_get_iotlb_entry() can support non page aligned request.

Though it's not clear that if the above kernel commit makes
sense. Let's advertise a page aligned ATS here to make vhost device
IOTLB work with Intel IOMMU again.

Note that in the future we may extend pcie_ats_init() to accept
parameters like queue depth and page alignment.

Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20200909081731.24688-1-jasowang@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 2c729dc8ceaab88f213c7724de0fa181ffc7f078
      
https://github.com/qemu/qemu/commit/2c729dc8ceaab88f213c7724de0fa181ffc7f078
  Author: Ben Widawsky <ben.widawsky@intel.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: Change error_report to assert(3)

Asserts are used for developer bugs. As registering a bar of the wrong
size is not something that should be possible for a user to achieve,
this is a developer bug.

While here, use the more obvious helper function.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Message-Id: <20201015181411.89104-1-ben.widawsky@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


  Commit: 6a5b19ca63b1795011f53244f2fd9a2cf8189b72
      
https://github.com/qemu/qemu/commit/6a5b19ca63b1795011f53244f2fd9a2cf8189b72
  Author: Ben Widawsky <ben.widawsky@intel.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: Disallow improper BAR registration for type 1

Prevent future developers working on root complexes, root ports, or
bridges that also wish to implement a BAR for those, from shooting
themselves in the foot. PCI type 1 headers only support 2 base address
registers. It is incorrect and difficult to figure out what is wrong
with the device when this mistake is made. With this, it is immediate
and obvious what has gone wrong.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Message-Id: <20201015181411.89104-2-ben.widawsky@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: adb29c027341ba095a3ef4beef6aaef86d3a520e
      
https://github.com/qemu/qemu/commit/adb29c027341ba095a3ef4beef6aaef86d3a520e
  Author: Jin Yu <jin.yu@intel.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/block/vhost-user-blk.c
    M hw/virtio/vhost.c
    M include/hw/virtio/vhost.h

  Log Message:
  -----------
  vhost-blk: set features before setting inflight feature

Virtqueue has split and packed, so before setting inflight,
you need to inform the back-end virtqueue format.

Signed-off-by: Jin Yu <jin.yu@intel.com>
Message-Id: <20200910134851.7817-1-jin.yu@intel.com>
Acked-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d68cdae30eef62dde61c8b8467a96c01c8f80270
      
https://github.com/qemu/qemu/commit/d68cdae30eef62dde61c8b8467a96c01c8f80270
  Author: Felipe Franciosi <felipe@nutanix.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: skip guest index check on device load

QEMU must be careful when loading device state off migration streams to
prevent a malicious source from exploiting the emulator. Overdoing these
checks has the side effect of allowing a guest to "pin itself" in cloud
environments by messing with state which is entirely in its control.

Similarly to what f3081539 achieved in usb_device_post_load(), this
commit removes such a check from virtio_load(). Worth noting, the result
of a load without this check is the same as if a guest enables a VQ with
invalid indexes to begin with. That is, the virtual device is set in a
broken state (by the datapath handler) and must be reset.

Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
Message-Id: <20201028134643.110698-1-felipe@nutanix.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: 73beb01ec54969f76ab32d1e0605a759b6c95ab0
      
https://github.com/qemu/qemu/commit/73beb01ec54969f76ab32d1e0605a759b6c95ab0
  Author: Peter Xu <peterx@redhat.com>
  Date:   2020-10-30 (Fri, 30 Oct 2020)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  intel_iommu: Fix two misuse of "0x%u" prints

Dave magically found this.  Fix them with "0x%x".

Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20201019173922.100270-1-peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@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: 700d20b49e303549b32d3a7a3efbfcee8c7a4f6c
      
https://github.com/qemu/qemu/commit/700d20b49e303549b32d3a7a3efbfcee8c7a4f6c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-11-01 (Sun, 01 Nov 2020)

  Changed paths:
    M hw/block/vhost-user-blk.c
    M hw/i386/acpi-build.c
    M hw/i386/intel_iommu.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/pci/pci.c
    M hw/pci/pcie.c
    M hw/virtio/vhost-vdpa.c
    M hw/virtio/vhost-vsock.c
    M hw/virtio/vhost.c
    M hw/virtio/virtio.c
    M include/hw/i386/pc.h
    M include/hw/i386/x86.h
    M include/hw/virtio/vhost.h
    M net/vhost-vdpa.c
    M softmmu/vl.c

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

pc,pci,vhost,virtio: misc fixes

Just a bunch of bugfixes all over the place.

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

# gpg: Signature made Fri 30 Oct 2020 12:44:31 GMT
# 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:
  intel_iommu: Fix two misuse of "0x%u" prints
  virtio: skip guest index check on device load
  vhost-blk: set features before setting inflight feature
  pci: Disallow improper BAR registration for type 1
  pci: Change error_report to assert(3)
  pci: advertise a page aligned ATS
  pc: Implement -no-hpet as sugar for -machine hpet=on
  vhost: Don't special case vq->used_phys in vhost_get_log_size()
  pci: Assert irqnum is between 0 and bus->nirqs in pci_bus_change_irq_level
  hw/pci: Extract pci_bus_change_irq_level() from pci_change_irq_level()
  hw/virtio/vhost-vdpa: Fix Coverity CID 1432864
  acpi/crs: Support ranges > 32b for hosts
  acpi/crs: Prevent bad ranges for host bridges
  vhost-vsock: set vhostfd to non-blocking mode
  vhost-vdpa: negotiate VIRTIO_NET_F_STATUS with driver

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


Compare: https://github.com/qemu/qemu/compare/2ab6c4943396...700d20b49e30



reply via email to

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