All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry R <rdmitry0911@gmail.com>
To: qemu-devel@nongnu.org
Cc: Dmitry R <rdmitry0911@gmail.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
	Fabiano Rosas <farosas@suse.de>,
	Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [RFC PATCH v2 0/5] Thunderbolt PCIe hotplug layer
Date: Sat, 11 Jul 2026 12:47:56 +0300	[thread overview]
Message-ID: <20260711094803.3589239-1-rdmitry0911@gmail.com> (raw)
In-Reply-To: <20260710133440.2845828-1-rdmitry0911@gmail.com>

This RFC adds a Thunderbolt-flavoured PCIe hotplug layer for QEMU.

The main goal is hotplug and hot-unplug of real and virtual devices in
guests where direct hotplug for those devices is not supported or not
usable.  macOS is the main validation target for this path: the guest can
observe endpoints through a guest-visible Thunderbolt layer even when direct
PCIe hotplug for the same endpoint is not usable.

In v2, the series is split so the modelling part is explicit:

* patch 1 adds the Thunderbolt root port and thunderbolt-bus.  This is the
  core Thunderbolt PCIe model: endpoint devices remain normal QEMU PCI
  devices, while the root port controls guest-visible link presence and PCIe
  hotplug signalling.
* patch 2 adds the Thunderbolt PCIe-to-PCI bridge for tunnelled PCI
  endpoints.
* patch 3 adds a separate thunderbolt-vga endpoint for display hotplug tests.
  The regular QEMU VGA device remains untouched and non-hotpluggable.
* patch 4 adds qtest coverage.
* patch 5 adds documentation and MAINTAINERS coverage.

I added myself as reviewer for the Thunderbolt PCIe files.  The files still
match the existing PCI area through their paths, so PCI maintainership is
inherited by normal get_maintainer.pl matching.

Runtime validation performed so far:

* macOS guest booted from QCOW2 overlays over immutable base disk images.
* Thunderbolt VGA hotplug/removal while the standard boot VGA remains.
* NVMe hotplug/removal with guest driver instance checks.
* USB controller hotplug, USB storage mount/write/eject, controller removal,
  replug, and data persistence verification.

Build/test validation:

* ninja -C build qemu-system-x86_64 tests/qtest/display-vga-test
* meson test -C build qtest-x86_64/display-vga-test --print-errorlogs
* scripts/checkpatch.pl --no-tree --no-signoff on the full diff:
  0 errors, with one expected warning for MIT inheritance in thunderbolt-vga.c.

Changes since v1:

* Split the single large patch into five patches.
* Clarified that the modelling piece is the Thunderbolt root port/bus.
* Added a MAINTAINERS entry with Dmitry R as reviewer.

Dmitry R (5):
  hw/pci-bridge: add Thunderbolt root port
  hw/pci-bridge: add Thunderbolt PCIe-to-PCI bridge
  hw/display: add Thunderbolt VGA endpoint
  tests/qtest: cover Thunderbolt VGA hotplug
  docs: document Thunderbolt PCIe hotplug layer

 MAINTAINERS                                 |   7 +
 README.md                                   |  91 ++++
 docs/specs/index.rst                        |   1 +
 docs/specs/thunderbolt-pcie-hotplug.rst     |  99 ++++
 hw/display/meson.build                      |   1 +
 hw/display/thunderbolt-vga.c                | 275 ++++++++++
 hw/pci-bridge/meson.build                   |   2 +
 hw/pci-bridge/thunderbolt_pcie_pci_bridge.c | 156 ++++++
 hw/pci-bridge/thunderbolt_root_port.c       | 565 ++++++++++++++++++++
 tests/qtest/display-vga-test.c              |  68 +++
 10 files changed, 1265 insertions(+)
 create mode 100644 README.md
 create mode 100644 docs/specs/thunderbolt-pcie-hotplug.rst
 create mode 100644 hw/display/thunderbolt-vga.c
 create mode 100644 hw/pci-bridge/thunderbolt_pcie_pci_bridge.c
 create mode 100644 hw/pci-bridge/thunderbolt_root_port.c

-- 
2.47.3


  parent reply	other threads:[~2026-07-11  9:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 13:34 [RFC PATCH v1 0/1] Thunderbolt PCIe hotplug layer Dmitry R
2026-07-10 13:34 ` [RFC PATCH v1 1/1] hw/pci-bridge: add " Dmitry R
2026-07-11  9:17 ` [RFC PATCH v1 0/1] " Michael S. Tsirkin
2026-07-11  9:47 ` Dmitry R [this message]
2026-07-11  9:47   ` [RFC PATCH v2 1/5] hw/pci-bridge: add Thunderbolt root port Dmitry R
2026-07-11  9:47   ` [RFC PATCH v2 2/5] hw/pci-bridge: add Thunderbolt PCIe-to-PCI bridge Dmitry R
2026-07-11  9:47   ` [RFC PATCH v2 3/5] hw/display: add Thunderbolt VGA endpoint Dmitry R
2026-07-11  9:48   ` [RFC PATCH v2 4/5] tests/qtest: cover Thunderbolt VGA hotplug Dmitry R
2026-07-11  9:48   ` [RFC PATCH v2 5/5] docs: document Thunderbolt PCIe hotplug layer Dmitry R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260711094803.3589239-1-rdmitry0911@gmail.com \
    --to=rdmitry0911@gmail.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.