qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 2b5de4: vdpa: Remove status in reset tracing


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 2b5de4: vdpa: Remove status in reset tracing
Date: Tue, 11 Jul 2023 01:38:57 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 2b5de4d7dff457d34b57fcf3f985a41ddc0db062
      
https://github.com/qemu/qemu/commit/2b5de4d7dff457d34b57fcf3f985a41ddc0db062
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  vdpa: Remove status in reset tracing

It is always 0 and it is not useful to route call through file
descriptor.

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


  Commit: ee071f67f7a103c66f85f68ffe083712929122e3
      
https://github.com/qemu/qemu/commit/ee071f67f7a103c66f85f68ffe083712929122e3
  Author: Viktor Prutyanov <viktor@daynix.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  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>


  Commit: cd9b8346884353ba9ae6560b44b7cccdf00a6633
      
https://github.com/qemu/qemu/commit/cd9b8346884353ba9ae6560b44b7cccdf00a6633
  Author: Viktor Prutyanov <viktor@daynix.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  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>


  Commit: ee3729d9b088a1988cd6b0a7738fad644fbbc415
      
https://github.com/qemu/qemu/commit/ee3729d9b088a1988cd6b0a7738fad644fbbc415
  Author: Erico Nunes <ernunes@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/display/virtio-gpu-base.c
    M hw/display/virtio-gpu.c
    M include/hw/virtio/virtio-gpu.h

  Log Message:
  -----------
  virtio-gpu: refactor generate_edid function to virtio_gpu_base

This functionality can be shared with upcoming use in vhost-user-gpu, so
move it to the shared file to avoid duplicating it.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230626164708.1163239-2-ernunes@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 50cbd5b4b37de3f474495c5fd6a66d5c0e8e49c2
      
https://github.com/qemu/qemu/commit/50cbd5b4b37de3f474495c5fd6a66d5c0e8e49c2
  Author: Erico Nunes <ernunes@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M docs/interop/vhost-user-gpu.rst

  Log Message:
  -----------
  docs: vhost-user-gpu: add protocol changes for EDID

VHOST_USER_GPU_GET_EDID is defined as a message from the backend to the
frontend to retrieve the EDID data for a given scanout.

The VHOST_USER_GPU_PROTOCOL_F_EDID protocol feature is defined as a way
to check whether this new message is supported or not.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230626164708.1163239-3-ernunes@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c06444261e20f5c74962db08638b021e6ca2ad43
      
https://github.com/qemu/qemu/commit/c06444261e20f5c74962db08638b021e6ca2ad43
  Author: Erico Nunes <ernunes@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M contrib/vhost-user-gpu/vhost-user-gpu.c
    M contrib/vhost-user-gpu/virgl.c
    M contrib/vhost-user-gpu/vugpu.h

  Log Message:
  -----------
  contrib/vhost-user-gpu: implement get_edid feature

Implement the virtio-gpu feature in contrib/vhost-user-gpu, which was
unsupported until now.
In this implementation, the feature is enabled inconditionally to avoid
creating another optional config argument.
Similarly to get_display_info, vhost-user-gpu sends a message back to
the frontend to have access to all the display information. In the
case of get_edid, it also needs to pass which scanout we should
retrieve the edid for.

The VHOST_USER_GPU_PROTOCOL_F_EDID protocol feature is required if the
frontend sets the VIRTIO_GPU_F_EDID virtio-gpu feature. If the frontend
sets the virtio-gpu feature but does not support the protocol feature,
the backend will abort with an error.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230626164708.1163239-4-ernunes@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 31f137e3d6c596883ecd572ff3c53eb03b0e87c7
      
https://github.com/qemu/qemu/commit/31f137e3d6c596883ecd572ff3c53eb03b0e87c7
  Author: Erico Nunes <ernunes@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/display/vhost-user-gpu.c

  Log Message:
  -----------
  vhost-user-gpu: implement get_edid frontend feature

Implement the frontend side of the get_edid feature in the qemu
vhost-user-gpu frontend device.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230626164708.1163239-5-ernunes@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a5dab090e1425929a1a5a3034768cb33dab69bf4
      
https://github.com/qemu/qemu/commit/a5dab090e1425929a1a5a3034768cb33dab69bf4
  Author: Milan Zamazal <mzamazal@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M MAINTAINERS
    M hw/virtio/Kconfig
    M hw/virtio/meson.build
    A hw/virtio/vhost-user-scmi.c
    A include/hw/virtio/vhost-user-scmi.h

  Log Message:
  -----------
  hw/virtio: Add boilerplate for vhost-user-scmi device

This creates the QEMU side of the vhost-user-scmi device which connects to
the remote daemon.  It is based on code of similar vhost-user devices.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Message-Id: <20230628100524.342666-2-mzamazal@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c46b20cf83ed5088626671447e214de165ca5297
      
https://github.com/qemu/qemu/commit/c46b20cf83ed5088626671447e214de165ca5297
  Author: Milan Zamazal <mzamazal@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/virtio/meson.build
    A hw/virtio/vhost-user-scmi-pci.c

  Log Message:
  -----------
  hw/virtio: Add vhost-user-scmi-pci boilerplate

This allows is to instantiate a vhost-user-scmi device as part of a PCI bus.
It is mostly boilerplate similar to the other vhost-user-*-pci boilerplates
of similar devices.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Message-Id: <20230628100524.342666-3-mzamazal@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b6f53ae005a1c05034769beebf799e861b82d48a
      
https://github.com/qemu/qemu/commit/b6f53ae005a1c05034769beebf799e861b82d48a
  Author: Milan Zamazal <mzamazal@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M MAINTAINERS
    M tests/qtest/libqos/meson.build
    A tests/qtest/libqos/virtio-scmi.c
    A tests/qtest/libqos/virtio-scmi.h
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  tests/qtest: enable tests for virtio-scmi

We don't have a virtio-scmi implementation in QEMU and only support a
vhost-user backend.  This is very similar to virtio-gpio and we add the same
set of tests, just passing some vhost-user messages over the control socket.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230628100524.342666-4-mzamazal@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a1d027be95bc375238e5b9292c6aa661a8ddef4c
      
https://github.com/qemu/qemu/commit/a1d027be95bc375238e5b9292c6aa661a8ddef4c
  Author: Zhao Liu <zhao1.liu@intel.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/core/machine-smp.c
    M include/hw/boards.h

  Log Message:
  -----------
  machine: Add helpers to get cores/threads per socket

The number of cores/threads per socket are needed for smbios, and are
also useful for other modules.

Provide the helpers to wrap the calculation of cores/threads per socket
so that we can avoid calculation errors caused by other modules miss
topology changes.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20230628135437.1145805-2-zhao1.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d79a284a44bb7d88b233fb6bb12ea3723f43469d
      
https://github.com/qemu/qemu/commit/d79a284a44bb7d88b233fb6bb12ea3723f43469d
  Author: Zhao Liu <zhao1.liu@intel.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/smbios/smbios.c

  Log Message:
  -----------
  hw/smbios: Fix smbios_smp_sockets caculation

smp.sockets is the number of sockets which is configured by "-smp" (
otherwise, the default is 1). Trying to recalculate it here with another
rules leads to errors, such as:

