qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 191f90: msix: allow qword MSI-X table accesse


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 191f90: msix: allow qword MSI-X table accesses
Date: Fri, 12 Jun 2020 15:15:25 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 191f90cbea08122b48107f1f9116106fbf3bdfac
      
https://github.com/qemu/qemu/commit/191f90cbea08122b48107f1f9116106fbf3bdfac
  Author: Michael S. Tsirkin <mst@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/pci/msix.c

  Log Message:
  -----------
  msix: allow qword MSI-X table accesses

PCI spec says:

For all accesses to MSI-X Table and MSI-X PBA fields, software must use
aligned full DWORD or aligned full QWORD transactions; otherwise, the
result is undefined.

However, since MSI-X was converted to use memory API, QEMU
started blocking qword transactions, only allowing DWORD
ones. Guests do not seem to use QWORD accesses, but let's
be spec compliant.

Fixes: 95524ae8dc8f ("msix: convert to memory API")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


  Commit: acc5c98ddd8f85d41fd22e57cf289aeaa34f160a
      
https://github.com/qemu/qemu/commit/acc5c98ddd8f85d41fd22e57cf289aeaa34f160a
  Author: Vishal Verma <vishal.l.verma@intel.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  diffs-allowed: add the SRAT AML to diffs-allowed

In anticipation of a change to the SRAT generation in qemu, add the AML
file to diffs-allowed.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Message-Id: <20200606000911.9896-2-vishal.l.verma@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c3b0cf6e7dbc48ecf84ace4224f220fa9baa85b6
      
https://github.com/qemu/qemu/commit/c3b0cf6e7dbc48ecf84ace4224f220fa9baa85b6
  Author: Vishal Verma <vishal.l.verma@intel.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/acpi/nvdimm.c
    M hw/arm/virt-acpi-build.c
    M hw/i386/acpi-build.c
    M include/hw/mem/nvdimm.h

  Log Message:
  -----------
  hw/acpi/nvdimm: add a helper to augment SRAT generation

NVDIMMs can belong to their own proximity domains, as described by the
NFIT. In such cases, the SRAT needs to have Memory Affinity structures
in the SRAT for these NVDIMMs, otherwise Linux doesn't populate node
data structures properly during NUMA initialization. See the following
for an example failure case.

https://lore.kernel.org/linux-nvdimm/20200416225438.15208-1-vishal.l.verma@intel.com/

Introduce a new helper, nvdimm_build_srat(), and call it for both the
i386 and arm versions of 'build_srat()' to augment the SRAT with
memory affinity information for NVDIMMs.

The relevant command line options to exercise this are below. Nodes 0-1
contain CPUs and regular memory, and nodes 2-3 are the NVDIMM address
space.

    -object memory-backend-ram,id=mem0,size=2048M
    -numa node,nodeid=0,memdev=mem0,
    -numa cpu,node-id=0,socket-id=0
    -object memory-backend-ram,id=mem1,size=2048M
    -numa node,nodeid=1,memdev=mem1,
    -numa cpu,node-id=1,socket-id=1
    -numa node,nodeid=2,
    -object 
memory-backend-file,id=nvmem0,share,mem-path=nvdimm-0,size=16384M,align=1G
    -device nvdimm,memdev=nvmem0,id=nv0,label-size=2M,node=2
    -numa node,nodeid=3,
    -object 
memory-backend-file,id=nvmem1,share,mem-path=nvdimm-1,size=16384M,align=1G
    -device nvdimm,memdev=nvmem1,id=nv1,label-size=2M,node=3

Cc: Jingqi Liu <jingqi.liu@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Message-Id: <20200606000911.9896-3-vishal.l.verma@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 8a49b30034da8c5440f425a94e7fb12425f35283
      
https://github.com/qemu/qemu/commit/8a49b30034da8c5440f425a94e7fb12425f35283
  Author: Vishal Verma <vishal.l.verma@intel.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M tests/data/acpi/pc/SRAT.dimmpxm
    M tests/data/acpi/q35/SRAT.dimmpxm
    M tests/data/acpi/virt/SRAT.memhp
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: update expected SRAT files

Update expected SRAT files for the change to account for NVDIMM NUMA
nodes in the SRAT.

AML diffs:

tests/data/acpi/pc/SRAT.dimmpxm:
Message-Id: <20200606000911.9896-4-vishal.l.verma@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 9b20a3365d73dad4ad144eab9c5827dbbb2e9f21
      
https://github.com/qemu/qemu/commit/9b20a3365d73dad4ad144eab9c5827dbbb2e9f21
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  qtest: allow DSDT acpi table changes

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200515150421.25479-2-kraxel@redhat.com>


  Commit: df9b9b42cd2375a4eb785702899699a020ca2597
      
https://github.com/qemu/qemu/commit/df9b9b42cd2375a4eb785702899699a020ca2597
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: move aml builder code for rtc device

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200515150421.25479-3-kraxel@redhat.com>


  Commit: f592b94f3cbd5325bcf5142509b60cb6ab252770
      
https://github.com/qemu/qemu/commit/f592b94f3cbd5325bcf5142509b60cb6ab252770
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/rtc/mc146818rtc.c

  Log Message:
  -----------
  acpi: rtc: use a single crs range

Use a single io range for _CRS instead of two,
following what real hardware does.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200515150421.25479-4-kraxel@redhat.com>


  Commit: 4b8e369b91deff3ae7d8ae1067d336a66464f472
      
https://github.com/qemu/qemu/commit/4b8e369b91deff3ae7d8ae1067d336a66464f472
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: serial: don't use _STA method

The _STA method dates back to the days where we had a static DSDT.  The
device is listed in the DSDT table unconditionally and the _STA method
checks a bit in the isa bridge pci config space to figure whenever a
given is isa device is present or not, then evaluates to 0x0f (present)
or 0x00 (absent).

