From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4 06/33] xen/arm: Introduce xen, passthrough property Date: Tue, 31 Mar 2015 11:25:18 +0100 Message-ID: <1427797518.2115.44.camel@citrix.com> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> <1426793399-6283-7-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YctSA-0000h5-Ri for xen-devel@lists.xenproject.org; Tue, 31 Mar 2015 10:31:26 +0000 In-Reply-To: <1426793399-6283-7-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, 2015-03-19 at 19:29 +0000, Julien Grall wrote: > When a device is marked for passthrough (via the new property > "xen,passthrough"), dom0 must not access to the device (i.e not > loading a driver), but should be able to manage the MMIO/interrupt > of the passthrough device. > > The latter part will allow the toolstack to map MMIO/IRQ when a device > is pass through to a guest. > > The property "xen,passthrough" will be translated as 'status="disabled"' > in the device tree to avoid DOM0 using the device. We assume that DOM0 is > able to cope with this property (already the case for Linux, and > required by ePAPR). > > Rework the function map_device (renamed into handle_device) to: > > * For a given device node: > - Give permission to manage IRQ/MMIO for this device > - Retrieve the IRQ configuration (i.e edge/level) from the device > tree > * When the device is not marked for guest passthrough: > - Assign the device to the guest if it's protected by an IOMMU > - Map the IRQs and MMIOs regions to the guest > > Signed-off-by: Julien Grall > Acked-by: Stefano Stabellini Acked-by: Ian Campbell