All of lore.kernel.org
 help / color / mirror / Atom feed
* Segment truncation in multi-segment PCI handling?
@ 2024-06-07 19:46 Marek Marczykowski-Górecki
  2024-06-07 19:52 ` Andrew Cooper
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Marczykowski-Górecki @ 2024-06-07 19:46 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Hi,

I've got a new system, and it has two PCI segments:

    0000:00:00.0 Host bridge: Intel Corporation Device 7d14 (rev 04)
    0000:00:02.0 VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Graphics] (rev 08)
    ...
    10000:e0:06.0 System peripheral: Intel Corporation RST VMD Managed Controller
    10000:e0:06.2 PCI bridge: Intel Corporation Device 7ecb (rev 10)
    10000:e1:00.0 Non-Volatile memory controller: Phison Electronics Corporation PS5021-E21 PCIe4 NVMe Controller (DRAM-less) (rev 01)

But looks like Xen doesn't handle it correctly:

    (XEN) 0000:e0:06.0: unknown type 0
    (XEN) 0000:e0:06.2: unknown type 0
    (XEN) 0000:e1:00.0: unknown type 0
    ...
    (XEN) ==== PCI devices ====
    (XEN) ==== segment 0000 ====
    (XEN) 0000:e1:00.0 - NULL - node -1 
    (XEN) 0000:e0:06.2 - NULL - node -1 
    (XEN) 0000:e0:06.0 - NULL - node -1 
    (XEN) 0000:2b:00.0 - d0 - node -1  - MSIs < 161 >
    (XEN) 0000:00:1f.6 - d0 - node -1  - MSIs < 148 >
    ...

This isn't exactly surprising, since pci_sbdf_t.seg is uint16_t, so
0x10000 doesn't fit. OSDev wiki says PCI Express can have 65536 PCI
Segment Groups, each with 256 bus segments.

Fortunately, I don't need this to work, if I disable VMD in the
firmware, I get a single segment and everything works fine.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-10 10:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-07 19:46 Segment truncation in multi-segment PCI handling? Marek Marczykowski-Górecki
2024-06-07 19:52 ` Andrew Cooper
2024-06-10  7:58   ` Jan Beulich
2024-06-10  8:28     ` Roger Pau Monné
2024-06-10  8:41       ` Jan Beulich
2024-06-10  9:46         ` Roger Pau Monné
2024-06-10 10:11           ` Jan Beulich
2024-06-10 10:45             ` Marek Marczykowski-Górecki

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.