These days the DSDT is generated by qemu anyway, so if a device is not
present we can simply drop it from the DSDT instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200515150421.25479-5-kraxel@redhat.com>


  Commit: dcdbfaafe90a5e6e172368b2aa5500a9ca192e49
      
https://github.com/qemu/qemu/commit/dcdbfaafe90a5e6e172368b2aa5500a9ca192e49
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: move aml builder code for serial device

The code uses the isa_serial_io array to figure what the device uid is.
Side effect is that acpi antries are not limited to port 1+2 any more,
we'll also get entries for ports 3+4.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200515150421.25479-6-kraxel@redhat.com>


  Commit: 3e824d38256364f983be8717214fef709bc90e31
      
https://github.com/qemu/qemu/commit/3e824d38256364f983be8717214fef709bc90e31
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: parallel: don't use _STA method

The _STA method dates back to the days where we had a static DSDT.  The
device is listed in the DSDT table unconditionally and the _STA method
checks a bit in the isa bridge pci config space to figure whenever a
given is isa device is present or not, then evaluates to 0x0f (present)
or 0x00 (absent).

These days the DSDT is generated by qemu anyway, so if a device is not
present we can simply drop it from the DSDT instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200515150421.25479-7-kraxel@redhat.com>


  Commit: ed003c8c7743b846b1bf3f87cb88baf090da44e6
      
https://github.com/qemu/qemu/commit/ed003c8c7743b846b1bf3f87cb88baf090da44e6
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: move aml builder code for parallel device

Also adds support for multiple LPT devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200515150421.25479-8-kraxel@redhat.com>


  Commit: bab16ab33012cdae36246d2994b4a5ed9ac441f0
      
https://github.com/qemu/qemu/commit/bab16ab33012cdae36246d2994b4a5ed9ac441f0
  Author: Michael S. Tsirkin <mst@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/q35/DSDT
    M tests/data/acpi/q35/DSDT.acpihmat
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.cphp
    M tests/data/acpi/q35/DSDT.dimmpxm
    M tests/data/acpi/q35/DSDT.ipmibt
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.numamem
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: update DSDT expected files

Update DSDT after CRS changes and _STA methods dropped.

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


  Commit: 7e7c1b84ca11c36a4269baa6538a47dbdf2ee758
      
https://github.com/qemu/qemu/commit/7e7c1b84ca11c36a4269baa6538a47dbdf2ee758
  Author: Stefan Berger <stefanb@linux.ibm.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: tpm: Do not build TCPA table for TPM 2

Do not build a TCPA table for TPM 2 anymore but create the log area when
building the TPM2 table. The TCPA table is only needed for TPM 1.2.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 04b778610af51987309055440b1ff16b50db5646
      
https://github.com/qemu/qemu/commit/04b778610af51987309055440b1ff16b50db5646
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: Convert build_tpm2() to build_append* API

In preparation of its move to the generic acpi code,
let's convert build_tpm2() to use build_append API. This
latter now is prefered in place of direct ACPI struct field
settings with manual endianness conversion.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20200601095737.32671-2-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4338416064303aad7929a247770f2ed4d9652966
      
https://github.com/qemu/qemu/commit/4338416064303aad7929a247770f2ed4d9652966
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  acpi: Move build_tpm2() in the generic part

We plan to build the TPM2 table on ARM too. In order to reuse the
generation code, let's move build_tpm2() to aml-build.c.

No change in the implementation.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20200601095737.32671-3-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 80bde69353924d99e2a7f5ac6be0ab4cf489d33c
      
https://github.com/qemu/qemu/commit/80bde69353924d99e2a7f5ac6be0ab4cf489d33c
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/acpi/aml-build.c
    M hw/arm/virt-acpi-build.c
    M include/sysemu/tpm.h

  Log Message:
  -----------
  arm/acpi: TPM2 ACPI table support

Add a TPM2 ACPI table if a TPM2.0 sysbus device has been
dynamically instantiated.

Signed-off-by: Eric Auger <eric.auger@redhat.com>

Message-Id: <20200601095737.32671-4-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 266345a867c290d6664c008b3bb3945395eca821
      
https://github.com/qemu/qemu/commit/266345a867c290d6664c008b3bb3945395eca821
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M tests/qtest/tpm-emu.h

  Log Message:
  -----------
  test/tpm-emu: include sockets and channel headers in tpm-emu header

Include sockets and channel headers to that the header is
self-contained.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20200609125409.24179-2-eric.auger@redhat.com>


  Commit: 6d6d1a23fc2ed42ab6ac76e289000474def8ff0c
      
https://github.com/qemu/qemu/commit/6d6d1a23fc2ed42ab6ac76e289000474def8ff0c
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  tests/acpi: Add void tables for Q35/TPM-TIS bios-tables-test

Add placeholders for TPM and DSDT reference tables for
Q35 TPM-TIS tests and ignore them for the time being.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>

Message-Id: <20200609125409.24179-3-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c7504b9f32f2ee6ddcb2b0d69219046b3fa48c2d
      
https://github.com/qemu/qemu/commit/c7504b9f32f2ee6ddcb2b0d69219046b3fa48c2d
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M tests/qtest/tpm-emu.c

  Log Message:
  -----------
  tests: tpm-emu: Remove assert on TPM2_ST_NO_SESSIONS

bios-tables-test executes SeaBIOS. Indeed FW is needed to
fetch tables from QEMU and put them into the guest RAM. Also
the FW patches cross table pointers. At some point, SeaBIOS
ends up calling the TPM2_CC_HierarchyControl command with
TPM2_ST_SESSIONS tag, most probably steming from
tpm_set_failure/tpm20_hierarchycontrol SeaBIOS call path.
This causes an assert() in the qtest tpm emulation code.

As the goal here is not to boot SeaBIOS completely but just
let it grab the ACPI tables and consolidate them, let's just
remove the assert().

Signed-off-by: Eric Auger <eric.auger@redhat.com>

