[PATCH v7 0/4] pci hotplug tracking

Vladimir Sementsov-Ogievskiy posted 4 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230421103207.845847-1-vsementsov@yandex-team.ru
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
hw/core/hotplug.c               |  13 +++
hw/pci-bridge/pci_bridge_dev.c  |  14 +++
hw/pci-bridge/pcie_pci_bridge.c |   1 +
hw/pci/pcie.c                   |  83 +++++++++++++++
hw/pci/pcie_port.c              |   1 +
hw/pci/shpc.c                   |  86 +++++++++++++++
include/hw/hotplug.h            |  12 +++
include/hw/pci/pci_bridge.h     |   2 +
include/hw/pci/pcie.h           |   2 +
include/hw/pci/shpc.h           |   2 +
include/hw/qdev-core.h          |   1 +
include/monitor/qdev.h          |   6 ++
qapi/qdev.json                  | 183 +++++++++++++++++++++++++++++---
softmmu/qdev-monitor.c          |  58 ++++++++++
14 files changed, 452 insertions(+), 12 deletions(-)
[PATCH v7 0/4] pci hotplug tracking
Posted by Vladimir Sementsov-Ogievskiy 1 year ago
Hi all!

Main thing this series does is DEVICE_ON event - a counter-part to
DEVICE_DELETED. A guest-driven event that device is powered-on.
Details are in patch 2.

v7: improve commit message of 02, change version to 8.1 in QAPI.

v6:
- preparation part merged to master
- drop HOTPLUG_STATE event for now. I'm not sure we need it, and anyway,
  it should be throttled as it may be triggered by guest at any rate.
  And if it is throttled:
  - we can't track real state changes, so probably reporting only
  changed fields is not enough.. Then the format of the event is under
  question.
  - we should implement throttling separately for different devices
  - we should improve throttling to support several events in a short
  time, still keeping small rate in larger periods, as guest tends to
  change some states sequentially in a short time.
  So, that's not easy:) Let's just drop it for now.
- force DEVICE_ON event to be triggered only once per device
- flatten query-hotplug output and add device-on status (corresponding
  to DEVICE_ON event)

Vladimir Sementsov-Ogievskiy (4):
  qapi/qdev.json: unite DEVICE_* event data into single structure
  qapi: add DEVICE_ON and query-hotplug infrastructure
  shpc: implement DEVICE_ON event and query-hotplug
  pcie: implement DEVICE_ON event and query-hotplug

 hw/core/hotplug.c               |  13 +++
 hw/pci-bridge/pci_bridge_dev.c  |  14 +++
 hw/pci-bridge/pcie_pci_bridge.c |   1 +
 hw/pci/pcie.c                   |  83 +++++++++++++++
 hw/pci/pcie_port.c              |   1 +
 hw/pci/shpc.c                   |  86 +++++++++++++++
 include/hw/hotplug.h            |  12 +++
 include/hw/pci/pci_bridge.h     |   2 +
 include/hw/pci/pcie.h           |   2 +
 include/hw/pci/shpc.h           |   2 +
 include/hw/qdev-core.h          |   1 +
 include/monitor/qdev.h          |   6 ++
 qapi/qdev.json                  | 183 +++++++++++++++++++++++++++++---
 softmmu/qdev-monitor.c          |  58 ++++++++++
 14 files changed, 452 insertions(+), 12 deletions(-)

-- 
2.34.1