From patchwork Thu Apr 3 11:04:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 14036771 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 5F27EC369A4 for ; Thu, 3 Apr 2025 11:07:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.936484.1337784 (Exim 4.92) (envelope-from ) id 1u0IPV-0007Hx-Ny; Thu, 03 Apr 2025 11:07:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 936484.1337784; Thu, 03 Apr 2025 11:07:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u0IPV-0007HY-IU; Thu, 03 Apr 2025 11:07:01 +0000 Received: by outflank-mailman (input) for mailman id 936484; Thu, 03 Apr 2025 11:07:00 +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 1u0IPU-0005Qy-BR for xen-devel@lists.xenproject.org; Thu, 03 Apr 2025 11:07:00 +0000 Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c2b67f71-107b-11f0-9ffb-bf95429c2676; Thu, 03 Apr 2025 13:06:58 +0200 (CEST) Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id 1223B13801AD; Thu, 3 Apr 2025 07:06:58 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 03 Apr 2025 07:06:58 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Apr 2025 07:06:56 -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: c2b67f71-107b-11f0-9ffb-bf95429c2676 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1743678418; x=1743764818; bh=KrMIkNcsW4 7Spr5nyS0BqxsgMbL82nPdur/bMGMqzD4=; b=oimuvXJ+tZDKFivKoPdqtW/P34 x2ik28wIjpVi5YJd1GdNSBsXkMOfgIDzWdCHPVJFlTdlbsVxfcmbsaf8MuBv5I8v ZjyZHeg4viCnYSo8C3KpAJHovdppzgy052di0nVqzY6HH61z+NTgDj3UQGhD9wbr RWrnyLUldRcz9cP1bo8CDU/Iw0q8pnF4LNLBXeNTGuC0bHwk8ywaRXR3SdkQfY/+ 7lHqSPHULdtdyyBSBhXwiyoo3FX71qQNH4jZr2gXibfML4kq28s84o5MuTlZuAkR eE8Yvf+IWTggfqGBggmnGHWHXpAlGWEoHb27N3dJ1GRQtf4JHtES8Ix+vIGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1743678418; x= 1743764818; bh=KrMIkNcsW47Spr5nyS0BqxsgMbL82nPdur/bMGMqzD4=; b=d u+CAcQkErFKKQxxFBB/ZMyPyVp0JrfzG8aa+zY6LEZKHibG8hqAFce4ggsBfaQCi UAn9w7CIyjTxOCSyrtuBfSNzteP+8cooKD9nASGWL+42xVNeesyt7/WuGlMEZwBP oAzKJs7UyyUL9EOAQNmY7e2HoR42+PCwO3hWn3R100mKp7CMeApMGJabe7Flljeo sbjDfRNMeK0MDyaAOYHl0e4JXymH2YkdbGF4AKMFFgh4reN9HC4VikIa1S+dF/sg zZ2bPSLSIBhxqthseU3N2nJSn43zaaY9NJmwAhuKVMSIGpcq8I2VSV8hJZh5rEb+ eOjWKR8BEoZy7Z9zvQPCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeekfeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefufffkofgjfhggtgfgsehtkeertder tdejnecuhfhrohhmpeforghrvghkucforghrtgiihihkohifshhkihdqifpkrhgvtghkih cuoehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeen ucggtffrrghtthgvrhhnpefgueduhefgvdefheehudejheefudevueeghfekhfehleegve duteeuiedugffgffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtoh hmpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeig vghnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhjvggtthdrohhrghdprhgtphhtth hopegrnhgurhgvfidrtghoohhpvghrfeestghithhrihigrdgtohhmpdhrtghpthhtohep mhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdprhgtph htthhopegtrghrughovgestggrrhguohgvrdgtohhmpdhrtghpthhtohepshhsthgrsggv lhhlihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , =?utf-8?q?Marek_Marczykowski-?= =?utf-8?q?G=C3=B3recki?= , Doug Goldstein , Stefano Stabellini Subject: [PATCH v1 09/11] ci: adjust resolving network interface into PCI device Date: Thu, 3 Apr 2025 13:04:44 +0200 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 Change how PCI device lookup is done to handle also USB devices, in which case get the USB controller. Instead of taking basename of the 'device' symlink, resolve the full path (example: /sys/devices/pci0000:00/0000:00:09.0/usb4/4-7/4-7:1.0) and take the first part after pci0000:00. Theoretically it could be a bridge, but VM has flat PCI topology. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini --- automation/scripts/qubes-x86-64.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh index 6d2c170d1ee1..dc8013750f5f 100755 --- a/automation/scripts/qubes-x86-64.sh +++ b/automation/scripts/qubes-x86-64.sh @@ -110,7 +110,8 @@ timeout 30s udhcpc -i \"\$interface\" pingip=\$(ip -o -4 r show default|cut -f 3 -d ' ') ping -c 10 \"\$pingip\" echo domU started -pcidevice=\$(basename \$(readlink /sys/class/net/\$interface/device)) +pcidevice=\$(realpath /sys/class/net/\$interface/device | + sed 's#.*pci0000:00/\\([^/]*\\).*#\\1#') lspci -vs \$pcidevice " if [ -n "$PCIDEV_INTR" ]; then