Message-Id: <20200609125409.24179-4-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 5da7c35e25a4cba351602774e30cb59173af3c73
      
https://github.com/qemu/qemu/commit/5da7c35e25a4cba351602774e30cb59173af3c73
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  bios-tables-test: Add Q35/TPM-TIS test

Test tables specific to the TPM-TIS instantiation.
The TPM2 is added in the framework. Also the DSDT
is updated with the TPM. The new function should be
be usable for CRB as well, later one.

Signed-off-by: Eric Auger <eric.auger@redhat.com>

Message-Id: <20200609125409.24179-5-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: cae98d8c86b7c76eae1c389ff7b9bd98143f656d
      
https://github.com/qemu/qemu/commit/cae98d8c86b7c76eae1c389ff7b9bd98143f656d
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  bios-tables-test: Generate reference tables for Q35/TPM-TIS

TPM2, DSDT tables were generated using
tests/data/acpi/rebuild-expected-aml.sh

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20200609125409.24179-6-eric.auger@redhat.com>

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


  Commit: 12fc8903a8ee09fb5f642de82699a0b211e1b5a7
      
https://github.com/qemu/qemu/commit/12fc8903a8ee09fb5f642de82699a0b211e1b5a7
  Author: David Hildenbrand <david@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  virtio-balloon: fix free page hinting without an iothread

In case we don't have an iothread, we mark the feature as abscent but
still add the queue. 'free_page_bh' remains set to NULL.

qemu-system-i386 \
        -M microvm \
        -nographic \
        -device virtio-balloon-device,free-page-hint=true \
        -nographic \
        -display none \
        -monitor none \
        -serial none \
        -qtest stdio

Doing a "write 0xc0000e30 0x24
0x030000000300000003000000030000000300000003000000030000000300000003000000"

We will trigger a SEGFAULT. Let's move the check and bail out.

While at it, move the static initializations to instance_init().
free_page_report_status and block_iothread are implicitly set to the
right values (0/false) already, so drop the initialization.

Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT")
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Cc: qemu-stable@nongnu.org
Cc: Wei Wang <wei.w.wang@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200520100439.19872-2-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 49b01711b8eb3796c6904c7f85d2431572cfe54f
      
https://github.com/qemu/qemu/commit/49b01711b8eb3796c6904c7f85d2431572cfe54f
  Author: David Hildenbrand <david@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  virtio-balloon: fix free page hinting check on unrealize

Checking against guest features is wrong. We allocated data structures
based on host features. We can rely on "free_page_bh" as an indicator
whether to un-do stuff instead.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT")
Cc: qemu-stable@nongnu.org
Cc: Wei Wang <wei.w.wang@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200520100439.19872-3-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 105aef9c9479786d27c1c45c9b0b1fa03dc46be3
      
https://github.com/qemu/qemu/commit/105aef9c9479786d27c1c45c9b0b1fa03dc46be3
  Author: David Hildenbrand <david@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  virtio-balloon: unref the iothread when unrealizing

We took a reference when realizing, so let's drop that reference when
unrealizing.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT")
Cc: qemu-stable@nongnu.org
Cc: Wei Wang <wei.w.wang@intel.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200520100439.19872-4-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7483cbbaf8204de330b7362339a4a070b114b425
      
https://github.com/qemu/qemu/commit/7483cbbaf8204de330b7362339a4a070b114b425
  Author: Alexander Duyck <alexander.h.duyck@linux.intel.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/core/machine.c
    M hw/virtio/virtio-balloon.c
    M include/hw/virtio/virtio-balloon.h

  Log Message:
  -----------
  virtio-balloon: Implement support for page poison reporting feature

We need to make certain to advertise support for page poison reporting if
we want to actually get data on if the guest will be poisoning pages.

Add a value for reporting the poison value being used if page poisoning is
enabled in the guest. With this we can determine if we will need to skip
free page reporting when it is enabled in the future.

The value currently has no impact on existing balloon interfaces. In the
case of existing balloon interfaces the onus is on the guest driver to
reapply whatever poison is in place.

When we add free page reporting the poison value is used to determine if
we can perform in-place page reporting. The expectation is that a reported
page will already contain the value specified by the poison, and the
reporting of the page should not change that value.

Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Message-Id: <20200527041400.12700.33251.stgit@localhost.localdomain>


  Commit: 91b867191ddf73c64f51ca2ddb489b922ed4058e
      
https://github.com/qemu/qemu/commit/91b867191ddf73c64f51ca2ddb489b922ed4058e
  Author: Alexander Duyck <alexander.h.duyck@linux.intel.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  virtio-balloon: Provide an interface for free page reporting

Add support for free page reporting. The idea is to function very similar
to how the balloon works in that we basically end up madvising the page as
not being used. However we don't really need to bother with any deflate
type logic since the page will be faulted back into the guest when it is
read or written to.

This provides a new way of letting the guest proactively report free
pages to the hypervisor, so the hypervisor can reuse them. In contrast to
inflate/deflate that is triggered via the hypervisor explicitly.

Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Message-Id: <20200527041407.12700.73735.stgit@localhost.localdomain>


  Commit: b963ea19f896e34e21275ff69fa4565948f703c8
      
https://github.com/qemu/qemu/commit/b963ea19f896e34e21275ff69fa4565948f703c8
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Fix the classification of bios-tables-test-allowed-diff.h

The file tests/qtest/bios-tables-test-allowed-diff.h is currently only
assigned to the qtest section according MAINTAINERS. However, this file
normally only gets updated when the ACPI tables changed - something the
qtest maintainers don't have much clue of. Thus this file should rather
be assigned to the ACPI maintainers instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200607052022.12222-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 0dabc0f6544f2c0310546f6d6cf3b68979580a9c
      
https://github.com/qemu/qemu/commit/0dabc0f6544f2c0310546f6d6cf3b68979580a9c
  Author: Julia Suvorova <jusual@redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  hw/pci/pcie: Move hot plug capability check to pre_plug callback

