Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Aug 2023 03:43:34 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273022] MSI/MSI-X assignment fails if APIC ID > 255
Message-ID:  <bug-273022-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273022

            Bug ID: 273022
           Summary: MSI/MSI-X assignment fails if APIC ID > 255
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: emaste@freebsd.org

APIC address is calculated as:

#define INTEL_ADDR(msi)                                                 \
        (MSI_INTEL_ADDR_BASE | (msi)->msi_cpu << 12 |                   \
            MSI_INTEL_ADDR_RH_OFF | MSI_INTEL_ADDR_DM_PHYSICAL)

See Intel SDM 11.11.1 Message Address Register Format
bits 19-12 are:

Destination ID =E2=80=94 This field contains an 8-bit destination ID. It id=
entifies the
message=E2=80=99s target processor(s).
The destination ID corresponds to bits 63:56 of the I/O APIC Redirection Ta=
ble
Entry if the IOAPIC is used to
dispatch the interrupt to the processor(s).

if msi_cpu > 255 then (msi)->msi_cpu << 12 will overflow into bits 31-20 wh=
ich
need to contain 0xfee

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



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