From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: run time memory trap question Date: Mon, 17 Feb 2014 12:02:39 +0000 Message-ID: <5301FA5F.8020602@linaro.org> References: 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: Andrii Tseglytskyi Cc: Stefano Stabellini , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 02/17/2014 11:33 AM, Andrii Tseglytskyi wrote: > Hi, Hello Andrii, > Can anyone clarify - is it possible to make a run time memory trap in > Xen hypervisor? I guess you are talking about ARM? If so, it's not possible right now. > To be more specific - I see the following function: > *int handle_mmio(mmio_info_t *info)*, which is called from *static > void do_trap_data_abort_guest(struct cpu_user_regs *regs, union hsr > hsr)* > Using these calls I can define memory region and create a trap for it. > But in current implementation I can do it only during compile time. > Is there any way to do similar in runtime - i.e. calculate memory > region value in code and add an entry to mmio_handlers[] ? > Is it a good idea - just to modify/extend existing code in > xen/arch/arm/io.c file to make it possible ? I think yes, we might need that for a couple of new features in Xen such as: clock drivers and multiple devices in a same page (see UARTs on cubieboard 2). Regards, -- Julien Grall