Check for hot plug capability earlier to avoid removing devices attached
during the initialization process.

Run qemu with an unattached drive:
  -drive file=$FILE,if=none,id=drive0 \
  -device pcie-root-port,id=rp0,slot=3,bus=pcie.0,hotplug=off
Hotplug a block device:
  device_add virtio-blk-pci,id=blk0,drive=drive0,bus=rp0
If hotplug fails on plug_cb, drive0 will be deleted.

Fixes: 0501e1aa1d32a6 ("hw/pci/pcie: Forbid hot-plug if it's disabled on the 
slot")

Acked-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Julia Suvorova <jusual@redhat.com>
Message-Id: <20200604125947.881210-1-jusual@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f7d6a635fa3b7797f9d072e280f065bf3cfcd24d
      
https://github.com/qemu/qemu/commit/f7d6a635fa3b7797f9d072e280f065bf3cfcd24d
  Author: Prasad J Pandit <pjp@fedoraproject.org>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: assert configuration access is within bounds

While accessing PCI configuration bytes, assert that
'address + len' is within PCI configuration space.

Generally it is within bounds. This is more of a defensive
assert, in case a buggy device was to send 'address' which
may go out of bounds.

Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-Id: <20200604113525.58898-1-ppandit@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ea2fe4dfe4e5d32e69ae749a3b9f287aaf8b898e
      
https://github.com/qemu/qemu/commit/ea2fe4dfe4e5d32e69ae749a3b9f287aaf8b898e
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  hw/pci-host/prep: Correct RAVEN bus bridge memory region size

memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the bm-raven MemoryRegion
ends up missing 1 byte:

  $ qemu-system-ppc -M prep -S -monitor stdio -usb
  memory-region: bm-raven
    0000000000000000-00000000fffffffe (prio 0, i/o): bm-raven
      0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory 
@pci-memory 0000000000000000-000000003effffff
      0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 
0000000000000000-000000007fffffff

Fix by using the correct value. We now have:

  memory-region: bm-raven
    0000000000000000-00000000ffffffff (prio 0, i/o): bm-raven
      0000000000000000-000000003effffff (prio 0, i/o): alias bm-pci-memory 
@pci-memory 0000000000000000-000000003effffff
      0000000080000000-00000000ffffffff (prio 0, i/o): alias bm-system @system 
0000000000000000-000000007fffffff

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200601142930.29408-3-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 2dc48da25547bf82dee81f4e60766509b28e736e
      
https://github.com/qemu/qemu/commit/2dc48da25547bf82dee81f4e60766509b28e736e
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/pci/pci_bridge.c

  Log Message:
  -----------
  hw/pci/pci_bridge: Correct pci_bridge_io memory region size

memory_region_set_size() handle the 16 Exabytes limit by
special-casing the UINT64_MAX value. This is not a problem
for the 32-bit maximum, 4 GiB.
By using the UINT32_MAX value, the pci_bridge_io MemoryRegion
ends up missing 1 byte:

  (qemu) info mtree
  memory-region: pci_bridge_io
    0000000000000000-00000000fffffffe (prio 0, i/o): pci_bridge_io
      0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
      0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
      00000000000001ce-00000000000001d1 (prio 0, i/o): vbe
      0000000000000378-000000000000037f (prio 0, i/o): parallel
      00000000000003b4-00000000000003b5 (prio 0, i/o): vga
      ...

Fix by using the correct value. We now have:

  memory-region: pci_bridge_io
    0000000000000000-00000000ffffffff (prio 0, i/o): pci_bridge_io
      0000000000000060-0000000000000060 (prio 0, i/o): i8042-data
      0000000000000064-0000000000000064 (prio 0, i/o): i8042-cmd
      ...

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200601142930.29408-4-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 37e7211cae59d090eafdf26fb2b21ca41df7aed8
      
https://github.com/qemu/qemu/commit/37e7211cae59d090eafdf26fb2b21ca41df7aed8
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M hw/pci/pci_bridge.c

  Log Message:
  -----------
  hw/pci/pci_bridge: Use the IEC binary prefix definitions

IEC binary prefixes ease code review: the unit is explicit.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200601142930.29408-5-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 51eae1e7e427ef9efc7c10c52b33575fe685add3
      
https://github.com/qemu/qemu/commit/51eae1e7e427ef9efc7c10c52b33575fe685add3
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  hw/pci-host: Use the IEC binary prefix definitions

IEC binary prefixes ease code review: the unit is explicit.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200601142930.29408-6-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 271094474b65de1ad7aaf729938de3d9b9d0d36f
      
https://github.com/qemu/qemu/commit/271094474b65de1ad7aaf729938de3d9b9d0d36f
  Author: Dima Stepanov <dimastep@yandex-team.ru>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M chardev/char-socket.c

  Log Message:
  -----------
  char-socket: return -1 in case of disconnect during tcp_chr_write

During testing of the vhost-user-blk reconnect functionality the qemu
SIGSEGV was triggered:
 start qemu as:
 x86_64-softmmu/qemu-system-x86_64 -m 1024M -M q35 \
   -object 
memory-backend-file,id=ram-node0,size=1024M,mem-path=/dev/shm/qemu,share=on \
   -numa node,cpus=0,memdev=ram-node0 \
   -chardev socket,id=chardev0,path=./vhost.sock,noserver,reconnect=1 \
   -device vhost-user-blk-pci,chardev=chardev0,num-queues=4 --enable-kvm
 start vhost-user-blk daemon:
 ./vhost-user-blk -s ./vhost.sock -b test-img.raw

If vhost-user-blk will be killed during the vhost initialization
process, for instance after getting VHOST_SET_VRING_CALL command, then
QEMU will fail with the following backtrace:

Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
0x00005555559272bb in vhost_user_read (dev=0x7fffef2d53e0, msg=0x7fffffffd5b0)
    at ./hw/virtio/vhost-user.c:260
260         CharBackend *chr = u->user->chr;

 #0  0x00005555559272bb in vhost_user_read (dev=0x7fffef2d53e0, 
msg=0x7fffffffd5b0)
    at ./hw/virtio/vhost-user.c:260
 #1  0x000055555592acb8 in vhost_user_get_config (dev=0x7fffef2d53e0, 
config=0x7fffef2d5394 "", config_len=60)
    at ./hw/virtio/vhost-user.c:1645
 #2  0x0000555555925525 in vhost_dev_get_config (hdev=0x7fffef2d53e0, 
config=0x7fffef2d5394 "", config_len=60)
    at ./hw/virtio/vhost.c:1490
 #3  0x00005555558cc46b in vhost_user_blk_device_realize (dev=0x7fffef2d51a0, 
errp=0x7fffffffd8f0)
    at ./hw/block/vhost-user-blk.c:429
 #4  0x0000555555920090 in virtio_device_realize (dev=0x7fffef2d51a0, 
errp=0x7fffffffd948)
    at ./hw/virtio/virtio.c:3615
 #5  0x0000555555a9779c in device_set_realized (obj=0x7fffef2d51a0, value=true, 
errp=0x7fffffffdb88)
    at ./hw/core/qdev.c:891
 ...

The problem is that vhost_user_write doesn't get an error after
disconnect and try to call vhost_user_read(). The tcp_chr_write()
routine should return -1 in case of disconnect. Indicate the EIO error
if this routine is called in the disconnected state.

Signed-off-by: Dima Stepanov <dimastep@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: 
<aeb7806bfc945faadf09f64dcfa30f59de3ac053.1590396396.git.dimastep@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4bcad76f4c390f798198a9a93fbaa1a20d06b73e
      
https://github.com/qemu/qemu/commit/4bcad76f4c390f798198a9a93fbaa1a20d06b73e
  Author: Dima Stepanov <dimastep@yandex-team.ru>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  vhost-user-blk: delay vhost_user_blk_disconnect

A socket write during vhost-user communication may trigger a disconnect
event, calling vhost_user_blk_disconnect() and clearing all the
vhost_dev structures holding data that vhost-user functions expect to
remain valid to roll back initialization correctly. Delay the cleanup to
keep vhost_dev structure valid.
There are two possible states to handle:
1. RUN_STATE_PRELAUNCH: skip bh oneshot call and perform disconnect in
the caller routine.
2. RUN_STATE_RUNNING: delay by using bh

BH changes are based on the similar changes for the vhost-user-net
device:
  commit e7c83a885f865128ae3cf1946f8cb538b63cbfba
  "vhost-user: delay vhost_user_stop"

Signed-off-by: Dima Stepanov <dimastep@yandex-team.ru>
Message-Id: 
<69b73b94dcd066065595266c852810e0863a0895.1590396396.git.dimastep@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>


  Commit: ece99091c2d0aeb23734289a50ef2ff4e0a08929
      
https://github.com/qemu/qemu/commit/ece99091c2d0aeb23734289a50ef2ff4e0a08929
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  Add helper to populate vhost-user message regions

When setting vhost-user memory tables, memory region descriptors must be
copied from the vhost_dev struct to the vhost-user message. To avoid
duplicating code in setting the memory tables, we should use a helper to
populate this field. This change adds this helper.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-2-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 23374a84c5f08e20ec2506a6322330d51f9134c5
      
https://github.com/qemu/qemu/commit/23374a84c5f08e20ec2506a6322330d51f9134c5
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

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

  Log Message:
  -----------
  Add vhost-user helper to get MemoryRegion data

When setting the memory tables, qemu uses a memory region's userspace
address to look up the region's MemoryRegion struct. Among other things,
the MemoryRegion contains the region's offset and associated file
descriptor, all of which need to be sent to the backend.

With VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS, this logic will be
needed in multiple places, so before feature support is added it
should be moved to a helper function.

This helper is also used to simplify the vhost_user_can_merge()
function.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-3-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 6b0eff1a4ea47c835a7d8bee88c05c47ada37495
      
https://github.com/qemu/qemu/commit/6b0eff1a4ea47c835a7d8bee88c05c47ada37495
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M docs/interop/vhost-user.rst
    M hw/virtio/vhost-user.c
    M include/hw/virtio/vhost-user.h

  Log Message:
  -----------
  Add VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS

This change introduces a new feature to the vhost-user protocol allowing
a backend device to specify the maximum number of ram slots it supports.

At this point, the value returned by the backend will be capped at the
maximum number of ram slots which can be supported by vhost-user, which
is currently set to 8 because of underlying protocol limitations.

The returned value will be stored inside the VhostUserState struct so
that on device reconnect we can verify that the ram slot limitation
has not decreased since the last time the device connected.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Peter Turschmid <peter.turschm@nutanix.com>
Message-Id: <1588533678-23450-4-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: f1aeb14b0809e313c74244d838645ed25e85ea63
      
https://github.com/qemu/qemu/commit/f1aeb14b0809e313c74244d838645ed25e85ea63
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

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

  Log Message:
  -----------
  Transmit vhost-user memory regions individually

With this change, when the VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS
protocol feature has been negotiated, Qemu no longer sends the backend
all the memory regions in a single message. Rather, when the memory
tables are set or updated, a series of VHOST_USER_ADD_MEM_REG and
VHOST_USER_REM_MEM_REG messages are sent to transmit the regions to map
and/or unmap instead of sending send all the regions in one fixed size
VHOST_USER_SET_MEM_TABLE message.

The vhost_user struct maintains a shadow state of the VM’s memory
regions. When the memory tables are modified, the
vhost_user_set_mem_table() function compares the new device memory state
to the shadow state and only sends regions which need to be unmapped or
mapped in. The regions which must be unmapped are sent first, followed
by the new regions to be mapped in. After all the messages have been
sent, the shadow state is set to the current virtual device state.

