From patchwork Sat Sep 14 15:37:21 2019 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: 11145695 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C5F114DB for ; Sat, 14 Sep 2019 15:40:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id DC18720717 for ; Sat, 14 Sep 2019 15:40:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="rCWoSL88" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC18720717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i9A7p-0001O0-19; Sat, 14 Sep 2019 15:38:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i9A7o-0001Ne-2Z for xen-devel@lists.xenproject.org; Sat, 14 Sep 2019 15:38:12 +0000 X-Inumbo-ID: 9a56ce6e-d705-11e9-b299-bc764e2007e4 Received: from wout1-smtp.messagingengine.com (unknown [64.147.123.24]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9a56ce6e-d705-11e9-b299-bc764e2007e4; Sat, 14 Sep 2019 15:37:48 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 083AE5AD; Sat, 14 Sep 2019 11:37:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sat, 14 Sep 2019 11:37:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=4/s/jYbsj2ZCPx+BVDqUSheBP4o43d0M+JLSj/Z2G WY=; b=rCWoSL88NABwLIrt5o1L1H747T6XM1UXWe0UdHenTMfufvBobiTdREbxx Wxwgp1+/HY4WY+670apxn8WhBJi7xqYVGZ+viLNeZQSxSTnZk1fQlKQFoJLGZELu Jk+dt1I4wzRuYjQgnoDrWjwprZMhgRgseqaqTIf17whwSGu5/jNLU8b+pSyOQ/WP YJUol+4W7QFtdJOOWF0FZWBvyAibSRfaE+04rJEGCRKwxCRZx646PTexSalXZVe3 +4JS7BxzbbYb6OdnQnEX7W4tXgfP2oTBfuOL8bFgLjRRcXpLEAZ/TKOvy5k7InZL +jZNoxFP/5096Jq/IAmT7NRVT9XLw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrtdelgdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucfkphepledurdeihedrfeegrdef feenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsihgslh gvthhhihhnghhslhgrsgdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost.localdomain (ip5b412221.dynamic.kabel-deutschland.de [91.65.34.33]) by mail.messagingengine.com (Postfix) with ESMTPA id D1175D60057; Sat, 14 Sep 2019 11:37:45 -0400 (EDT) From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Date: Sat, 14 Sep 2019 17:37:21 +0200 Message-Id: <2f61f30aa8d270212506542bda6cdf083a68c069.1568475323.git-series.marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v6 6/6] tools/libxc: add wrapper for PHYSDEVOP_interrupt_control X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson , =?utf-8?q?Marek_Marczykowski-G?= =?utf-8?q?=C3=B3recki?= , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Add libxc wrapper for PHYSDEVOP_interrupt_control introduced in previous commit. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Wei Liu --- Changes in v3: - new patch Changes in v4: - adjust for updated previous patch Changes in v5: - rename to PHYSDEVOP_msi_control, adjust arguments Change in v6: - initialize struct physdev_interrupt_control inline, drop pointless rc variable - rename to PHYSDEVOP_interrupt_control --- tools/libxc/include/xenctrl.h | 6 ++++++ tools/libxc/xc_physdev.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 0ff6ed9..2adb114 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1639,6 +1639,12 @@ int xc_physdev_unmap_pirq(xc_interface *xch, uint32_t domid, int pirq); +int xc_physdev_interrupt_control(xc_interface *xch, + int seg, + int bus, + int devfn, + int flags); + /* * LOGGING AND ERROR REPORTING */ diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c index 460a8e7..5af8296 100644 --- a/tools/libxc/xc_physdev.c +++ b/tools/libxc/xc_physdev.c @@ -111,3 +111,18 @@ int xc_physdev_unmap_pirq(xc_interface *xch, return rc; } +int xc_physdev_interrupt_control(xc_interface *xch, + int seg, + int bus, + int devfn, + int flags) +{ + struct physdev_interrupt_control op = { + .seg = seg, + .bus = bus, + .devfn = devfn, + .flags = flags, + }; + + return do_physdev_op(xch, PHYSDEVOP_interrupt_control, &op, sizeof(op)); +}