Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Jul 2025 14:47:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 288122] msi_map: unsupported destination APIC ID 257
Message-ID:  <bug-288122-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288122

            Bug ID: 288122
           Summary: msi_map: unsupported destination APIC ID 257
           Product: Base System
           Version: 14.3-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: dwmw2@infradead.org

I've downloaded FreeBSD-14.3-RELEASE-amd64.qcow2 and I'm running it in qemu
under Linux/KVM to test how well it supports having lots of vCPUs (specifically
those with APIC IDs > 255).

(This might be a good moment to review
http://david.woodhou.se/more-than-you-ever-wanted-to-know-about-x86-msis.txt if
needed)

My QEMU command line looks a bit like this...

qemu-system-x86_64 -accel kvm,kernel-irqchip=split \
   -drive file=~/FreeBSD-14.3-RELEASE-amd64.qcow2,id=nvm,if=none,snapshot=on \
   -device nvme,drive=nvm,serial=1 -m 16G -M q35  \
   -accel kvm,kernel-irqchip=split \
   -usb -device usb-mouse -device usb-kbd -device usb-tablet \
   -smp 1,maxcpus=288,sockets=8 -device host-x86_64-cpu,apic-id=257 \
   -cpu host -serial mon:stdio \
   -device amd-iommu,intremap=on,xtsup=on

So it should have two CPUs, with APIC IDs 0 and 0x101. And it does...

> cpu0 BSP:
>      ID: 0x00000000   VER: 0x01050014 LDR: 0x00000001 DFR: 0x00000000 x2APIC: 1
>   lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
>   timer: 0x000300ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400
> SMP: AP CPU #1 Launched!
> cpu1 AP:
>      ID: 0x00000101   VER: 0x01050014 LDR: 0x00100002 DFR: 0x00000000 x2APIC: 1
>   lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
>   timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400

But it only routes interrupts to CPU0, it seems...

> nvme0: <Generic NVMe Device> mem 0x380000000000-0x380000003fff irq 23 at device 3.0 on pci0
> nvme0: attempting to allocate 3 MSI-X vectors (65 supported)
> msi: routing MSI-X IRQ 26 to local APIC 0 vector 52
> msi: routing MSI-X IRQ 27 to local APIC 0 vector 53
> msi: routing MSI-X IRQ 28 to local APIC 0 vector 54


FWIW it does say this too, and the 'no driver attached' part is noteworthy.

> pci0: <base peripheral, IOMMU> at device 4.0 (no driver attached)

But that shouldn't matter anyway because you don't *need* an IOMMU, KVM is
advertising that MSIs support 15 bits of APIC ID.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-288122-227>