Existing backends which do not support
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS are unaffected.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Signed-off-by: Peter Turschmid <peter.turschm@nutanix.com>
Suggested-by: Mike Cui <cui@nutanix.com>
Message-Id: <1588533678-23450-5-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 27598393a23215cfbf92ad550b9541675b0b8f2b
      
https://github.com/qemu/qemu/commit/27598393a23215cfbf92ad550b9541675b0b8f2b
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

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

  Log Message:
  -----------
  Lift max memory slots limit imposed by vhost-user

Historically, sending all memory regions to vhost-user backends in a
single message imposed a limitation on the number of times memory
could be hot-added to a VM with a vhost-user device. Now that backends
which support the VHOST_USER_PROTOCOL_F_CONFIGURE_SLOTS send memory
regions individually, we no longer need to impose this limitation on
devices which support this feature.

With this change, VMs with a vhost-user device which supports the
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS can support a configurable
number of memory slots, up to the maximum allowed by the target
platform.

Existing backends which do not support
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS are unaffected.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Peter Turschmid <peter.turschm@nutanix.com>
Suggested-by: Mike Cui <cui@nutanix.com>
Message-Id: <1588533678-23450-6-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 08fccf8f077397b47c740d4850cdeedc947f21ac
      
https://github.com/qemu/qemu/commit/08fccf8f077397b47c740d4850cdeedc947f21ac
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  Refactor out libvhost-user fault generation logic

In libvhost-user, the incoming postcopy migration path for setting the
backend's memory tables has become convolued. In particular, moving the
logic which starts generating faults, having received the final ACK from
qemu can be moved to a separate function. This simplifies the code
substantially.

This logic will also be needed by the postcopy path once the
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS feature is supported.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-7-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 6fb2e173d20c9bbb5466183d33a3ad7dcd0375fa
      
https://github.com/qemu/qemu/commit/6fb2e173d20c9bbb5466183d33a3ad7dcd0375fa
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c
    M contrib/libvhost-user/libvhost-user.h

  Log Message:
  -----------
  Support ram slot configuration in libvhost-user

The VHOST_USER_GET_MAX_MEM_SLOTS message allows a vhost-user backend to
specify a maximum number of ram slots it is willing to support. This
change adds support for libvhost-user to process this message. For now
the backend will reply with 8 as the maximum number of regions
supported.

libvhost-user does not yet support the vhost-user protocol feature
VHOST_USER_PROTOCOL_F_CONFIGIRE_MEM_SLOTS, so qemu should never
send the VHOST_USER_GET_MAX_MEM_SLOTS message. Therefore this new
functionality is not currently used.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-8-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: ec94c8e621de96c50c2d381c8c9ec94f5beec7c1
      
https://github.com/qemu/qemu/commit/ec94c8e621de96c50c2d381c8c9ec94f5beec7c1
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c
    M contrib/libvhost-user/libvhost-user.h

  Log Message:
  -----------
  Support adding individual regions in libvhost-user

When the VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS is enabled, qemu will
transmit memory regions to a backend individually using the new message
VHOST_USER_ADD_MEM_REG. With this change vhost-user backends built with
libvhost-user can now map in new memory regions when VHOST_USER_ADD_MEM_REG
messages are received.

Qemu only sends VHOST_USER_ADD_MEM_REG messages when the
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS feature is negotiated, and
since it is not yet supported in libvhost-user, this new functionality
is not yet used.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-9-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 875b9fd97b34dae796d61330804b094ca7b1b403
      
https://github.com/qemu/qemu/commit/875b9fd97b34dae796d61330804b094ca7b1b403
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c
    M contrib/libvhost-user/libvhost-user.h

  Log Message:
  -----------
  Support individual region unmap in libvhost-user

When the VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS protocol feature is
enabled, on memory hot-unplug qemu will transmit memory regions to
remove individually using the new message VHOST_USER_REM_MEM_REG
message. With this change, vhost-user backends build with libvhost-user
can now unmap individual memory regions when receiving the
VHOST_USER_REM_MEM_REG message.

Qemu only sends VHOST_USER_REM_MEM_REG messages when the
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS feature is negotiated, and
support for that feature has not yet been added in libvhost-user, this
new functionality is not yet used.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-10-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b650d5f4b1cd3f9f8c4fdb319838c5c1e0695e41
      
https://github.com/qemu/qemu/commit/b650d5f4b1cd3f9f8c4fdb319838c5c1e0695e41
  Author: Raphael Norwitz <raphael.norwitz@nutanix.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c
    M contrib/libvhost-user/libvhost-user.h

  Log Message:
  -----------
  Lift max ram slots limit in libvhost-user

Historically, VMs with vhost-user devices could hot-add memory a maximum
of 8 times. Now that the VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS
protocol feature has been added, VMs with vhost-user backends which
support this new feature can support a configurable number of ram slots
up to the maximum supported by the target platform.

This change adds VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS support for
backends built with libvhost-user, and increases the number of supported
ram slots from 8 to 32.

Memory hot-add, hot-remove and postcopy migration were tested with
the vhost-user-bridge sample.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1588533678-23450-11-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a9a5c473d25d83bcdad27d97e5fb451950ee894a
      
https://github.com/qemu/qemu/commit/a9a5c473d25d83bcdad27d97e5fb451950ee894a
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c
    M contrib/vhost-user-blk/vhost-user-blk.c

  Log Message:
  -----------
  libvhost-user: advertise vring features

libvhost-user implements several vring features without advertising
them. There is no way for the vhost-user master to detect support for
these features.

Things more or less work today because QEMU assumes the vhost-user
backend always implements certain feature bits like
VIRTIO_RING_F_EVENT_IDX. This is not documented anywhere.

This patch explicitly advertises features implemented in libvhost-user
so that the vhost-user master does not need to make undocumented
assumptions.

