From: Stefano Stabellini Subject: Re: [XenARM] XEN tools for ARM with Virtualization Extensions Date: Wed, 10 Jul 2013 14:37:39 +0100 Message-ID: References: <1372237802.18901.115.camel@zakaz.uk.xensource.com> <1372265106.7337.107.camel@zakaz.uk.xensource.com> <1372350862.8976.35.camel@zakaz.uk.xensource.com> <51CC9398.4060301@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Eric Trudeau Cc: Julien Grall , Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org On Tue, 9 Jul 2013, Eric Trudeau wrote: > I added support for XEN_DOMCTL_memory_mapping in xen/arch/arm/domctl.c > using xen/arch/x86/domctl.c as a model. I only implemented add functionality. > I then modified domcreate_launch_dm() to call xc_domain_memory_mapping() > instead of xc_domain_iomem_permission for the iomem regions in the domain > cfg file. > > This allowed my kernel which unfortunately has some hard-coded accesses to > device memory to boot up in a DomU guest machine without crashing. > Now, I am looking into how to enable IRQs in my guest domains. > Would I implement xc_domain_bind_pt_irq/XEN_DOMCTL_bind_pt_irq in a similar > way as xc_domain_memory_mapping? Or will the existing xc_domain_irq_permission > calls work? > > What functions should I call to implement XEN_DOMCTL_bind_pt_irq on ARM? I think we would probably need to introduce a new hypercall because neither PHYSDEVOP_map_pirq nor XEN_DOMCTL_bind_pt_irq fit our model very well. The first one creates the mapping (as in allows the guest to receive the interrupt but only as an event channel notification), the second one sets up the emulation. For HVM guests on x86 we need to call both. For PV guests, just the first one. On ARM we would need to introduce something similar to PHYSDEVOP_map_pirq that instead of returning a pirq returns the guest irq. We could actually use PHYSDEVOP_map_pirq, if we mandate that on ARM pirq means guest irq, but I wouldn't recommend it because it could lead to confusion.