From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46BEDC27C53 for ; Fri, 7 Jun 2024 19:47:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.736606.1142707 (Exim 4.92) (envelope-from ) id 1sFfY6-00051C-Uv; Fri, 07 Jun 2024 19:46:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 736606.1142707; Fri, 07 Jun 2024 19:46:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sFfY6-000515-SK; Fri, 07 Jun 2024 19:46:54 +0000 Received: by outflank-mailman (input) for mailman id 736606; Fri, 07 Jun 2024 19:46:52 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sFfY4-00050z-JA for xen-devel@lists.xenproject.org; Fri, 07 Jun 2024 19:46:52 +0000 Received: from wfhigh8-smtp.messagingengine.com (wfhigh8-smtp.messagingengine.com [64.147.123.159]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id abfc6e96-2506-11ef-b4bb-af5377834399; Fri, 07 Jun 2024 21:46:48 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.west.internal (Postfix) with ESMTP id 822EA18000C7 for ; Fri, 7 Jun 2024 15:46:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 07 Jun 2024 15:46:44 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 7 Jun 2024 15:46:43 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: abfc6e96-2506-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1717789604; x=1717876004; bh=C6Ug4wpkpt oHvvrhX7AzvF3Sta9Ie/JG6Ec+JUWIIaE=; b=QC92jqqclZnp+xa2/T7GwqJ+C6 7tqsgU9/g50mIIc5vbvBji3riZXPtmCmIV/X0Qyy6Aa/j8U7DpESEn3puNsIUMFD HPjUx5TsK1V//aFhWf5WDVqrrfbFYTHBiey7v+gPbYIxZpSaufJBXWE6CPLMHSzX C612SvkD8Iv+UWh6JnCRjP5FpohujaX9nE3jshd9Xv1GcohfylDb/nMii5CJRpWw cnErtyBpS4+weUQQm9U7/WK5AR4ig+J6zDm1t3yDMo8WOFkS/5/yVIqfnGzi3RD5 TssXdlySpzAZEjTWBV4+B4/I1WvNKzggNwzlk9At6Fgmuux7Cmzrq4Oh64lg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1717789604; x=1717876004; bh=C6Ug4wpkptoHvvrhX7AzvF3Sta9Ie/JG6Ec +JUWIIaE=; b=CkNw8S64IOVIxv1vNW6BKL1vNuvK7Dp1NqjapDMbDAnHaN4tZCv x4UnTSEY1R7HMy02/M1JUaimAoEzHX+CySYTNUjUOkbSrNSxfpyeBp06lAYm/mHU QCIsGTrXaVpxYhccVtr8r1WsUdEDXqBw3M6RF5luRrthQoDbYZLGfDWHKKjIR76e ad8/m6MrGIyGY+2AvW1Rc79K5TVaz6334/XGpoMfAFl+H9klMOs7O4fklj7ZeTKW HR6VndvD9DmPJ/uOZSXaOkwDxYBokRufI9zIlGdh6JlCakbQ3vyaI6/qECPvMabM Pq2hrsL7ZMaF/EC+WU673VpamANTQh4kjtA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtuddgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehgtderre dttdejnecuhfhrohhmpeforghrvghkucforghrtgiihihkohifshhkihdqifpkrhgvtghk ihcuoehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqe enucggtffrrghtthgvrhhnpedtudfgteduveduieevvefgteeujeelgffggffhhffhhedt ffeffefgudeugeefhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgt ohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail Date: Fri, 7 Jun 2024 21:46:40 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: xen-devel Subject: Segment truncation in multi-segment PCI handling? Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6/witsI/qtE4GSuI" Content-Disposition: inline --6/witsI/qtE4GSuI Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Fri, 7 Jun 2024 21:46:40 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: xen-devel Subject: Segment truncation in multi-segment PCI handling? 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 Cont= roller 10000:e0:06.2 PCI bridge: Intel Corporation Device 7ecb (rev 10) 10000:e1:00.0 Non-Volatile memory controller: Phison Electronics Corpor= ation 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) =3D=3D=3D=3D PCI devices =3D=3D=3D=3D (XEN) =3D=3D=3D=3D segment 0000 =3D=3D=3D=3D (XEN) 0000:e1:00.0 - NULL - node -1=20 (XEN) 0000:e0:06.2 - NULL - node -1=20 (XEN) 0000:e0:06.0 - NULL - node -1=20 (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. --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --6/witsI/qtE4GSuI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmZjY6EACgkQ24/THMrX 1yzd+gf/ciPyUvmC5sgFOS5N/9kfn0L70p49IdOSD0y2B/KkWHZPvl6xHU3UIojG fiKpjskPxvAg30Fs7lmMwS7X6NaKBPcNw1TAWvZHUS77uZF305M+pSr0QramJeAs YWjKFzPGczzw83EjDCg8bq9ZSV9xVMnrcuBg1HPEZASyVW/wQI7UMzPkQbS1MX0k 5dNE06006EOZjI5o7EgUpGL3kW1IBb8kOLiVTlOoiZtsLq1BwB/JxkerqKREgbTd jmFzf2GN3OQyG6uwij94CXbnoOLTSB962trUsWML4san8WWgeBudQYT7Ab9xZsfM VqduKRzkJu/ZQ1w907dcG8+j0nPLTw== =9mrS -----END PGP SIGNATURE----- --6/witsI/qtE4GSuI--