Feature bits that libvhost-user now advertises can be removed from
vhost-user-blk.c. Devices should not be responsible for advertising
vring feature bits, that is libvhost-user's job.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200529161338.456017-1-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 00823980b296c80a3ff7b448df20c48897cd62e9
      
https://github.com/qemu/qemu/commit/00823980b296c80a3ff7b448df20c48897cd62e9
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  hw/pci: Fix crash when running QEMU with "-nic model=rocker"

QEMU currently aborts when being started with "-nic model=rocker" or with
"-net nic,model=rocker". This happens because the "rocker" device is not
a normal NIC but a switch, which has different properties. Thus we should
only consider real NIC devices for "-nic" and "-net". These devices can
be identified by the "netdev" property, so check for this property before
adding the device to the list.

Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Fixes: 52310c3fa7dc854d ("net: allow using any PCI NICs in -net or -nic")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200527153152.9211-1-thuth@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c6136ec0c6fea0db638de08720018fd4bc777787
      
https://github.com/qemu/qemu/commit/c6136ec0c6fea0db638de08720018fd4bc777787
  Author: Stefano Garzarella <sgarzare@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M hw/virtio/Makefile.objs
    A hw/virtio/vhost-vsock-common.c
    M hw/virtio/vhost-vsock.c
    A include/hw/virtio/vhost-vsock-common.h
    M include/hw/virtio/vhost-vsock.h

  Log Message:
  -----------
  vhost-vsock: add vhost-vsock-common abstraction

This patch prepares the introduction of vhost-user-vsock, moving
the common code usable for both vhost-vsock and vhost-user-vsock
devices, in the new vhost-vsock-common parent class.

While moving the code, fixed checkpatch warnings about block comments.

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


  Commit: 5fe97d8829e8bc2a297474df20cd3ac12eebdbba
      
https://github.com/qemu/qemu/commit/5fe97d8829e8bc2a297474df20cd3ac12eebdbba
  Author: Stefano Garzarella <sgarzare@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M configure
    M hw/virtio/Makefile.objs
    A hw/virtio/vhost-user-vsock.c
    A include/hw/virtio/vhost-user-vsock.h

  Log Message:
  -----------
  virtio: add vhost-user-vsock base device

This patch introduces a vhost-user device for vsock, using the
vhost-vsock-common parent class.

The vhost-user-vsock device can be used to implement the virtio-vsock
device emulation in user-space.

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


  Commit: 9b83bb27477f3fb2c08db32ea2ee9e8f817f0f9d
      
https://github.com/qemu/qemu/commit/9b83bb27477f3fb2c08db32ea2ee9e8f817f0f9d
  Author: Stefano Garzarella <sgarzare@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M hw/virtio/Makefile.objs
    A hw/virtio/vhost-user-vsock-pci.c

  Log Message:
  -----------
  virtio: add vhost-user-vsock-pci device

Add the PCI version of vhost-user-vsock

Launch QEMU like this:

  qemu -chardev socket,path=/tmp/vm.vsock,id=chr0 \
       -device vhost-user-vsock-pci,chardev=chr0

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


  Commit: 1dc32f9aeb127d995efd52a29f57460c011780da
      
https://github.com/qemu/qemu/commit/1dc32f9aeb127d995efd52a29f57460c011780da
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

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

  Log Message:
  -----------
  acpi: make build_madt() more generic.

Remove PCMachineState dependency from build_madt().
Pass AcpiDeviceIf as separate argument instead of
depending on PCMachineState->acpi_dev.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200520132003.9492-6-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: eb66ffabc00a7b062b2c73b9178eb2679328813b
      
https://github.com/qemu/qemu/commit/eb66ffabc00a7b062b2c73b9178eb2679328813b
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M hw/i386/Makefile.objs
    M hw/i386/acpi-build.c
    A hw/i386/acpi-common.c
    A hw/i386/acpi-common.h

  Log Message:
  -----------
  acpi: create acpi-common.c and move madt code

We'll need madt support for microvm.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200520132003.9492-7-kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 5794d34a13d11e12d9bc53ea4ade997c2ff81c4c
      
https://github.com/qemu/qemu/commit/5794d34a13d11e12d9bc53ea4ade997c2ff81c4c
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

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

  Log Message:
  -----------
  acpi: madt: skip pci override on pci-less systems.

Needed for microvm.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200520132003.9492-8-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c8ed8f57cc558045638512249ffc5f3633f76db1
      
https://github.com/qemu/qemu/commit/c8ed8f57cc558045638512249ffc5f3633f76db1
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M hw/acpi/aml-build.c
    M include/hw/acpi/acpi-defs.h

  Log Message:
  -----------
  acpi: fadt: add hw-reduced sleep register support

Add fields to struct AcpiFadtData and update build_fadt() to properly
generate sleep register entries.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200520132003.9492-9-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 32905fc95c0a082f4cb28b8076e0160b3c62c7f8
      
https://github.com/qemu/qemu/commit/32905fc95c0a082f4cb28b8076e0160b3c62c7f8
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

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

  Log Message:
  -----------
  acpi: ged: rename event memory region

Rename memory region and callbacks and ops to carry "evt" in the name
because a second region will be added shortly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200520132003.9492-10-kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Igor Mammedow <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 62925fd2b8b778539607b321216cd54897ddb63a
      
https://github.com/qemu/qemu/commit/62925fd2b8b778539607b321216cd54897ddb63a
  Author: Raphael Norwitz <raphael.s.norwitz@gmail.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  Fix parameter type in vhost migration log path

The ‘enable’ parameter to the vhost_migration_log() function is given as
an int, but "true"/"false" values are passed in wherever it is invoked.
Inside the function itself it is only ever compared with bool values.
Therefore the parameter value itself should be changed to bool.

Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <CAFubqFtqNZw=Y-ar3N=3zTQi6LkKg_G-7W7OOHHbE7Y1fV7HAQ@mail.gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 12fcf49c1a016cc05638b965f4e7b909794bffa2
      
