qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] cd523a: net/vhost-vdpa: fix memory leak in vh


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] cd523a: net/vhost-vdpa: fix memory leak in vhost_vdpa_get_...
Date: Mon, 15 Nov 2021 12:56:53 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: cd523a4181b152004fc0aed18381aefe600ac38e
      
https://github.com/qemu/qemu/commit/cd523a4181b152004fc0aed18381aefe600ac38e
  Author: Stefano Garzarella <sgarzare@redhat.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  net/vhost-vdpa: fix memory leak in vhost_vdpa_get_max_queue_pairs()

Use g_autofree to ensure that `config` is freed when
vhost_vdpa_get_max_queue_pairs() returns.

Reported-by: Coverity (CID 1465228: RESOURCE_LEAK)
Fixes: 402378407d ("vhost-vdpa: multiqueue support")
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20211102155157.241034-1-sgarzare@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: Jason Wang <jasowang@redhat.com>


  Commit: b66cecb238d065628b85a18357d28d21618a4580
      
https://github.com/qemu/qemu/commit/b66cecb238d065628b85a18357d28d21618a4580
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M softmmu/qdev-monitor.c

  Log Message:
  -----------
  softmmu/qdev-monitor: fix use-after-free in qdev_set_id()

Reported by Coverity (CID 1465222).

Fixes: 4a1d937796de0fecd8b22d7dbebf87f38e8282fd ("softmmu/qdev-monitor: add 
error handling in qdev_set_id")
Cc: Damien Hedde <damien.hedde@greensocs.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20211102163342.31162-1-stefanha@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>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>


  Commit: 245cf2c24eb0d5a4fe75151e1794aa5cd53b130d
      
https://github.com/qemu/qemu/commit/245cf2c24eb0d5a4fe75151e1794aa5cd53b130d
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

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

  Log Message:
  -----------
  vhost: Rename last_index to vq_index_end

The doc of this field pointed out that last_index is the last vq index.
This is misleading, since it's actually one past the end of the vqs.

Renaming and modifying comment.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211104085625.2054959-2-eperezma@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 14c81b2191fffb61cd6d2a7a839d34ec2d5e09a1
      
https://github.com/qemu/qemu/commit/14c81b2191fffb61cd6d2a7a839d34ec2d5e09a1
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  vhost: Fix last vq queue index of devices with no cvq

The -1 assumes that cvq device model is accounted in data_queue_pairs,
if cvq does not exists, but it's actually the opposite: Devices with
!cvq are ok but devices with cvq does not add the last queue to
data_queue_pairs.

This is not a problem to vhost-net, but it is to vhost-vdpa:
* Devices with cvq gets initialized at last data vq device model, not
at cvq one.
* Devices with !cvq never gets initialized, since last_index is the
first queue of the last device model.

Because of that, the right change in last_index is to actually add the
cvq, not to remove the missing one.

This is not a problem to vhost-net, but it is to vhost-vdpa, which
device model trust to reach the last index to finish starting the
device.

Also, as the previous commit, rename it to index_end.

Tested with vp_vdpa with host's vhost=on and vhost=off, with ctrl_vq=on
and ctrl_vq=off.

Fixes: 049eb15b5fc9 ("vhost: record the last virtqueue index for the virtio 
device")
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20211104085625.2054959-3-eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: be81ba604260f4beae1522241c579eeda1b891fb
      
https://github.com/qemu/qemu/commit/be81ba604260f4beae1522241c579eeda1b891fb
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M hw/mem/pc-dimm.c

  Log Message:
  -----------
  hw/mem/pc-dimm: Restrict NUMA-specific code to NUMA machines

When trying to use the pc-dimm device on a non-NUMA machine, we get:

  $ qemu-system-arm -M none -cpu max -S \
      -object memory-backend-file,id=mem1,size=1M,mem-path=/tmp/1m \
      -device pc-dimm,id=dimm1,memdev=mem1
  Segmentation fault (core dumped)

  (gdb) bt
  #0  pc_dimm_realize (dev=0x555556da3e90, errp=0x7fffffffcd10) at 
hw/mem/pc-dimm.c:184
  #1  0x0000555555fe1f8f in device_set_realized (obj=0x555556da3e90, 
value=true, errp=0x7fffffffce18) at hw/core/qdev.c:531
  #2  0x0000555555feb4a9 in property_set_bool (obj=0x555556da3e90, 
v=0x555556e54420, name=0x5555563c3c41 "realized", opaque=0x555556a704f0, 
errp=0x7fffffffce18) at qom/object.c:2257