1. 003f230e37d7 ("machine: Tweak the order of topology members in struct
   CpuTopology") changes the meaning of smp.cores but doesn't fix
   original smp.cores uses.

   With the introduction of cluster, now smp.cores means the number of
   cores in one cluster. So smp.cores * smp.threads just means the
   threads in a cluster not in a socket.

2. On the other hand, we shouldn't use smp.cpus here because it
   indicates the initial number of online CPUs at the boot time, and is
   not mathematically related to smp.sockets.

So stop reinventing the another wheel and use the topo values that
has been calculated.

Fixes: 003f230e37d7 ("machine: Tweak the order of topology members in struct 
CpuTopology")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20230628135437.1145805-3-zhao1.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7298fd7de5551c4501f54381228458e3c21cab4b
      
https://github.com/qemu/qemu/commit/7298fd7de5551c4501f54381228458e3c21cab4b
  Author: Zhao Liu <zhao1.liu@intel.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/smbios/smbios.c

  Log Message:
  -----------
  hw/smbios: Fix thread count in type4

>From SMBIOS 3.0 specification, thread count field means:

Thread Count is the total number of threads detected by the BIOS for
this processor socket. It is a processor-wide count, not a
thread-per-core count. [1]

So here we should use threads per socket other than threads per core.

[1] SMBIOS 3.0.0, section 7.5.8, Processor Information - Thread Count

Fixes: c97294ec1b9e ("SMBIOS: Build aggregate smbios tables and entry point")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20230628135437.1145805-4-zhao1.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 196ea60a734c346d7d75f1d89aa37703d4d854e7
      
https://github.com/qemu/qemu/commit/196ea60a734c346d7d75f1d89aa37703d4d854e7
  Author: Zhao Liu <zhao1.liu@intel.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/smbios/smbios.c

  Log Message:
  -----------
  hw/smbios: Fix core count in type4

>From SMBIOS 3.0 specification, core count field means:

Core Count is the number of cores detected by the BIOS for this
processor socket. [1]

Before 003f230e37d7 ("machine: Tweak the order of topology members in
struct CpuTopology"), MachineState.smp.cores means "the number of cores
in one package", and it's correct to use smp.cores for core count.

But 003f230e37d7 changes the smp.cores' meaning to "the number of cores
in one die" and doesn't change the original smp.cores' use in smbios as
well, which makes core count in type4 go wrong.

Fix this issue with the correct "cores per socket" caculation.

[1] SMBIOS 3.0.0, section 7.5.6, Processor Information - Core Count

Fixes: 003f230e37d7 ("machine: Tweak the order of topology members in struct 
CpuTopology")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20230628135437.1145805-5-zhao1.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 0dcb4172f2cecdfae113239ff931718eefdeb2d2
      
https://github.com/qemu/qemu/commit/0dcb4172f2cecdfae113239ff931718eefdeb2d2
  Author: Tom Lonergan <tom.lonergan@nutanix.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  vhost-user: Change one_time to per_device request

Some devices, like virtio-scsi, consist of one vhost_dev, while others, like
virtio-net, contain multiple vhost_devs. The QEMU vhost-user code has a
concept of one-time messages which is misleading. One-time messages are sent
once per operation on the device, not once for the lifetime of the device.
Therefore, as discussed in [1], vhost_user_one_time_request should be
renamed to vhost_user_per_device_request and the relevant comments updated
to match the real functionality.

[1] 
https://lore.kernel.org/qemu-devel/20230127083027-mutt-send-email-mst@kernel.org/

Signed-off-by: Tom Lonergan <tom.lonergan@nutanix.com>
Message-Id: <20230628163927.108171-2-tom.lonergan@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>


  Commit: 667e58aef1aa7a0294f635ef070c591efebf75c1
      
https://github.com/qemu/qemu/commit/667e58aef1aa7a0294f635ef070c591efebf75c1
  Author: Tom Lonergan <tom.lonergan@nutanix.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  vhost-user: Make RESET_DEVICE a per device message

A device reset is issued per device, not per VQ. The legacy device reset
message, VHOST_USER_RESET_OWNER, is already a per device message. Therefore,
this change adds the proper message, VHOST_USER_RESET_DEVICE, to per device
messages.

Signed-off-by: Tom Lonergan <tom.lonergan@nutanix.com>
Message-Id: <20230628163927.108171-3-tom.lonergan@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>


  Commit: 00f52e77d742c788ade7d713a7bf558481a89eec
      
https://github.com/qemu/qemu/commit/00f52e77d742c788ade7d713a7bf558481a89eec
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_q35.c

  Log Message:
  -----------
  hw/i386/pc_q35: Resolve redundant q35_host variable

The variable is redundant to "phb" and is never used by its real type.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-2-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 8cf08065b1b19cea1958a43187755cec6546a5d0
      
https://github.com/qemu/qemu/commit/8cf08065b1b19cea1958a43187755cec6546a5d0
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/pci-host/q35.c

  Log Message:
  -----------
  hw/pci-host/q35: Fix double, contradicting .endianness assignment

Fixes the following clangd warning (-Winitializer-overrides):

  q35.c:297:19: Initializer overrides prior initialization of this subobject
  q35.c:292:19: previous initialization is here

Settle on little endian which is consistent with using pci_host_conf_le_ops.

Fixes: bafc90bdc594 ("q35: implement TSEG")
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-3-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 06a492bd2b75653970e30c3ae0ea79ab1ed4ae31
      
https://github.com/qemu/qemu/commit/06a492bd2b75653970e30c3ae0ea79ab1ed4ae31
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_q35.c
    M hw/pci-host/q35.c

  Log Message:
  -----------
  hw/pci-host/q35: Initialize PCMachineState::bus in board code

The Q35 PCI host currently sets the PC machine's PCI bus attribute
through global state, thereby assuming the machine to be a PC machine.
The Q35 machine code already holds on to Q35's pci bus attribute, so can
easily set its own property while preserving encapsulation.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-4-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3b20f4ca59b53f10240d94cdb3f482c116640437
      
https://github.com/qemu/qemu/commit/3b20f4ca59b53f10240d94cdb3f482c116640437
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/pci/pci_host.c
    M include/hw/pci/pci_host.h

  Log Message:
  -----------
  hw/pci/pci_host: Introduce PCI_HOST_BYPASS_IOMMU macro

Introduce a macro to avoid copy and pasting strings which can easily
cause typos.

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230630073720.21297-5-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: e36102cb07dddb3f3758398322535a50e7ed41f2
      
https://github.com/qemu/qemu/commit/e36102cb07dddb3f3758398322535a50e7ed41f2
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_q35.c
    M hw/pci-host/q35.c

  Log Message:
  -----------
  hw/pci-host/q35: Initialize PCI_HOST_BYPASS_IOMMU property from board code

The Q35 PCI host already has a PCI_HOST_BYPASS_IOMMU property. However, the
host initializes this property itself by accessing global machine state,
thereby assuming it to be a PC machine. Avoid this by having board code
set this property.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-6-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3d664a9a386dd5968962b038d056caf182ef29a1
      
https://github.com/qemu/qemu/commit/3d664a9a386dd5968962b038d056caf182ef29a1
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_q35.c
    M hw/pci-host/q35.c
    M include/hw/i386/pc.h
    M include/hw/pci-host/q35.h

  Log Message:
  -----------
  hw/pci-host/q35: Make some property name macros reusable by i440fx

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230630073720.21297-7-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b90d7bff18c48500df86a35db56fecfb59d85088
      
https://github.com/qemu/qemu/commit/b90d7bff18c48500df86a35db56fecfb59d85088
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_piix.c

  Log Message:
  -----------
  hw/i386/pc_piix: Turn some local variables into initializers

Eliminates an else branch.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-8-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f00f5e4b00e2cb414927b560cd6a82fad4dfc6e2
      
https://github.com/qemu/qemu/commit/f00f5e4b00e2cb414927b560cd6a82fad4dfc6e2
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  hw/pci-host/i440fx: Add "i440fx" child property in board code

The parent-child relation is usually established near a child's qdev_new(). For
i440fx this allows for reusing the machine parameter, thus avoiding
qdev_get_machine() which relies on a global variable.

Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230630073720.21297-9-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: cda39f134ba197e2c8c9660dd3fb8fddf4c8647b
      
https://github.com/qemu/qemu/commit/cda39f134ba197e2c8c9660dd3fb8fddf4c8647b
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  hw/pci-host/i440fx: Replace magic values by existing constants

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-10-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a707466dd62712e4a76e30217a8880e6ab8c7b10
      
https://github.com/qemu/qemu/commit/a707466dd62712e4a76e30217a8880e6ab8c7b10
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  hw/pci-host/i440fx: Have common names for some local variables

`PCIHostState` is often referred to as `phb`, own device state usually as `s`.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-11-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 44df0552a020efd6191714da44edede5ded37ec8
      
https://github.com/qemu/qemu/commit/44df0552a020efd6191714da44edede5ded37ec8
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  hw/pci-host/i440fx: Move i440fx_realize() into PCII440FXState section

i440fx_realize() realizes the PCI device inside the host bridge
(PCII440FXState), but is implemented between i440fx_pcihost_realize() and
i440fx_init() which deal with the host bridge itself (I440FXState). Since we
want to append i440fx_init() to i440fx_pcihost_realize() later let's move
i440fx_realize() out of the way.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-12-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 09f85b7b93a05f1551509b245be99529a9e278f9
      
https://github.com/qemu/qemu/commit/09f85b7b93a05f1551509b245be99529a9e278f9
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/pci-host/i440fx.c
    M include/hw/pci-host/i440fx.h

  Log Message:
  -----------
  hw/pci-host/i440fx: Make MemoryRegion pointers accessible as properties

The goal is to eliminate i440fx_init() which is a legacy init function. This
neccessitates the memory regions to be properties, like in Q35, which will be
assigned in board code.

Since i440fx needs different PCI devices in Xen mode, and since i440fx shall
be self-contained, the PCI device will be created during realization of the
host. Thus the pointers need to be moved to the host structure to be usable as
properties.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-13-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c84858fd907067dcfb7624083dd44879664cc019
      
https://github.com/qemu/qemu/commit/c84858fd907067dcfb7624083dd44879664cc019
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  hw/pci-host/i440fx: Add PCI_HOST_PROP_IO_MEM property

Introduce the property in anticipation of QOM'ification; Q35 has the same
property.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230630073720.21297-14-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 82feef45f42db607b9439411d4aad7c21bdf3047
      
https://github.com/qemu/qemu/commit/82feef45f42db607b9439411d4aad7c21bdf3047
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/pci-host/i440fx.c
    M include/hw/pci-host/i440fx.h

  Log Message:
  -----------
  hw/pci-host/i440fx: Add PCI_HOST_{ABOVE, BELOW}_4G_MEM_SIZE properties

Introduce the properties in anticipation of QOM'ification; Q35 has the same
properties.

Note that we want to avoid a "ram size" property in the QOM interface since it
seems redundant to both properties introduced in this change. Thus the removal
of the ram_size parameter. We assume the invariant of both properties to sum up
to "ram size" which is already asserted in pc_memory_init(). Under Xen the
invariant seems to hold as well, so we now also check it there.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230630073720.21297-15-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ff0a8cc4bed6414ab09816b14e006a11140d0d73
      
https://github.com/qemu/qemu/commit/ff0a8cc4bed6414ab09816b14e006a11140d0d73
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/pci-host/i440fx.c
    M include/hw/pci-host/i440fx.h

  Log Message:
  -----------
  hw/pci-host/i440fx: Add I440FX_HOST_PROP_PCI_TYPE property

I440FX needs a different PCI device model if the "igd-passthru" property is
enabled. The type name is currently passed as a parameter to i440fx_init(). This
parameter will be replaced by a property assignment once i440fx_init() gets
resolved.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230630073720.21297-16-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ce5ac09a7548d90ac414f60bbe87c69a8487de10
      
https://github.com/qemu/qemu/commit/ce5ac09a7548d90ac414f60bbe87c69a8487de10
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/pci-host/i440fx.c
    M include/hw/pci-host/i440fx.h

  Log Message:
  -----------
  hw/pci-host/i440fx: Resolve i440fx_init()

i440fx_init() is a legacy init function. The previous patches worked towards
TYPE_I440FX_PCI_HOST_BRIDGE to be instantiated the QOM way. Do this now by
transforming the parameters passed to i440fx_init() into property assignments.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230630073720.21297-17-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: c589f7cf0860534dfd21023dec2ec322688a5a03
      
https://github.com/qemu/qemu/commit/c589f7cf0860534dfd21023dec2ec322688a5a03
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_piix.c

  Log Message:
  -----------
  hw/i386/pc_piix: Move i440fx' realize near its qdev_new()

I440FX realization is currently mixed with PIIX3 creation. Furthermore, it is
common practice to only set properties between a device's qdev_new() and
qdev_realize(). Clean up to resolve both issues.

Since I440FX spawns a PCI bus let's also move the pci_bus initialization there.

Note that when running `qemu-system-x86_64 -M pc -S` before and after this
patch, `info mtree` in the QEMU console doesn't show any differences except that
the ordering is different.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-18-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: e052944a966ca4eb0131121646fa0ef047c25e52
      
https://github.com/qemu/qemu/commit/e052944a966ca4eb0131121646fa0ef047c25e52
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/mips/boston.c
    M hw/mips/fuloong2e.c
    M hw/mips/malta.c
    M hw/pci/pci.c
    M hw/ppc/pegasos2.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  hw/pci/pci: Remove multifunction parameter from 
pci_create_simple_multifunction()

There is also pci_create_simple() which creates non-multifunction PCI
devices. Accordingly the parameter is always set to true when a multi
function PCI device is to be created.

The reason for the parameter's existence seems to be that it is used in the
internal PCI code as well which is the only location where it gets set to
false. This one usage can be replaced by trivial code.

Remove this redundant, error-prone parameter.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230304114043.121024-5-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c925f40a29906355b516bad4c6ef80d30cf971b6
      
https://github.com/qemu/qemu/commit/c925f40a29906355b516bad4c6ef80d30cf971b6
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/i386/pc_q35.c
    M hw/pci-host/sabre.c
    M hw/pci/pci.c
    M hw/sparc64/sun4u.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  hw/pci/pci: Remove multifunction parameter from pci_new_multifunction()

There is also pci_new() which creates non-multifunction PCI devices.
Accordingly the parameter is always set to true when a multi function PCI
device is to be created.

The reason for the parameter's existence seems to be that it is used in the
internal PCI code as well which is the only location where it gets set to
false. This one usage can be resolved by factoring out an internal helper
function.

Remove this redundant, error-prone parameter.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230304114043.121024-6-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 08f632848008544b7e1ab8a8aa50df02c39a26a1
      
https://github.com/qemu/qemu/commit/08f632848008544b7e1ab8a8aa50df02c39a26a1
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/pci/pcie_sriov.c

  Log Message:
  -----------
  pcie: Release references of virtual functions

pci_new() automatically retains a reference to a virtual function when
registering it so we need to release the reference when unregistering.

Fixes: 7c0fa8dff8 ("pcie: Add support for Single Root I/O Virtualization 
(SR/IOV)")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230411090408.48366-1-akihiko.odaki@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>


  Commit: b479bc3c9d5e473553137641fd31069c251f0d6e
      
https://github.com/qemu/qemu/commit/b479bc3c9d5e473553137641fd31069c251f0d6e
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Return -EIO if device ack is VIRTIO_NET_ERR in _load_mac()

According to VirtIO standard, "The class, command and
command-specific-data are set by the driver,
and the device sets the ack byte.
There is little it can do except issue a diagnostic
if ack is not VIRTIO_NET_OK."

Therefore, QEMU should stop sending the queued SVQ commands and
cancel the device startup if the device's ack is not VIRTIO_NET_OK.

Yet the problem is that, vhost_vdpa_net_load_mac() returns 1 based on
`*s->status != VIRTIO_NET_OK` when the device's ack is VIRTIO_NET_ERR.
As a result, net->nc->info->load() also returns 1, this makes
vhost_net_start_one() incorrectly assume the device state is
successfully loaded by vhost_vdpa_net_load() and return 0, instead of
goto `fail` label to cancel the device startup, as vhost_net_start_one()
only cancels the device startup when net->nc->info->load() returns a
negative value.

This patch fixes this problem by returning -EIO when the device's
ack is not VIRTIO_NET_OK.

Fixes: f73c0c43ac ("vdpa: extract vhost_vdpa_net_load_mac from 
vhost_vdpa_net_load")
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: 
<a21731518644abbd0c495c5b7960527c5911f80d.1688438055.git.yin31149@gmail.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f45fd95ec9e8104f6af801c734375029dda0f542
      
https://github.com/qemu/qemu/commit/f45fd95ec9e8104f6af801c734375029dda0f542
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Return -EIO if device ack is VIRTIO_NET_ERR in _load_mq()

According to VirtIO standard, "The class, command and
command-specific-data are set by the driver,
and the device sets the ack byte.
There is little it can do except issue a diagnostic
if ack is not VIRTIO_NET_OK."

Therefore, QEMU should stop sending the queued SVQ commands and
cancel the device startup if the device's ack is not VIRTIO_NET_OK.

Yet the problem is that, vhost_vdpa_net_load_mq() returns 1 based on
`*s->status != VIRTIO_NET_OK` when the device's ack is VIRTIO_NET_ERR.
As a result, net->nc->info->load() also returns 1, this makes
vhost_net_start_one() incorrectly assume the device state is
successfully loaded by vhost_vdpa_net_load() and return 0, instead of
goto `fail` label to cancel the device startup, as vhost_net_start_one()
only cancels the device startup when net->nc->info->load() returns a
negative value.

This patch fixes this problem by returning -EIO when the device's
ack is not VIRTIO_NET_OK.

Fixes: f64c7cda69 ("vdpa: Add vhost_vdpa_net_load_mq")
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: 
<ec515ebb0b4f56368751b9e318e245a5d994fa72.1688438055.git.yin31149@gmail.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 6f34807116ffef7c449a656dbe2091d4f4da89c8
      
https://github.com/qemu/qemu/commit/6f34807116ffef7c449a656dbe2091d4f4da89c8
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Return -EIO if device ack is VIRTIO_NET_ERR in _load_offloads()

According to VirtIO standard, "The class, command and
command-specific-data are set by the driver,
and the device sets the ack byte.
There is little it can do except issue a diagnostic
if ack is not VIRTIO_NET_OK."

Therefore, QEMU should stop sending the queued SVQ commands and
cancel the device startup if the device's ack is not VIRTIO_NET_OK.

Yet the problem is that, vhost_vdpa_net_load_offloads() returns 1 based on
`*s->status != VIRTIO_NET_OK` when the device's ack is VIRTIO_NET_ERR.
As a result, net->nc->info->load() also returns 1, this makes
vhost_net_start_one() incorrectly assume the device state is
successfully loaded by vhost_vdpa_net_load() and return 0, instead of
goto `fail` label to cancel the device startup, as vhost_net_start_one()
only cancels the device startup when net->nc->info->load() returns a
negative value.

This patch fixes this problem by returning -EIO when the device's
ack is not VIRTIO_NET_OK.

Fixes: 0b58d3686a ("vdpa: Add vhost_vdpa_net_load_offloads()")
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: 
<b0396b80e96322b86f1a0b10c098fc1edd947d72.1688438055.git.yin31149@gmail.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 77812aa7b1fdf8f547c35a7f9a4eb1cbf3a073db
      
https://github.com/qemu/qemu/commit/77812aa7b1fdf8f547c35a7f9a4eb1cbf3a073db
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  vhost-vdpa: mute unaligned memory error report

With TPM CRM device, vhost-vdpa reports an error when it tries
to register a listener for a non aligned memory region:

  qemu-system-x86_64: vhost_vdpa_listener_region_add received unaligned region
  qemu-system-x86_64: vhost_vdpa_listener_region_del received unaligned region

This error can be confusing for the user whereas we only need to skip
the region (as it's already done after the error_report())

Rather than introducing a special case for TPM CRB memory section
to not display the message in this case, simply replace the
error_report() by a trace function (with more information, like the
memory region name).

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20230704071931.575888-2-lvivier@redhat.com>
Reviewed-by: David Hildenbrand <david@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: 8d60105a5973320ffd72a48f208cfd2b041d6c0b
      
https://github.com/qemu/qemu/commit/8d60105a5973320ffd72a48f208cfd2b041d6c0b
  Author: Ani Sinha <anisinha@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: allow changes in DSDT.noacpihp table blob

We are going to fix bio-tables-test in the next patch and hence need to
make sure the acpi tests continue to pass.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230705115925.5339-2-anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7b0ba7b1c8b362a83bfb30170dae6035a71192c2
      
https://github.com/qemu/qemu/commit/7b0ba7b1c8b362a83bfb30170dae6035a71192c2
  Author: Ani Sinha <anisinha@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M tests/qtest/bios-tables-test.c

  Log Message:
  -----------
  tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port

PCIE ports only have one slot, slot 0. Hence, non-zero slots are not available
for PCIE devices on PCIE root ports. Fix test_acpi_q35_tcg_no_acpi_hotplug()
so that the test does not use them.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230705115925.5339-3-anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: bac4711b07ef92be45628ae7b399a09d850ee596
      
https://github.com/qemu/qemu/commit/bac4711b07ef92be45628ae7b399a09d850ee596
  Author: Ani Sinha <anisinha@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M tests/data/acpi/q35/DSDT.noacpihp
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp

Some fixes were committed in bios-tables-test in the previous commit. Update
the acpi blob and clear bios-tables-test-allowed-diff.h so that the test
continues to pass with the changes in the bios-tables-test.

Following is the asl diff between the old and the newly updated blob:

@@ -1,30 +1,30 @@
 /*
  * Intel ACPI Component Architecture
  * AML/ASL+ Disassembler version 20210604 (64-bit version)
  * Copyright (c) 2000 - 2021 Intel Corporation
  *
  * Disassembling to symbolic ASL+ operators
  *
- * Disassembly of tests/data/acpi/q35/DSDT.noacpihp, Wed Jun 21 18:26:52 2023
+ * Disassembly of /tmp/aml-O8SU61, Wed Jun 21 18:26:52 2023
  *
  * Original Table Header:
  *     Signature        "DSDT"
- *     Length           0x00002038 (8248)
+ *     Length           0x00002031 (8241)
  *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
- *     Checksum         0x4A
+ *     Checksum         0x89
  *     OEM ID           "BOCHS "
  *     OEM Table ID     "BXPC    "
  *     OEM Revision     0x00000001 (1)
  *     Compiler ID      "BXPC"
  *     Compiler Version 0x00000001 (1)
  */
 DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 0x00000001)
 {
     Scope (\)
     {
         OperationRegion (DBG, SystemIO, 0x0402, One)
         Field (DBG, ByteAcc, NoLock, Preserve)
         {
             DBGB,   8
         }

@@ -3148,48 +3148,48 @@
                 {
                     Name (_ADR, Zero)  // _ADR: Address
                     Method (_DSM, 4, Serialized)  // _DSM: Device-Specific 
Method
                     {
                         Local0 = Package (0x01)
                             {
                                 0x01F5
                             }
                         Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0))
                     }
                 }
             }

             Device (S40)
             {
                 Name (_ADR, 0x00080000)  // _ADR: Address
-                Device (S41)
+                Device (S01)
                 {
-                    Name (_ADR, 0x00080001)  // _ADR: Address
+                    Name (_ADR, One)  // _ADR: Address
                     Method (_DSM, 4, Serialized)  // _DSM: Device-Specific 
Method
                     {
                         Local0 = Package (0x01)
                             {
                                 0x0259
                             }
                         Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0))
                     }
                 }

-                Device (S48)
+                Device (S02)
                 {
-                    Name (_ADR, 0x00090000)  // _ADR: Address
+                    Name (_ADR, 0x02)  // _ADR: Address
                     Device (S00)
                     {
                         Name (_ADR, Zero)  // _ADR: Address
                     }
                 }
             }

             Device (SF8)
             {
                 Name (_ADR, 0x001F0000)  // _ADR: Address
                 OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C)
                 Scope (\_SB)
                 {
                     Field (PCI0.SF8.PIRQ, ByteAcc, NoLock, Preserve)
                     {
                         PRQA,   8,

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230705115925.5339-4-anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 579edbd459a53beb7929ee1169dc9675cc329865
      
https://github.com/qemu/qemu/commit/579edbd459a53beb7929ee1169dc9675cc329865
  Author: Ani Sinha <anisinha@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M tests/qtest/hd-geo-test.c

  Log Message:
  -----------
  tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test

The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci bridge
on slot 0 on the same pcie-root-port. Since a downstream device can be attached
to a pcie-root-port only on slot 0, the above test configuration is not allowed.
Additionally using pcie.0 as id for pcie-to-pci bridge is incorrect as that id
is reserved only for the root bus.

In the test scenario, there is no need to attach a pcie-root-port to the
root complex. A SCSI controller can be attached to a pcie-to-pci bridge
which can then be directly attached to the root bus (pcie.0).

Fix the test and simplify it.

CC: mst@redhat.com
CC: imammedo@redhat.com
CC: Michael Labiuk <michael.labiuk@virtuozzo.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Message-Id: <20230705115925.5339-5-anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ca92eb5defcf9d1c2106341744a73a03cf26e824
      
https://github.com/qemu/qemu/commit/ca92eb5defcf9d1c2106341744a73a03cf26e824
  Author: Ani Sinha <anisinha@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  hw/pci: warn when PCIe device is plugged into non-zero slot of downstream port

PCIe downstream ports only have a single device 0, so PCI Express devices can
only be plugged into slot 0 on a PCIe port. Add a warning to let users know
when the invalid configuration is used. We may enforce this more strongly later
once we get more clarity on whether we are introducing a bad regression for
users currently using the wrong configuration.

The change has been tested to not break or alter behaviors of ARI capable
devices by instantiating seven vfs on an emulated igb device (the maximum
number of vfs the igb device supports). The vfs are instantiated correctly
and are seen to have non-zero device/slot numbers in the conventional PCI BDF
representation.

CC: jusual@redhat.com
CC: imammedo@redhat.com
CC: mst@redhat.com
CC: akihiko.odaki@daynix.com

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2128929
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Julia Suvorova <jusual@redhat.com>
Message-Id: <20230705115925.5339-6-anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>


  Commit: 94df5b2180d61fb2ee2b04cc007981e58b6479a9
      
https://github.com/qemu/qemu/commit/94df5b2180d61fb2ee2b04cc007981e58b6479a9
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/virtio/trace-events
    M hw/virtio/virtio-iommu.c
    M include/hw/virtio/virtio-iommu.h

  Log Message:
  -----------
  virtio-iommu: Fix 64kB host page size VFIO device assignment

When running on a 64kB page size host and protecting a VFIO device
with the virtio-iommu, qemu crashes with this kind of message:

qemu-kvm: virtio-iommu page mask 0xfffffffffffff000 is incompatible
with mask 0x20010000
qemu: hardware error: vfio: DMA mapping failed, unable to continue

This is due to the fact the IOMMU MR corresponding to the VFIO device
is enabled very late on domain attach, after the machine init.
The device reports a minimal 64kB page size but it is too late to be
applied. virtio_iommu_set_page_size_mask() fails and this causes
vfio_listener_region_add() to end up with hw_error();

To work around this issue, we transiently enable the IOMMU MR on
machine init to collect the page size requirements and then restore
the bypass state.

Fixes: 90519b9053 ("virtio-iommu: Add bypass mode support to assigned device")
Signed-off-by: Eric Auger <eric.auger@redhat.com>

Message-Id: <20230705165118.28194-2-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>


  Commit: 587a7641d53055054d68d67d94c9408ef808f127
      
https://github.com/qemu/qemu/commit/587a7641d53055054d68d67d94c9408ef808f127
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  virtio-iommu: Rework the traces in virtio_iommu_set_page_size_mask()

The current error messages in virtio_iommu_set_page_size_mask()
sound quite similar for different situations and miss the IOMMU
memory region that causes the issue.

Clarify them and rework the comment.

Also remove the trace when the new page_size_mask is not applied as
the current frozen granule is kept. This message is rather confusing
for the end user and anyway the current granule would have been used
by the driver.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20230705165118.28194-3-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>


  Commit: 625b370c45f4acd155ee625d61c0057d770a5b5e
      
https://github.com/qemu/qemu/commit/625b370c45f4acd155ee625d61c0057d770a5b5e
  Author: Leonardo Bras <leobras@redhat.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pcie: Add hotplug detect state register to cmask

When trying to migrate a machine type pc-q35-6.0 or lower, with this
cmdline options,

-device 
driver=pcie-root-port,port=18,chassis=19,id=pcie-root-port18,bus=pcie.0,addr=0x12
 \
-device 
driver=nec-usb-xhci,p2=4,p3=4,id=nex-usb-xhci0,bus=pcie-root-port18,addr=0x12.0x1

the following bug happens after all ram pages were sent:

qemu-kvm: get_pci_config_device: Bad config data: i=0x6e read: 0 device: 40 
cmask: ff wmask: 0 w1cmask:19
qemu-kvm: Failed to load PCIDevice:config
qemu-kvm: Failed to load pcie-root-port:parent_obj.parent_obj.parent_obj
qemu-kvm: error while loading state for instance 0x0 of device 
'0000:00:12.0/pcie-root-port'
qemu-kvm: load of migration failed: Invalid argument

This happens on pc-q35-6.0 or lower because of:
{ "ICH9-LPC", ACPI_PM_PROP_ACPI_PCIHP_BRIDGE, "off" }

In this scenario, hotplug_handler_plug() calls pcie_cap_slot_plug_cb(),
which sets dev->config byte 0x6e with bit PCI_EXP_SLTSTA_PDS to signal PCI
hotplug for the guest. After a while the guest will deal with this hotplug
and qemu will clear the above bit.

Then, during migration, get_pci_config_device() will compare the
configs of both the freshly created device and the one that is being
received via migration, which will differ due to the PCI_EXP_SLTSTA_PDS bit
and cause the bug to reproduce.

To avoid this fake incompatibility, there are tree fields in PCIDevice that
can help:

- wmask: Used to implement R/W bytes, and
- w1cmask: Used to implement RW1C(Write 1 to Clear) bytes
- cmask: Used to enable config checks on load.

According to PCI Express® Base Specification Revision 5.0 Version 1.0,
table 7-27 (Slot Status Register) bit 6, the "Presence Detect State" is
listed as RO (read-only), so it only makes sense to make use of the cmask
field.

So, clear PCI_EXP_SLTSTA_PDS bit on cmask, so the fake incompatibility on
get_pci_config_device() does not abort the migration.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2215819
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20230706045546.593605-3-leobras@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>


  Commit: 031b1abacbdb3f4e016b6b926f7e7876c05339bb
      
https://github.com/qemu/qemu/commit/031b1abacbdb3f4e016b6b926f7e7876c05339bb
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Fix possible use-after-free for VirtQueueElement

QEMU uses vhost_handle_guest_kick() to forward guest's available
buffers to the vdpa device in SVQ avail ring.

In vhost_handle_guest_kick(), a `g_autofree` `elem` is used to
iterate through the available VirtQueueElements. This `elem` is
then passed to `svq->ops->avail_handler`, specifically to the
vhost_vdpa_net_handle_ctrl_avail(). If this handler fails to
process the CVQ command, vhost_handle_guest_kick() regains
ownership of the `elem`, and either frees it or requeues it.

Yet the problem is that, vhost_vdpa_net_handle_ctrl_avail()
mistakenly frees the `elem`, even if it fails to forward the
CVQ command to vdpa device. This can result in a use-after-free
for the `elem` in vhost_handle_guest_kick().

This patch solves this problem by refactoring
vhost_vdpa_net_handle_ctrl_avail() to only freeing the `elem` if
it owns it.

Fixes: bd907ae4b0 ("vdpa: manual forward CVQ buffers")
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<e3f2d7db477734afe5c6a5ab3fa8b8317514ea34.1688746840.git.yin31149@gmail.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: e57fc3dec9508cfa81c1bedcaa6b7469995ac6a5
      
https://github.com/qemu/qemu/commit/e57fc3dec9508cfa81c1bedcaa6b7469995ac6a5
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M include/hw/qdev-core.h

  Log Message:
  -----------
  include: attempt to document device_class_set_props

I'm still not sure how I achieve by use case of the parent class
defining the following properties:

  static Property vud_properties[] = {
      DEFINE_PROP_CHR("chardev", VHostUserDevice, chardev),
      DEFINE_PROP_UINT16("id", VHostUserDevice, id, 0),
      DEFINE_PROP_UINT32("num_vqs", VHostUserDevice, num_vqs, 1),
      DEFINE_PROP_END_OF_LIST(),
  };

But for the specialisation of the class I want the id to default to
the actual device id, e.g.:

  static Property vu_rng_properties[] = {
      DEFINE_PROP_UINT16("id", VHostUserDevice, id, VIRTIO_ID_RNG),
      DEFINE_PROP_UINT32("num_vqs", VHostUserDevice, num_vqs, 1),
      DEFINE_PROP_END_OF_LIST(),
  };

And so far the API for doing that isn't super clear.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230710153522.3469097-2-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c378e88218c9679d7df8230c9f988b22a6cbdc1a
      
https://github.com/qemu/qemu/commit/c378e88218c9679d7df8230c9f988b22a6cbdc1a
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M include/hw/qdev-core.h

  Log Message:
  -----------
  include/hw: document the device_class_set_parent_* fns

These are useful functions for when you want proper inheritance of
functionality across realize/unrealize calls.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230710153522.3469097-3-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7e8094f0dfd04d4772b65dc92dd087dc86783dc4
      
https://github.com/qemu/qemu/commit/7e8094f0dfd04d4772b65dc92dd087dc86783dc4
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/display/vhost-user-gpu.c
    M hw/net/virtio-net.c
    M hw/virtio/vhost-user-fs.c
    M hw/virtio/vhost-user-gpio.c
    M hw/virtio/vhost-vsock-common.c
    M hw/virtio/virtio-crypto.c

  Log Message:
  -----------
  hw/virtio: fix typo in VIRTIO_CONFIG_IRQ_IDX comments

Fixes: 544f0278af (virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230710153522.3469097-4-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a0cc7673ab731794caefed2033d68a2199d6bfaf
      
https://github.com/qemu/qemu/commit/a0cc7673ab731794caefed2033d68a2199d6bfaf
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  include/hw/virtio: document virtio_notify_config

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230710153522.3469097-5-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3b6256c2c57061c365cfad7857e12fd8d15ca3c8
      
https://github.com/qemu/qemu/commit/3b6256c2c57061c365cfad7857e12fd8d15ca3c8
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  include/hw/virtio: add kerneldoc for virtio_init

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230710153522.3469097-6-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 661dee7bd08dd93d15b898d43821bb46b2aa422c
      
https://github.com/qemu/qemu/commit/661dee7bd08dd93d15b898d43821bb46b2aa422c
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  include/hw/virtio: document some more usage of notifiers

Lets document some more of the core VirtIODevice structure.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230710153522.3469097-7-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 445416e3010a2525c577d692921979a64d88a998
      
https://github.com/qemu/qemu/commit/445416e3010a2525c577d692921979a64d88a998
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M docs/pcie_sriov.txt
    M hw/net/igb.c
    M hw/net/igbvf.c
    M hw/nvme/ctrl.c
    M hw/pci/pcie.c
    M include/hw/pci/pcie.h

  Log Message:
  -----------
  pcie: Use common ARI next function number

Currently the only implementers of ARI is SR-IOV devices, and they
behave similar. Share the ARI next function number.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Message-Id: <20230710153838.33917-2-akihiko.odaki@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7c228c5f3301113ffd7cfee7f982e7ae04c8ffda
      
https://github.com/qemu/qemu/commit/7c228c5f3301113ffd7cfee7f982e7ae04c8ffda
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/core/machine.c
    M hw/pci/pci.c
    M hw/pci/pcie.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pcie: Specify 0 for ARI next function numbers

The current implementers of ARI are all SR-IOV devices. The ARI next
function number field is undefined for VF according to PCI Express Base
Specification Revision 5.0 Version 1.0 section 9.3.7.7. The PF still
requires some defined value so end the linked list formed with the field
by specifying 0 as required for any ARI implementation according to
section 7.8.7.2.

For migration, the field will keep having 1 as its value on the old
QEMU machine versions.

Fixes: 2503461691 ("pcie: Add some SR/IOV API documentation in 
docs/pcie_sriov.txt")
Fixes: 44c2c09488 ("hw/nvme: Add support for SR-IOV")
Fixes: 3a977deebe ("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Message-Id: <20230710153838.33917-3-akihiko.odaki@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 2848c6aa7536fb48a57f38dabed1dce97fb45c6f
      
https://github.com/qemu/qemu/commit/2848c6aa7536fb48a57f38dabed1dce97fb45c6f
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Use iovec for vhost_vdpa_net_load_cmd()

According to VirtIO standard, "The driver MUST follow
the VIRTIO_NET_CTRL_MAC_TABLE_SET command by a le32 number,
followed by that number of non-multicast MAC addresses,
followed by another le32 number, followed by that number
of multicast addresses."

Considering that these data is not stored in contiguous memory,
this patch refactors vhost_vdpa_net_load_cmd() to accept
scattered data, eliminating the need for an addtional data copy or
packing the data into s->cvq_cmd_out_buffer outside of
vhost_vdpa_net_load_cmd().

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<3482cc50eebd13db4140b8b5dec9d0cc25b20b1b.1688743107.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 0ddcecb8f2e14b5aa6781ae3403ffa2ac4b25197
      
https://github.com/qemu/qemu/commit/0ddcecb8f2e14b5aa6781ae3403ffa2ac4b25197
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Restore MAC address filtering state

This patch refactors vhost_vdpa_net_load_mac() to
restore the MAC address filtering state at device's startup.

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<4b9550c14bc8c98c8f48e04dbf3d3ac41489d3fd.1688743107.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b12f907eeaad7bd4d282502bd7f7773f95e1ee96
      
https://github.com/qemu/qemu/commit/b12f907eeaad7bd4d282502bd7f7773f95e1ee96
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Restore packet receive filtering state relative with _F_CTRL_RX feature

This patch introduces vhost_vdpa_net_load_rx_mode()
and vhost_vdpa_net_load_rx() to restore the packet
receive filtering state in relation to
VIRTIO_NET_F_CTRL_RX feature at device's startup.

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<804cedac93e19ba3b810d52b274ca5ec11469f09.1688743107.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b77a5f22aca4cef2dc893ea544841bdd95dc83ba
      
https://github.com/qemu/qemu/commit/b77a5f22aca4cef2dc893ea544841bdd95dc83ba
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M hw/virtio/vhost-shadow-virtqueue.c

  Log Message:
  -----------
  vhost: Fix false positive out-of-bounds

QEMU uses vhost_svq_translate_addr() to translate addresses
between the QEMU's virtual address and the SVQ IOVA. In order
to validate this translation, QEMU checks whether the translated
range falls within the mapped range.

Yet the problem is that, the value of `needle_last`, which is calculated
by `needle.translated_addr + iovec[i].iov_len`, should represent the
exclusive boundary of the translated range, rather than the last
inclusive addresses of the range. Consequently, QEMU fails the check
when the translated range matches the size of the mapped range.

This patch solves this problem by fixing the `needle_last` value to
the last inclusive address of the translated range.

Note that this bug cannot be triggered at the moment, because QEMU
is unable to translate such a big range due to the truncation of
the CVQ command in vhost_vdpa_net_handle_ctrl_avail().

Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<ee31c5420ffc8e6a29705ddd30badb814ddbae1d.1688743107.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 45c4101828a483b87863f2e2ba6d98faf0ff7d92
      
https://github.com/qemu/qemu/commit/45c4101828a483b87863f2e2ba6d98faf0ff7d92
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Accessing CVQ header through its structure

We can access the CVQ header through `struct virtio_net_ctrl_hdr`,
instead of accessing it through a `uint8_t` pointer,
which improves the code's readability and maintainability.

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<cd522e06a4371e9d6b8a1c1a86f90a92401d56e8.1688743107.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: fee364e4b1ad82a78929f3eed114321f77b6f916
      
https://github.com/qemu/qemu/commit/fee364e4b1ad82a78929f3eed114321f77b6f916
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Avoid forwarding large CVQ command failures

Due to the size limitation of the out buffer sent to the vdpa device,
which is determined by vhost_vdpa_net_cvq_cmd_len(), excessive CVQ
command is truncated in QEMU. As a result, the vdpa device rejects
this flawd CVQ command.

However, the problem is that, the VIRTIO_NET_CTRL_MAC_TABLE_SET
CVQ command has a variable length, which may exceed
vhost_vdpa_net_cvq_cmd_len() if the guest sets more than
`MAC_TABLE_ENTRIES` MAC addresses for the filter table.

This patch solves this problem by following steps:

  * Increase the out buffer size to vhost_vdpa_net_cvq_cmd_page_len(),
which represents the size of the buffer that is allocated and mmaped.
This ensures that everything works correctly as long as the guest
sets fewer than `(vhost_vdpa_net_cvq_cmd_page_len() -
sizeof(struct virtio_net_ctrl_hdr)
- 2 * sizeof(struct virtio_net_ctrl_mac)) / ETH_ALEN` MAC addresses.
    Considering the highly unlikely scenario for the guest setting
more than that number of MAC addresses for the filter table, this
should work fine for the majority of cases.

  * If the CVQ command exceeds vhost_vdpa_net_cvq_cmd_page_len(),
instead of directly sending this CVQ command, QEMU should send
a VIRTIO_NET_CTRL_RX_PROMISC CVQ command to vdpa device. Addtionally,
a fake VIRTIO_NET_CTRL_MAC_TABLE_SET command including
(`MAC_TABLE_ENTRIES` + 1) non-multicast MAC addresses and
(`MAC_TABLE_ENTRIES` + 1) multicast MAC addresses should be provided
to the device model.
    By doing so, the vdpa device turns promiscuous mode on, aligning
with the VirtIO standard. The device model marks
`n->mac_table.uni_overflow` and `n->mac_table.multi_overflow`,
which aligns with the state of the vdpa device.

Note that the bug cannot be triggered at the moment, since
VIRTIO_NET_F_CTRL_RX feature is not enabled for SVQ.

Fixes: 7a7f87e94c ("vdpa: Move command buffers map to start of net device")
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<267e15e4eed2d7aeb9887f193da99a13d22a2f1d.1688743107.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ea6eec497921f9c0db259445fc44429a743d0665
      
https://github.com/qemu/qemu/commit/ea6eec497921f9c0db259445fc44429a743d0665
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Allow VIRTIO_NET_F_CTRL_RX in SVQ

Enable SVQ with VIRTIO_NET_F_CTRL_RX feature.

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: 
<5d6173a6d7c4c514c98362b404c019f52d73b06c.1688743107.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4fd180c7bb476d0793f3849ae4e6c0f932b6e3ab
      
https://github.com/qemu/qemu/commit/4fd180c7bb476d0793f3849ae4e6c0f932b6e3ab
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Restore packet receive filtering state relative with _F_CTRL_RX_EXTRA 
feature

This patch refactors vhost_vdpa_net_load_rx() to
restore the packet receive filtering state in relation to
VIRTIO_NET_F_CTRL_RX_EXTRA feature at device's startup.

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Message-Id: 
<abddc477a476f756de6e3d24c0e9f7b21c99a4c1.1688797728.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d669b7bba22d45cb9e5926d63541e52bde1655dd
      
https://github.com/qemu/qemu/commit/d669b7bba22d45cb9e5926d63541e52bde1655dd
  Author: Hawkins Jiawei <yin31149@gmail.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Allow VIRTIO_NET_F_CTRL_RX_EXTRA in SVQ

Enable SVQ with VIRTIO_NET_F_CTRL_RX_EXTRA feature.

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: 
<15ecc49975f9b8d1316ed4296879564a18abf31e.1688797728.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 2bb9d628a7e1250db031682b0b59b128e1526da7
      
https://github.com/qemu/qemu/commit/2bb9d628a7e1250db031682b0b59b128e1526da7
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M MAINTAINERS
    M contrib/vhost-user-gpu/vhost-user-gpu.c
    M contrib/vhost-user-gpu/virgl.c
    M contrib/vhost-user-gpu/vugpu.h
    M docs/interop/vhost-user-gpu.rst
    M docs/pcie_sriov.txt
    M hw/core/machine-smp.c
    M hw/core/machine.c
    M hw/display/vhost-user-gpu.c
    M hw/display/virtio-gpu-base.c
    M hw/display/virtio-gpu.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/mips/boston.c
    M hw/mips/fuloong2e.c
    M hw/mips/malta.c
    M hw/net/igb.c
    M hw/net/igbvf.c
    M hw/net/virtio-net.c
    M hw/nvme/ctrl.c
    M hw/pci-host/i440fx.c
    M hw/pci-host/q35.c
    M hw/pci-host/sabre.c
    M hw/pci/pci.c
    M hw/pci/pci_host.c
    M hw/pci/pcie.c
    M hw/pci/pcie_sriov.c
    M hw/ppc/pegasos2.c
    M hw/smbios/smbios.c
    M hw/sparc64/sun4u.c
    M hw/virtio/Kconfig
    M hw/virtio/meson.build
    M hw/virtio/trace-events
    M hw/virtio/vhost-shadow-virtqueue.c
    M hw/virtio/vhost-stub.c
    M hw/virtio/vhost-user-fs.c
    M hw/virtio/vhost-user-gpio.c
    A hw/virtio/vhost-user-scmi-pci.c
    A hw/virtio/vhost-user-scmi.c
    M hw/virtio/vhost-user.c
    M hw/virtio/vhost-vdpa.c
    M hw/virtio/vhost-vsock-common.c
    M hw/virtio/vhost.c
    M hw/virtio/virtio-crypto.c
    M hw/virtio/virtio-iommu.c
    M include/hw/boards.h
    M include/hw/i386/pc.h
    M include/hw/pci-host/i440fx.h
    M include/hw/pci-host/q35.h
    M include/hw/pci/pci.h
    M include/hw/pci/pci_host.h
    M include/hw/pci/pcie.h
    M include/hw/qdev-core.h
    A include/hw/virtio/vhost-user-scmi.h
    M include/hw/virtio/vhost.h
    M include/hw/virtio/virtio-gpu.h
    M include/hw/virtio/virtio-iommu.h
    M include/hw/virtio/virtio.h
    M net/vhost-vdpa.c
    M tests/data/acpi/q35/DSDT.noacpihp
    M tests/qtest/bios-tables-test.c
    M tests/qtest/hd-geo-test.c
    M tests/qtest/libqos/meson.build
    A tests/qtest/libqos/virtio-scmi.c
    A tests/qtest/libqos/virtio-scmi.h
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu 
into staging

pc,pci,virtio: cleanups, fixes, features

vhost-user-gpu: edid
vhost-user-scmi device
vhost-vdpa: _F_CTRL_RX and _F_CTRL_RX_EXTRA support for svq

cleanups, fixes all over the place.

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

# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmSsjYMPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRp2vYH/20u6TAMssE/UAJoUU0ypbJkbHjDqiqDeuZN
# qDYazLUWIJTUbDnSfXAiRcdJuukEpEFcoHa9O6vgFE/SNod51IrvsJR9CbZxNmk6
# D+Px9dkMckDE/yb8f6hhcHsi7/1v04I0oSXmJTVYxWSKQhD4Km6x8Larqsh0u4yd
# n6laZ+VK5H8sk6QvI5vMz+lYavACQVryiWV/GAigP21B0eQK79I5/N6y0q8/axD5
# cpeTzUF+m33SfLfyd7PPmibCQFYrHDwosynSnr3qnKusPRJt2FzWkzOiZgbtgE2L
# UQ/S4sYTBy8dZJMc0wTywbs1bSwzNrkQ+uS0v74z9wCUYTgvQTA=
# =RsOh
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 11 Jul 2023 12:00:19 AM BST
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# 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

* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (66 
commits)
  vdpa: Allow VIRTIO_NET_F_CTRL_RX_EXTRA in SVQ
  vdpa: Restore packet receive filtering state relative with _F_CTRL_RX_EXTRA 
feature
  vdpa: Allow VIRTIO_NET_F_CTRL_RX in SVQ
  vdpa: Avoid forwarding large CVQ command failures
  vdpa: Accessing CVQ header through its structure
  vhost: Fix false positive out-of-bounds
  vdpa: Restore packet receive filtering state relative with _F_CTRL_RX feature
  vdpa: Restore MAC address filtering state
  vdpa: Use iovec for vhost_vdpa_net_load_cmd()
  pcie: Specify 0 for ARI next function numbers
  pcie: Use common ARI next function number
  include/hw/virtio: document some more usage of notifiers
  include/hw/virtio: add kerneldoc for virtio_init
  include/hw/virtio: document virtio_notify_config
  hw/virtio: fix typo in VIRTIO_CONFIG_IRQ_IDX comments
  include/hw: document the device_class_set_parent_* fns
  include: attempt to document device_class_set_props
  vdpa: Fix possible use-after-free for VirtQueueElement
  pcie: Add hotplug detect state register to cmask
  virtio-iommu: Rework the traces in virtio_iommu_set_page_size_mask()
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/154e3b61ac9c...2bb9d628a7e1



reply via email to

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