* [PATCH BlueZ v1] test-runner: Enable interrupt remapping for PCIe passthrough
@ 2026-09-15 21:37 Luiz Augusto von Dentz
2026-09-15 22:58 ` [BlueZ,v1] " bluez.test.bot
2026-09-16 18:30 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2026-09-15 21:37 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
A device passed through with -P fails to allocate its MSI-X vectors
(-ENOSPC) as the guest has no way to remap interrupts, so give it a
virtual IOMMU with interrupt remapping enabled, which in turn requires
the irqchip to be split.
Without this the guest is not presented with a DMAR table at all, so
enabling CONFIG_INTEL_IOMMU and CONFIG_IRQ_REMAP on the test kernel has
no effect, and both are now documented as required.
The machine type is moved out of the static argument list as it now
depends on whether -P is used, the resulting command line is otherwise
unchanged.
The model wrote the change and confirmed the guest is only presented
with a DMAR table once the virtual IOMMU is added; it was reviewed and
tested by the author.
Assisted-by: Claude:claude-opus-5
---
doc/test-runner.rst | 11 +++++++++++
tools/test-runner.c | 10 +++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/doc/test-runner.rst b/doc/test-runner.rst
index 6429e80fc75b..dc1e51305c51 100644
--- a/doc/test-runner.rst
+++ b/doc/test-runner.rst
@@ -355,6 +355,17 @@ In addition the above kernel config option the following is required:
CONFIG_ACPI=y
CONFIG_BT_HCIBTINTEL_PCIE=y
+IOMMU and interrupt remapping, without which vfio-pci fails to allocate
+MSI-X vectors (-ENOSPC):
+
+.. code-block::
+
+ CONFIG_INTEL_IOMMU=y
+ CONFIG_INTEL_IOMMU_DEFAULT_ON=y
+ CONFIG_INTEL_IOMMU_SVM=y
+ CONFIG_IRQ_REMAP=y
+ CONFIG_AMD_IOMMU=y
+
On the host, an IOMMU must be enabled in the firmware and on the host kernel
command line (``intel_iommu=on`` or ``amd_iommu=on``). The controller itself
does not need any manual preparation: test-runner unbinds it from its current
diff --git a/tools/test-runner.c b/tools/test-runner.c
index 2de05e26dcf3..338e5b9da544 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -293,7 +293,6 @@ static const char *const qemu_argv[] = {
"-no-user-config",
"-monitor", "none",
"-display", "none",
- "-machine", "type=q35,accel=kvm:tcg",
"-m", "256M",
"-net", "none",
"-no-reboot",
@@ -810,6 +809,13 @@ static int start_qemu(void)
strv_append(&argv, "%s", qemu_binary);
strv_concat(&argv, qemu_argv);
+ /* Interrupt remapping is required to pass through a device using
+ * MSI-X, which in turn needs the split irqchip.
+ */
+ strv_append(&argv, "-machine");
+ strv_append(&argv, "type=q35,accel=kvm:tcg%s",
+ pcie_dev ? ",kernel-irqchip=split" : "");
+
if (qemu_host_cpu) {
strv_append(&argv, "-cpu");
strv_append(&argv, "host");
@@ -835,6 +841,8 @@ static int start_qemu(void)
}
if (pcie_dev) {
+ strv_append(&argv, "-device");
+ strv_append(&argv, "intel-iommu,intremap=on");
strv_append(&argv, "-device");
strv_append(&argv, "%s", pcie_dev);
}
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [BlueZ,v1] test-runner: Enable interrupt remapping for PCIe passthrough
2026-09-15 21:37 [PATCH BlueZ v1] test-runner: Enable interrupt remapping for PCIe passthrough Luiz Augusto von Dentz
@ 2026-09-15 22:58 ` bluez.test.bot
2026-09-16 18:30 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-09-15 22:58 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1165938/
---Test result---
Test Summary:
CheckPatch PASS 0.56 seconds
GitLint PASS 0.33 seconds
BuildEll PASS 23.08 seconds
BluezMake PASS 376.76 seconds
MakeCheck PASS 14.60 seconds
MakeDistcheck PASS 141.22 seconds
CheckValgrind PASS 228.17 seconds
CheckSmatch PASS 287.52 seconds
bluezmakeextell PASS 90.17 seconds
TestFunctional PASS 1006.00 seconds
IncrementalBuild PASS 350.20 seconds
ScanBuild PASS 1011.61 seconds
https://github.com/bluez/bluez/pull/2531
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ v1] test-runner: Enable interrupt remapping for PCIe passthrough
2026-09-15 21:37 [PATCH BlueZ v1] test-runner: Enable interrupt remapping for PCIe passthrough Luiz Augusto von Dentz
2026-09-15 22:58 ` [BlueZ,v1] " bluez.test.bot
@ 2026-09-16 18:30 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-09-16 18:30 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 15 Sep 2026 17:37:23 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> A device passed through with -P fails to allocate its MSI-X vectors
> (-ENOSPC) as the guest has no way to remap interrupts, so give it a
> virtual IOMMU with interrupt remapping enabled, which in turn requires
> the irqchip to be split.
>
> [...]
Here is the summary with links:
- [BlueZ,v1] test-runner: Enable interrupt remapping for PCIe passthrough
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a410e06a4b61
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-16 18:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 21:37 [PATCH BlueZ v1] test-runner: Enable interrupt remapping for PCIe passthrough Luiz Augusto von Dentz
2026-09-15 22:58 ` [BlueZ,v1] " bluez.test.bot
2026-09-16 18:30 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox