From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 05/21] xen/arm: follow-up to allow DOM0 manage IRQ and MMIO Date: Fri, 12 Sep 2014 12:04:31 -0700 Message-ID: <541343BF.1080701@linaro.org> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> <1406818852-31856-6-git-send-email-julien.grall@linaro.org> <1410268043.8217.173.camel@kazak.uk.xensource.com> <541222F6.1070406@linaro.org> <1410516790.567.46.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XSW97-0000sf-9h for xen-devel@lists.xenproject.org; Fri, 12 Sep 2014 19:04:37 +0000 Received: by mail-qg0-f52.google.com with SMTP id i50so1258013qgf.11 for ; Fri, 12 Sep 2014 12:04:34 -0700 (PDT) In-Reply-To: <1410516790.567.46.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 12/09/14 03:13, Ian Campbell wrote: > On Thu, 2014-09-11 at 15:32 -0700, Julien Grall wrote: >> The current solution doesn't map the device into DOM0 memory but the >> device is still described in the device tree. > > I had some thoughts on that in the thread on the 00/21 mail BTW. > >> With the new property "xen,passthrough", we would have to remove the >> node from DOM0, or teach DOM0 that the device should not be used. > > You would translate it into status="disabled" for dom0, that's all, no > need to remove anything. I didn't think about this. So this "xen.passthrough" property will be only used by Xen. I will implement it for the next version. >> >> Overall, I don't think dropping the node in DOM0 device tree will impact >> it. If it's the case that would mean the device should not be >> passthrough to another guest. So I will give a look to introduce this >> new property. Shall I send a patch to the device tree bindings ML? >> >> BTW, I don't think the new property should be a boolean. Use only the >> name should be enough here. > > That's what boolean means in DT context, a name without a value. Oh right. I had in mind the status="disabled" stuff. >> > >>>> + { >>>> + res = route_irq_to_guest(d, irq, dt_node_name(dev)); >>>> + if ( res ) >>>> + { >>>> + printk(XENLOG_ERR "Unable to route IRQ %u to domain %u\n", >>>> + irq, d->domain_id); >>>> + return res; >>>> + } >>>> + } >>>> } >>>> >>>> - /* Map the address ranges */ >>>> + /* Give permission and map MMIOs */ >>> >>> Permissions are now given above, not below, aren't they? >> >> Only permission for IRQ. The MMIO ones are given few lines below. > > Ah, right. I can update the comment to make more clear. Regards, -- Julien Grall