From patchwork Thu Apr 9 15:09:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 46969 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AA80321416 for ; Thu, 9 Apr 2015 15:20:48 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf27010529wgi.3 for ; Thu, 09 Apr 2015 08:20:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=xwuYtT6AU/pxOrQMZ/shGoi186imBE0vnb1fFEeOzeQ=; b=kYDx4gxd0V5RRSZvIEAeB7T5KxxZ8/0ZrTUQSq6KK7I1SnBDsmySxZmEVHQgmNRXLv siJ64/iGbMNkS2//KvzREKeRzO+/FtvoLvMIIUTWtbJwox+A8Xb2kVaoM8vtq1/csJJn /49Euyf/r57cYX4IobdPMAJTwjcV+PyHY7q/rFs1hjOChnZw9uUxxnkbLG5BUGAe51FU EJnX+lor/Y8GzuapwweF1JapYwUwYUtmins3uixX+Bj7Tn9IXMVL7bNldlF6PL8SmZn6 AljMEsqLEBXcunLCINWY1lNL/nIgrDUjA7ABfeRCLYvQ4ZMF5PVfuJNIuMdCUeHcmgiZ r7CQ== X-Gm-Message-State: ALoCoQkfDsPKfA8Ze8LWnv/2yvdx4OWmERfOcrL7lI29Cz/eETJ3pgyQu9LExMAOy16MhOPWvfvA X-Received: by 10.112.118.162 with SMTP id kn2mr6189802lbb.22.1428592847882; Thu, 09 Apr 2015 08:20:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.103 with SMTP id kx7ls337657lac.62.gmail; Thu, 09 Apr 2015 08:20:47 -0700 (PDT) X-Received: by 10.152.25.167 with SMTP id d7mr4953358lag.108.1428592847765; Thu, 09 Apr 2015 08:20:47 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id z7si9008650lal.43.2015.04.09.08.20.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2015 08:20:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagv1 with SMTP id v1so92143675lag.3 for ; Thu, 09 Apr 2015 08:20:47 -0700 (PDT) X-Received: by 10.152.5.72 with SMTP id q8mr5076699laq.73.1428592847312; Thu, 09 Apr 2015 08:20:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp536658lbt; Thu, 9 Apr 2015 08:20:45 -0700 (PDT) X-Received: by 10.52.243.41 with SMTP id wv9mr24132983vdc.20.1428592844883; Thu, 09 Apr 2015 08:20:44 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id s11si13308696vdj.10.2015.04.09.08.20.44 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 09 Apr 2015 08:20:44 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YgEF1-0002ND-Ji; Thu, 09 Apr 2015 15:19:39 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YgEEz-0002Mk-9Q for xen-devel@lists.xenproject.org; Thu, 09 Apr 2015 15:19:37 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id B6/95-02119-88896255; Thu, 09 Apr 2015 15:19:36 +0000 X-Env-Sender: julien.grall@citrix.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1428592772!14775529!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 6.13.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14816 invoked from network); 9 Apr 2015 15:19:35 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 9 Apr 2015 15:19:35 -0000 X-IronPort-AV: E=Sophos;i="5.11,550,1422921600"; d="scan'208";a="251723467" From: Julien Grall To: Date: Thu, 9 Apr 2015 16:09:38 +0100 Message-ID: <1428592185-18581-13-git-send-email-julien.grall@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1428592185-18581-1-git-send-email-julien.grall@citrix.com> References: <1428592185-18581-1-git-send-email-julien.grall@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Wei Liu , ian.campbell@citrix.com, tim@xen.org, Julien Grall , Ian Jackson , stefano.stabellini@citrix.com, Jan Beulich Subject: [Xen-devel] [PATCH v5 p2 12/19] xen/passthrough: Extend XEN_DOMCTL_*assign_device to support DT device X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: From: Julien Grall A device node is described by a path. It will be used to retrieved the node in the device tree and assign the related device to the domain. Only non-PCI protected by an IOMMU can be assigned to a guest. Also document the behavior of XEN_DOMCTL_deassign_device in the public headers which differ between non-PCI and PCI. Signed-off-by: Julien Grall Acked-by: Jan Beulich Cc: Ian Jackson Cc: Wei Liu --- Changes in v5: - Fix comment in public/domctl.h - Remove unecessary comment in drivers/passthrough/device_tree.c - Check d->is_dying before assigning a device (consistency with PCI code) - Invert the if in iommu.c in order to avoid extra return - Add Jan's ack for non-ARM part Changes in v4: - Add XSM bits - Return -ENODEV rather than -ENOSYS - Move the if (...) into the ifdef (see iommu.c) - Document the behavior of XEN_DOMCTL_deassign_device - Use PCI_BUS and PCI_DEVFN2 when it's possible - iommu_dt_device_is_assigned now returns 0 when the device is not protected Changes in v2: - Use a different number for XEN_DOMCTL_assign_dt_device --- tools/libxc/include/xenctrl.h | 10 ++++ tools/libxc/xc_domain.c | 95 ++++++++++++++++++++++++++++-- xen/drivers/passthrough/device_tree.c | 108 +++++++++++++++++++++++++++++++++- xen/drivers/passthrough/iommu.c | 7 ++- xen/drivers/passthrough/pci.c | 47 ++++++++++----- xen/include/public/domctl.h | 24 +++++++- xen/include/xen/iommu.h | 3 + 7 files changed, 269 insertions(+), 25 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index cc78ed6..a26d222 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2057,6 +2057,16 @@ int xc_deassign_device(xc_interface *xch, uint32_t domid, uint32_t machine_sbdf); +int xc_assign_dt_device(xc_interface *xch, + uint32_t domid, + char *path); +int xc_test_assign_dt_device(xc_interface *xch, + uint32_t domid, + char *path); +int xc_deassign_dt_device(xc_interface *xch, + uint32_t domid, + char *path); + int xc_domain_memory_mapping(xc_interface *xch, uint32_t domid, unsigned long first_gfn, diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 676ec50..a6fcf14 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -1650,7 +1650,8 @@ int xc_assign_device( domctl.cmd = XEN_DOMCTL_assign_device; domctl.domain = domid; - domctl.u.assign_device.machine_sbdf = machine_sbdf; + domctl.u.assign_device.dev = XEN_DOMCTL_DEV_PCI; + domctl.u.assign_device.u.pci.machine_sbdf = machine_sbdf; return do_domctl(xch, &domctl); } @@ -1699,7 +1700,8 @@ int xc_test_assign_device( domctl.cmd = XEN_DOMCTL_test_assign_device; domctl.domain = domid; - domctl.u.assign_device.machine_sbdf = machine_sbdf; + domctl.u.assign_device.dev = XEN_DOMCTL_DEV_PCI; + domctl.u.assign_device.u.pci.machine_sbdf = machine_sbdf; return do_domctl(xch, &domctl); } @@ -1713,11 +1715,96 @@ int xc_deassign_device( domctl.cmd = XEN_DOMCTL_deassign_device; domctl.domain = domid; - domctl.u.assign_device.machine_sbdf = machine_sbdf; - + domctl.u.assign_device.dev = XEN_DOMCTL_DEV_PCI; + domctl.u.assign_device.u.pci.machine_sbdf = machine_sbdf; + return do_domctl(xch, &domctl); } +int xc_assign_dt_device( + xc_interface *xch, + uint32_t domid, + char *path) +{ + int rc; + size_t size = strlen(path); + DECLARE_DOMCTL; + DECLARE_HYPERCALL_BOUNCE(path, size, XC_HYPERCALL_BUFFER_BOUNCE_IN); + + if ( xc_hypercall_bounce_pre(xch, path) ) + return -1; + + domctl.cmd = XEN_DOMCTL_assign_device; + domctl.domain = (domid_t)domid; + + domctl.u.assign_device.dev = XEN_DOMCTL_DEV_DT; + domctl.u.assign_device.u.dt.size = size; + set_xen_guest_handle(domctl.u.assign_device.u.dt.path, path); + + rc = do_domctl(xch, &domctl); + + xc_hypercall_bounce_post(xch, path); + + return rc; +} + +int xc_test_assign_dt_device( + xc_interface *xch, + uint32_t domid, + char *path) +{ + int rc; + size_t size = strlen(path); + DECLARE_DOMCTL; + DECLARE_HYPERCALL_BOUNCE(path, size, XC_HYPERCALL_BUFFER_BOUNCE_IN); + + if ( xc_hypercall_bounce_pre(xch, path) ) + return -1; + + domctl.cmd = XEN_DOMCTL_test_assign_device; + domctl.domain = (domid_t)domid; + + domctl.u.assign_device.dev = XEN_DOMCTL_DEV_DT; + domctl.u.assign_device.u.dt.size = size; + set_xen_guest_handle(domctl.u.assign_device.u.dt.path, path); + + rc = do_domctl(xch, &domctl); + + xc_hypercall_bounce_post(xch, path); + + return rc; +} + +int xc_deassign_dt_device( + xc_interface *xch, + uint32_t domid, + char *path) +{ + int rc; + size_t size = strlen(path); + DECLARE_DOMCTL; + DECLARE_HYPERCALL_BOUNCE(path, size, XC_HYPERCALL_BUFFER_BOUNCE_IN); + + if ( xc_hypercall_bounce_pre(xch, path) ) + return -1; + + domctl.cmd = XEN_DOMCTL_deassign_device; + domctl.domain = (domid_t)domid; + + domctl.u.assign_device.dev = XEN_DOMCTL_DEV_DT; + domctl.u.assign_device.u.dt.size = size; + set_xen_guest_handle(domctl.u.assign_device.u.dt.path, path); + + rc = do_domctl(xch, &domctl); + + xc_hypercall_bounce_post(xch, path); + + return rc; +} + + + + int xc_domain_update_msi_irq( xc_interface *xch, uint32_t domid, diff --git a/xen/drivers/passthrough/device_tree.c b/xen/drivers/passthrough/device_tree.c index 0ec4103..5d3842a 100644 --- a/xen/drivers/passthrough/device_tree.c +++ b/xen/drivers/passthrough/device_tree.c @@ -1,9 +1,6 @@ /* * Code to passthrough a device tree node to a guest * - * TODO: This contains only the necessary code to protected device passed to - * dom0. It will need some updates when device passthrough will is added. - * * Julien Grall * Copyright (c) 2014 Linaro Limited. * @@ -20,8 +17,10 @@ #include #include +#include #include #include +#include static spinlock_t dtdevs_lock = SPIN_LOCK_UNLOCKED; @@ -93,6 +92,20 @@ fail: return rc; } +static bool_t iommu_dt_device_is_assigned(const struct dt_device_node *dev) +{ + bool_t assigned = 0; + + if ( !dt_device_is_protected(dev) ) + return 0; + + spin_lock(&dtdevs_lock); + assigned = !list_empty(&dev->domain_list); + spin_unlock(&dtdevs_lock); + + return assigned; +} + int iommu_dt_domain_init(struct domain *d) { struct hvm_iommu *hd = domain_hvm_iommu(d); @@ -121,3 +134,92 @@ int iommu_release_dt_devices(struct domain *d) return 0; } + +int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d, + XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) +{ + int ret; + struct dt_device_node *dev; + + switch ( domctl->cmd ) + { + case XEN_DOMCTL_assign_device: + ret = -ENODEV; + if ( domctl->u.assign_device.dev != XEN_DOMCTL_DEV_DT ) + break; + + if ( unlikely(d->is_dying) ) + { + ret = -EINVAL; + break; + } + + ret = dt_find_node_by_gpath(domctl->u.assign_device.u.dt.path, + domctl->u.assign_device.u.dt.size, + &dev); + if ( ret ) + break; + + ret = xsm_assign_dtdevice(XSM_HOOK, d, dt_node_full_name(dev)); + if ( ret ) + break; + + ret = iommu_assign_dt_device(d, dev); + + if ( ret ) + printk(XENLOG_G_ERR "XEN_DOMCTL_assign_dt_device: assign \"%s\"" + " to dom%u failed (%d)\n", + dt_node_full_name(dev), d->domain_id, ret); + break; + + case XEN_DOMCTL_deassign_device: + ret = -ENODEV; + if ( domctl->u.assign_device.dev != XEN_DOMCTL_DEV_DT ) + break; + + ret = dt_find_node_by_gpath(domctl->u.assign_device.u.dt.path, + domctl->u.assign_device.u.dt.size, + &dev); + if ( ret ) + break; + + ret = xsm_deassign_dtdevice(XSM_HOOK, d, dt_node_full_name(dev)); + + ret = iommu_deassign_dt_device(d, dev); + + if ( ret ) + printk(XENLOG_G_ERR "XEN_DOMCTL_assign_dt_device: assign \"%s\"" + " to dom%u failed (%d)\n", + dt_node_full_name(dev), d->domain_id, ret); + break; + + case XEN_DOMCTL_test_assign_device: + ret = -ENODEV; + if ( domctl->u.assign_device.dev != XEN_DOMCTL_DEV_DT ) + break; + + ret = dt_find_node_by_gpath(domctl->u.assign_device.u.dt.path, + domctl->u.assign_device.u.dt.size, + &dev); + if ( ret ) + break; + + ret = xsm_test_assign_dtdevice(XSM_HOOK, dt_node_full_name(dev)); + if ( ret ) + break; + + if ( iommu_dt_device_is_assigned(dev) ) + { + printk(XENLOG_G_ERR "%s already assigned.\n", + dt_node_full_name(dev)); + ret = -EINVAL; + } + break; + + default: + ret = -ENOSYS; + break; + } + + return ret; +} diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index ae42aae..06cb38f 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -335,7 +335,7 @@ int iommu_do_domctl( struct xen_domctl *domctl, struct domain *d, XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) { - int ret = -ENOSYS; + int ret = -ENODEV; if ( !iommu_enabled ) return -ENOSYS; @@ -344,6 +344,11 @@ int iommu_do_domctl( ret = iommu_do_pci_domctl(domctl, d, u_domctl); #endif +#ifdef HAS_DEVICE_TREE + if ( ret == -ENODEV ) + ret = iommu_do_dt_domctl(domctl, d, u_domctl); +#endif + return ret; } diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index af26423..862e20f 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -1500,6 +1500,7 @@ int iommu_do_pci_domctl( u16 seg; u8 bus, devfn; int ret = 0; + uint32_t machine_sbdf; switch ( domctl->cmd ) { @@ -1513,8 +1514,8 @@ int iommu_do_pci_domctl( break; seg = domctl->u.get_device_group.machine_sbdf >> 16; - bus = (domctl->u.get_device_group.machine_sbdf >> 8) & 0xff; - devfn = domctl->u.get_device_group.machine_sbdf & 0xff; + bus = PCI_BUS(domctl->u.get_device_group.machine_sbdf); + devfn = PCI_DEVFN2(domctl->u.get_device_group.machine_sbdf); max_sdevs = domctl->u.get_device_group.max_sdevs; sdevs = domctl->u.get_device_group.sdev_array; @@ -1536,13 +1537,19 @@ int iommu_do_pci_domctl( break; case XEN_DOMCTL_test_assign_device: - ret = xsm_test_assign_device(XSM_HOOK, domctl->u.assign_device.machine_sbdf); + ret = -ENODEV; + if ( domctl->u.assign_device.dev != XEN_DOMCTL_DEV_PCI ) + break; + + machine_sbdf = domctl->u.assign_device.u.pci.machine_sbdf; + + ret = xsm_test_assign_device(XSM_HOOK, machine_sbdf); if ( ret ) break; - seg = domctl->u.assign_device.machine_sbdf >> 16; - bus = (domctl->u.assign_device.machine_sbdf >> 8) & 0xff; - devfn = domctl->u.assign_device.machine_sbdf & 0xff; + seg = machine_sbdf >> 16; + bus = PCI_BUS(machine_sbdf); + devfn = PCI_DEVFN2(machine_sbdf); if ( device_assigned(seg, bus, devfn) ) { @@ -1554,19 +1561,25 @@ int iommu_do_pci_domctl( break; case XEN_DOMCTL_assign_device: + ret = -ENODEV; + if ( domctl->u.assign_device.dev != XEN_DOMCTL_DEV_PCI ) + break; + if ( unlikely(d->is_dying) ) { ret = -EINVAL; break; } - ret = xsm_assign_device(XSM_HOOK, d, domctl->u.assign_device.machine_sbdf); + machine_sbdf = domctl->u.assign_device.u.pci.machine_sbdf; + + ret = xsm_assign_device(XSM_HOOK, d, machine_sbdf); if ( ret ) break; - seg = domctl->u.assign_device.machine_sbdf >> 16; - bus = (domctl->u.assign_device.machine_sbdf >> 8) & 0xff; - devfn = domctl->u.assign_device.machine_sbdf & 0xff; + seg = machine_sbdf >> 16; + bus = PCI_BUS(machine_sbdf); + devfn = PCI_DEVFN2(machine_sbdf); ret = device_assigned(seg, bus, devfn) ?: assign_device(d, seg, bus, devfn); @@ -1582,13 +1595,19 @@ int iommu_do_pci_domctl( break; case XEN_DOMCTL_deassign_device: - ret = xsm_deassign_device(XSM_HOOK, d, domctl->u.assign_device.machine_sbdf); + ret = -ENODEV; + if ( domctl->u.assign_device.dev != XEN_DOMCTL_DEV_PCI ) + break; + + machine_sbdf = domctl->u.assign_device.u.pci.machine_sbdf; + + ret = xsm_deassign_device(XSM_HOOK, d, machine_sbdf); if ( ret ) break; - seg = domctl->u.assign_device.machine_sbdf >> 16; - bus = (domctl->u.assign_device.machine_sbdf >> 8) & 0xff; - devfn = domctl->u.assign_device.machine_sbdf & 0xff; + seg = machine_sbdf >> 16; + bus = PCI_BUS(machine_sbdf); + devfn = PCI_DEVFN2(machine_sbdf); spin_lock(&pcidevs_lock); ret = deassign_device(d, seg, bus, devfn); diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index d94c647..993944e 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -475,12 +475,30 @@ typedef struct xen_domctl_sendtrigger xen_domctl_sendtrigger_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_sendtrigger_t); -/* Assign PCI device to HVM guest. Sets up IOMMU structures. */ +/* Assign a device to a guest. Sets up IOMMU structures. */ /* XEN_DOMCTL_assign_device */ /* XEN_DOMCTL_test_assign_device */ -/* XEN_DOMCTL_deassign_device */ +/* + * XEN_DOMCTL_deassign_device: The behavior of this DOMCTL differs + * between the different type of device: + * - PCI device (XEN_DOMCTL_DEV_PCI) will be reassigned to DOM0 + * - DT device (XEN_DOMCTL_DT_PCI) will left unassigned. DOM0 + * will have to call XEN_DOMCTL_assign_device in order to use the + * device. + */ +#define XEN_DOMCTL_DEV_PCI 0 +#define XEN_DOMCTL_DEV_DT 1 struct xen_domctl_assign_device { - uint32_t machine_sbdf; /* machine PCI ID of assigned device */ + uint32_t dev; /* XEN_DOMCTL_DEV_* */ + union { + struct { + uint32_t machine_sbdf; /* machine PCI ID of assigned device */ + } pci; + struct { + uint32_t size; /* Length of the path */ + XEN_GUEST_HANDLE_64(char) path; /* path to the device tree node */ + } dt; + } u; }; typedef struct xen_domctl_assign_device xen_domctl_assign_device_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_assign_device_t); diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index d9c9ede..b30bf41 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -119,6 +119,9 @@ int iommu_deassign_dt_device(struct domain *d, struct dt_device_node *dev); int iommu_dt_domain_init(struct domain *d); int iommu_release_dt_devices(struct domain *d); +int iommu_do_dt_domctl(struct xen_domctl *, struct domain *, + XEN_GUEST_HANDLE_PARAM(xen_domctl_t)); + #endif /* HAS_DEVICE_TREE */ struct page_info;