To avoid that crash, restrict the pc-dimm NUMA check to machines
supporting NUMA, and do not allow the use of 'node' property on
non-NUMA machines.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211106145016.611332-1-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 2aa1842d6d79dcd1b84c58eeb44591a99a9e56df
      
https://github.com/qemu/qemu/commit/2aa1842d6d79dcd1b84c58eeb44591a99a9e56df
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/i386/pc_q35.c
    M hw/pci/pcie_port.c

  Log Message:
  -----------
  pcie: rename 'native-hotplug' to 'x-native-hotplug'

Mark property as experimental/internal adding 'x-' prefix.

Property was introduced in 6.1 and it should have provided
ability to turn on native PCIE hotplug on port even when
ACPI PCI hotplug is in use is user explicitly sets property
on CLI. However that never worked since slot is wired to
ACPI hotplug controller.
Another non-intended usecase: disable native hotplug on slot
when APCI based hotplug is disabled, which works but slot has
'hotplug' property for this taks.

It should be relatively safe to rename it to experimental
as no users should exist for it and given that the property
is broken we don't really want to leave it around for much
longer lest users start using it.

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


  Commit: c318bef76206c2ecb6016e8e68c4ac6ff9a4c8cb
      
https://github.com/qemu/qemu/commit/c318bef76206c2ecb6016e8e68c4ac6ff9a4c8cb
  Author: Julia Suvorova <jusual@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

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

  Log Message:
  -----------
  hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 machine type

To solve issues [1-2] the Hot Plug Capable bit in PCIe Slots will be
turned on, while the switch to ACPI Hot-plug will be done in the
DSDT table.

Introducing 'x-keep-native-hpc' property disables the HPC bit only
in 6.1 and as a result keeps the forced 'reserve-io' on
pcie-root-ports in 6.1 too.

[1] https://gitlab.com/qemu-project/qemu/-/issues/641
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2006409

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


  Commit: be12e3a016f10f4daa1a248df97198f4b10ef8c4
      
https://github.com/qemu/qemu/commit/be12e3a016f10f4daa1a248df97198f4b10ef8c4
  Author: Julia Suvorova <jusual@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

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

  Log Message:
  -----------
  bios-tables-test: Allow changes in DSDT ACPI tables

Prepare for changing the _OSC method in q35 DSDT.

Signed-off-by: Julia Suvorova <jusual@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20211112110857.3116853-4-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 211afe5c69b597acf85fdd577eb497f5be1ffbd8
      
https://github.com/qemu/qemu/commit/211afe5c69b597acf85fdd577eb497f5be1ffbd8
  Author: Julia Suvorova <jusual@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

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

  Log Message:
  -----------
  hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC

There are two ways to enable ACPI PCI Hot-plug:

        * Disable the Hot-plug Capable bit on PCIe slots.

This was the first approach which led to regression [1-2], as
I/O space for a port is allocated only when it is hot-pluggable,
which is determined by HPC bit.

        * Leave the HPC bit on and disable PCIe Native Hot-plug in _OSC
          method.

This removes the (future) ability of hot-plugging switches with PCIe
Native hotplug since ACPI PCI Hot-plug only works with cold-plugged
bridges. If the user wants to explicitely use this feature, they can
disable ACPI PCI Hot-plug with:
        --global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off

Change the bit in _OSC method so that the OS selects ACPI PCI Hot-plug
instead of PCIe Native.

[1] https://gitlab.com/qemu-project/qemu/-/issues/641
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2006409

Signed-off-by: Julia Suvorova <jusual@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20211112110857.3116853-5-imammedo@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7e6055c99f2f1f5e6a206e8d07a9f45508832611
      
https://github.com/qemu/qemu/commit/7e6055c99f2f1f5e6a206e8d07a9f45508832611
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    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.ivrs
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/data/acpi/q35/DSDT.nohpet
    M tests/data/acpi/q35/DSDT.numamem
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/data/acpi/q35/DSDT.xapic
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: bios-tables-test update expected blobs

