From nobody Fri Nov 22 19:31:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1715868010136366.74808821078204; Thu, 16 May 2024 07:00:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.723363.1128197 (Exim 4.92) (envelope-from ) id 1s7be9-0007kl-P9; Thu, 16 May 2024 13:59:49 +0000 Received: by outflank-mailman (output) from mailman id 723363.1128197; Thu, 16 May 2024 13:59:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7be9-0007kG-Ka; Thu, 16 May 2024 13:59:49 +0000 Received: by outflank-mailman (input) for mailman id 723363; Thu, 16 May 2024 13:59:47 +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 1s7be7-0005tl-Gu for xen-devel@lists.xenproject.org; Thu, 16 May 2024 13:59:47 +0000 Received: from fhigh5-smtp.messagingengine.com (fhigh5-smtp.messagingengine.com [103.168.172.156]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8d0b9a40-138c-11ef-b4bb-af5377834399; Thu, 16 May 2024 15:59:46 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 46BA51140163; Thu, 16 May 2024 09:59:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 May 2024 09:59:45 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 May 2024 09:59:44 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 8d0b9a40-138c-11ef-b4bb-af5377834399 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=fm3; t=1715867985; x=1715954385; bh=i0tm0hLqA8 ZLzyhanisejpktcCRo0bXMjTCqyw0gS+4=; b=c+7KzSezfvynmGBLoAmYd+WTzm 6Eo7ZAqWKL10udGCmQnv0LPk46g+EJiDfycE5Y1eSsJ04LaABvlGo20C2K4K106E csJDxEnM2QQZvviBMBbh1V8dRAnNgxY/1ZqwNkPB9ktA6I+bs8Xt0ZJfAmx/JftK QW+vQlbaye3hJ0sDB2nDnJNOmRjjVLAJ/ZwktGZcXLnHUcUTqBE7LxoFoD63N6r2 +KxTsI6hneuNhEgbWx9R+fvZZR42j6bg2IDy3xpS0jKpL7gtiv4YJoiQzvlxO/V4 B/GS85GqAg3JnKefGi3gs1Du+c7T06SSBAVG31pHF5yadUKhSX7RnGIY/nrw== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715867985; x= 1715954385; bh=i0tm0hLqA8ZLzyhanisejpktcCRo0bXMjTCqyw0gS+4=; b=K 08V5F5EbgXuDdcOHoGgBxEk0szGPAhh9I5EUblwRDQy+eoo+LzPnD3UTckbiZu09 QDrZi/774q0lBut6vTjZE4lz48pyZdyq07nK1WvVNn9okEoMh9/nNDps++M+M+Ic myiLzxLLyklVB39B2CogGJ9AeqPXL5fz6zU3B2kFE2Iv3nRUdfc14t2k78oN3gjD 86Xzz/hSH1rLW8fDbx7Ajdh1de/CCmTmP2yV4zhtahVtgi6jepRO1UyG76Jd3KLS bWrbIsKChgP3j7hhGsZWmNYgKzlYM+jke9s/qe01U85/JolXr3W/I+l9YZYrAoV2 2Xy8gGKG6gZ0SGtPEYjBw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehuddgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghr vghkucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesih hnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpefg ueduhefgvdefheehudejheefudevueeghfekhfehleegveduteeuiedugffgffenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgv khesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Anthony PERARD , Juergen Gross Subject: [PATCH 07/12] libxl: Allow stubdomain to control interupts of PCI device Date: Thu, 16 May 2024 15:58:28 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1715868012258100009 Especially allow it to control MSI/MSI-X enabling bits. This part only writes a flag to a sysfs, the actual implementation is on the kernel side. This requires Linux >=3D 5.10 in dom0 (or relevant patch backported). Signed-off-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Anthony PERARD --- tools/libs/light/libxl_pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c index 96cb4da0794e..6f357b70b815 100644 --- a/tools/libs/light/libxl_pci.c +++ b/tools/libs/light/libxl_pci.c @@ -1513,6 +1513,14 @@ static void pci_add_dm_done(libxl__egc *egc, rc =3D ERROR_FAIL; goto out; } + } else if (libxl_is_stubdom(ctx, domid, NULL)) { + /* Allow acces to MSI enable flag in PCI config space for the stub= dom */ + if ( sysfs_write_bdf(gc, SYSFS_PCIBACK_DRIVER"/allow_interrupt_con= trol", + pci) < 0 ) { + LOGD(ERROR, domainid, "Setting allow_interrupt_control for dev= ice"); + rc =3D ERROR_FAIL; + goto out; + } } =20 out_no_irq: --=20 git-series 0.9.1