https://github.com/qemu/qemu/commit/12fcf49c1a016cc05638b965f4e7b909794bffa2
  Author: Peter Xu <peterx@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M hw/pci/pci.c
    M monitor/hmp-cmds.c
    M qapi/misc.json

  Log Message:
  -----------
  pci: Display PCI IRQ pin in "info pci"

Sometimes it would be good to be able to read the pin number along
with the IRQ number allocated.  Since we'll dump the IRQ number, no
reason to not dump the pin information.  For example, the vfio-pci
device will overwrite the pin with the hardware pin number.  It would
be nice to know the pin number of one assigned device from QMP/HMP.

CC: Dr. David Alan Gilbert <dgilbert@redhat.com>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
CC: Julia Suvorova <jusual@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20200317195908.283800-1-peterx@redhat.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>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>


  Commit: 10d35e581901c09ee3817ac7cddd296d05291a9d
      
https://github.com/qemu/qemu/commit/10d35e581901c09ee3817ac7cddd296d05291a9d
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

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

  Log Message:
  -----------
  virtio-pci: fix queue_enable write

Spec said: The driver uses this to selectively prevent the device from
executing requests from this virtqueue. 1 - enabled; 0 - disabled.

Though write 0 to queue_enable is forbidden by the spec, we should not
assume that the value is 1.

Fix this by ignore the write value other than 1.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20200610054351.15811-1-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 9e3903136d9acde2fb2dd9e967ba928050a6cb4a
      
https://github.com/qemu/qemu/commit/9e3903136d9acde2fb2dd9e967ba928050a6cb4a
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M MAINTAINERS
    M chardev/char-socket.c
    M configure
    M contrib/libvhost-user/libvhost-user.c
    M contrib/libvhost-user/libvhost-user.h
    M contrib/vhost-user-blk/vhost-user-blk.c
    M docs/interop/vhost-user.rst
    M hw/acpi/aml-build.c
    M hw/acpi/generic_event_device.c
    M hw/acpi/nvdimm.c
    M hw/arm/virt-acpi-build.c
    M hw/block/vhost-user-blk.c
    M hw/char/parallel.c
    M hw/char/serial-isa.c
    M hw/core/machine.c
    M hw/i386/Makefile.objs
    M hw/i386/acpi-build.c
    A hw/i386/acpi-common.c
    A hw/i386/acpi-common.h
    M hw/pci-host/i440fx.c
    M hw/pci-host/prep.c
    M hw/pci-host/q35.c
    M hw/pci-host/versatile.c
    M hw/pci/msix.c
    M hw/pci/pci.c
    M hw/pci/pci_bridge.c
    M hw/pci/pcie.c
    M hw/rtc/mc146818rtc.c
    M hw/virtio/Makefile.objs
    A hw/virtio/vhost-user-vsock-pci.c
    A hw/virtio/vhost-user-vsock.c
    M hw/virtio/vhost-user.c
    A hw/virtio/vhost-vsock-common.c
    M hw/virtio/vhost-vsock.c
    M hw/virtio/virtio-balloon.c
    M hw/virtio/virtio-pci.c
    M include/hw/acpi/acpi-defs.h
    M include/hw/acpi/aml-build.h
    M include/hw/acpi/generic_event_device.h
    M include/hw/mem/nvdimm.h
    A include/hw/virtio/vhost-user-vsock.h
    M include/hw/virtio/vhost-user.h
    A include/hw/virtio/vhost-vsock-common.h
    M include/hw/virtio/vhost-vsock.h
    M include/hw/virtio/virtio-balloon.h
    M include/sysemu/tpm.h
    M monitor/hmp-cmds.c
    M qapi/misc.json
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/SRAT.dimmpxm
    M tests/data/acpi/q35/DSDT
    M tests/data/acpi/q35/DSDT.acpihmat
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.cphp
    M tests/data/acpi/q35/DSDT.dimmpxm
    M tests/data/acpi/q35/DSDT.ipmibt
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.numamem
    A tests/data/acpi/q35/DSDT.tis
    M tests/data/acpi/q35/SRAT.dimmpxm
    A tests/data/acpi/q35/TPM2.tis
    M tests/data/acpi/virt/SRAT.memhp
    M tests/qtest/Makefile.include
    M tests/qtest/bios-tables-test.c
    M tests/qtest/tpm-emu.c
    M tests/qtest/tpm-emu.h

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

virtio,acpi,pci: features, fixes, cleanups, tests

Max slots negotiation for vhost-user.
Free page reporting for balloon.
Partial TPM2 ACPI support for ARM.
Support for NVDIMMs having their own proximity domains.
New vhost-user-vsock device.

Fixes, cleanups in ACPI, PCI, virtio.
New tests for TPM ACPI.

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

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

* remotes/mst/tags/for_upstream: (58 commits)
  virtio-pci: fix queue_enable write
  pci: Display PCI IRQ pin in "info pci"
  Fix parameter type in vhost migration log path
  acpi: ged: rename event memory region
  acpi: fadt: add hw-reduced sleep register support
  acpi: madt: skip pci override on pci-less systems.
  acpi: create acpi-common.c and move madt code
  acpi: make build_madt() more generic.
  virtio: add vhost-user-vsock-pci device
  virtio: add vhost-user-vsock base device
  vhost-vsock: add vhost-vsock-common abstraction
  hw/pci: Fix crash when running QEMU with "-nic model=rocker"
  libvhost-user: advertise vring features
  Lift max ram slots limit in libvhost-user
  Support individual region unmap in libvhost-user
  Support adding individual regions in libvhost-user
  Support ram slot configuration in libvhost-user
  Refactor out libvhost-user fault generation logic
  Lift max memory slots limit imposed by vhost-user
  Transmit vhost-user memory regions individually
  ...

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


Compare: https://github.com/qemu/qemu/compare/eea8f5df4ecc...9e3903136d9a



reply via email to

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