The changes are the result of
        'hw/i386/acpi-build: Deny control on PCIe Native Hot-Plug in _OSC'
which hides PCIE hotplug bit in host-bridge _OSC

Method (_OSC, 4, NotSerialized)  // _OSC: Operating System Capabilities
             {
                 CreateDWordField (Arg3, Zero, CDW1)
                 If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") 
/* PCI Host Bridge Device */))
                 {
                     CreateDWordField (Arg3, 0x04, CDW2)
                     CreateDWordField (Arg3, 0x08, CDW3)
                     Local0 = CDW3 /* \_SB_.PCI0._OSC.CDW3 */
-                    Local0 &= 0x1F
+                    Local0 &= 0x1E

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20211112110857.3116853-6-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f463e761a41ee71e59892121e1c74d9c25c985d2
      
https://github.com/qemu/qemu/commit/f463e761a41ee71e59892121e1c74d9c25c985d2
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: use virtio accessor to access packed descriptor flags

We used to access packed descriptor flags via
address_space_{write|read}_cached(). When we hit the cache, memcpy()
is used which is not an atomic operation which may lead a wrong value
is read or wrote.

So this patch switches to use virito_{stw|lduw}_phys_cached() to make
sure the aceess is atomic.

Fixes: 86044b24e865f ("virtio: basic packed virtqueue support")
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211111063854.29060-1-jasowang@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: d152cdd6f6fad381e804c8185f0ba938030ccac9
      
https://github.com/qemu/qemu/commit/d152cdd6f6fad381e804c8185f0ba938030ccac9
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: use virtio accessor to access packed event

We used to access packed descriptor event and off_wrap via
address_space_{write|read}_cached(). When we hit the cache, memcpy()
is used which is not atomic which may lead a wrong value to be read or
wrote.

This patch fixes this by switching to use
virito_{stw|lduw}_phys_cached() to make sure the access is atomic.

Fixes: 683f7665679c1 ("virtio: event suppression support for packed ring")
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211111063854.29060-2-jasowang@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: 0351152b6f16e23e65407b4c4b27e23b46aa3801
      
https://github.com/qemu/qemu/commit/0351152b6f16e23e65407b4c4b27e23b46aa3801
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Replace qemu_open_old by qemu_open at

There is no reason to keep using the old one, since we neither use the
variadics arguments nor open it with O_DIRECT.

Also, net_client_init1, the caller of net_init_vhost_vdpa, wants all
net_client_init_fun to use Error API, so it's a good step in that
direction.

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


  Commit: c829540401f280f0cad24131f4e7b92e81d506fa
      
https://github.com/qemu/qemu/commit/c829540401f280f0cad24131f4e7b92e81d506fa
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Check for existence of opts.vhostdev

Since net_init_vhost_vdpa is trying to open it. Not specifying it in the
command line crash qemu.

Fixes: 7327813d17 ("vhost-vdpa: open device fd in net_init_vhost_vdpa()")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20211112193431.2379298-3-eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 23786d13441d36e0efcfee94ba8ff218746bed6c
      
https://github.com/qemu/qemu/commit/23786d13441d36e0efcfee94ba8ff218746bed6c
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

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

  Log Message:
  -----------
  pci: implement power state

This allows to power off pci devices.  In "off" state the devices will
not be visible.  No pci config space access, no pci bar access, no dma.

Default state is "on", so this patch (alone) should not change behavior.

Use case:  Allows hotplug controllers implement slot power.  Hotplug
controllers doing so should set the inital power state for devices in
the ->plug callback.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211111130859.1171890-2-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d5daff7d312653b92f23c7a8e198090b32b8dae6
      
https://github.com/qemu/qemu/commit/d5daff7d312653b92f23c7a8e198090b32b8dae6
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pcie: implement slot power control for pcie root ports

With this patch hot-plugged pci devices will only be visible to the
guest if the guests hotplug driver has enabled slot power.

This should fix the hot-plug race which one can hit when hot-plugging
a pci device at boot, while the guest is in the middle of the pci bus
scan.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211111130859.1171890-3-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 81124b3c7a5dae34881cd8cd9631f125da81ef97
      
https://github.com/qemu/qemu/commit/81124b3c7a5dae34881cd8cd9631f125da81ef97
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pcie: add power indicator blink check

Refuse to push the attention button in case the guest is busy with some
hotplug operation (as indicated by the power indicator blinking).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211111130859.1171890-4-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 44242d4d3d082a28200fdbecaed5398122682e6e
      
https://github.com/qemu/qemu/commit/44242d4d3d082a28200fdbecaed5398122682e6e
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pcie: factor out pcie_cap_slot_unplug()

No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211111130859.1171890-5-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 0d33415a4eafe532f3beef8272811d927236a353
      
https://github.com/qemu/qemu/commit/0d33415a4eafe532f3beef8272811d927236a353
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/pci/pcie.c

  Log Message:
  -----------
  pcie: fast unplug when slot power is off

In case the slot is powered off (and the power indicator turned off too)
we can unplug right away, without round-trip to the guest.

Also clear pending attention button press, there is nothing to care
about any more.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211111130859.1171890-6-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 18416c62e36a79823a9e28f6b2260aa13c25e1d9
      
https://github.com/qemu/qemu/commit/18416c62e36a79823a9e28f6b2260aa13c25e1d9
  Author: Gerd Hoffmann <kraxel@redhat.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/pci/pcie.c
    M include/hw/qdev-core.h
    M softmmu/qdev-monitor.c

  Log Message:
  -----------
  pcie: expire pending delete

Add an expire time for pending delete, once the time is over allow
pressing the attention button again.

This makes pcie hotplug behave more like acpi hotplug, where one can
try sending an 'device_del' monitor command again in case the guest
didn't respond to the first attempt.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211111130859.1171890-7-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 757b8dd4e970038538b2e027120ab4594bebdebc
      
https://github.com/qemu/qemu/commit/757b8dd4e970038538b2e027120ab4594bebdebc
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M hw/acpi/ich9.c
    M hw/i386/acpi-build.c
    M hw/i386/pc.c
    M hw/i386/pc_q35.c
    M hw/mem/pc-dimm.c
    M hw/net/vhost_net.c
    M hw/pci/pci.c
    M hw/pci/pci_host.c
    M hw/pci/pcie.c
    M hw/pci/pcie_port.c
    M hw/virtio/vhost-vdpa.c
    M hw/virtio/virtio.c
    M include/hw/acpi/ich9.h
    M include/hw/pci/pci.h
    M include/hw/qdev-core.h
    M include/hw/virtio/vhost.h
    M net/vhost-vdpa.c
    M softmmu/qdev-monitor.c
    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.ivrs
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/data/acpi/q35/DSDT.nohpet
    M tests/data/acpi/q35/DSDT.numamem
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/data/acpi/q35/DSDT.xapic

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

pci,pc,virtio: bugfixes

pci power management fixes
acpi hotplug fixes
misc other fixes

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

# gpg: Signature made Mon 15 Nov 2021 05:15:09 PM CET
# 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]

* tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu:
  pcie: expire pending delete
  pcie: fast unplug when slot power is off
  pcie: factor out pcie_cap_slot_unplug()
  pcie: add power indicator blink check
  pcie: implement slot power control for pcie root ports
  pci: implement power state
  vdpa: Check for existence of opts.vhostdev
  vdpa: Replace qemu_open_old by qemu_open at
  virtio: use virtio accessor to access packed event
  virtio: use virtio accessor to access packed descriptor flags
  tests: bios-tables-test update expected blobs
  hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC
  bios-tables-test: Allow changes in DSDT ACPI tables
  hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 machine type
  pcie: rename 'native-hotplug' to 'x-native-hotplug'
  hw/mem/pc-dimm: Restrict NUMA-specific code to NUMA machines
  vhost: Fix last vq queue index of devices with no cvq
  vhost: Rename last_index to vq_index_end
  softmmu/qdev-monitor: fix use-after-free in qdev_set_id()
  net/vhost-vdpa: fix memory leak in vhost_vdpa_get_max_queue_pairs()

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


Compare: https://github.com/qemu/qemu/compare/385e0da4da06...757b8dd4e970



reply via email to

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