From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v3 09/23] xsplice: Add support for bug frames. (v4) Date: Wed, 24 Feb 2016 11:22:18 -0500 Message-ID: <20160224162218.GA25409@char.us.oracle.com> References: <1455300361-13092-1-git-send-email-konrad.wilk@oracle.com> <1455300361-13092-10-git-send-email-konrad.wilk@oracle.com> <56C37A04.6030501@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <56C37A04.6030501@citrix.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: Andrew Cooper Cc: Keir Fraser , Ian Campbell , jinsong.liu@alibaba-inc.com, xen-devel@lists.xen.org, mpohlack@amazon.de, ross.lagerwall@citrix.com, Stefano Stabellini , Jan Beulich , xen-devel@lists.xenproject.org, sasha.levin@citrix.com List-Id: xen-devel@lists.xenproject.org . snip.. > There is a neater way of doing this, which doesn't involve having "if ( > regular ) else if ( xsplice )" logic chains through the code. s/chains/chain/ There is only one that uses the 'xsplice' name in it:-) The other two are wrapped with the 'is_patch'. > > Given a > > struct virtual_region > { > struct list_head list; > unsigned long start, size; > > struct bug_frame *foo; > struct exception_table_entry *bar; > }; > > The init code can construct one for the base hypervisor, and xsplice can > add or remove entries from the list. Then, the trap routines search the > virtual region list for [start, size) and follow the appropriate pointers. You are suggesting that on bootup we parse the the __stop_bug_frames_[0-3] (different on ARM), and create an linked list to contain those. Then xSplice can call in this API to add their own - and on unload it can unlink them and free them. If m understanding is correct - while it is certainly much nicer, it has drawbacks: - Increases the code to now handle the linked list and all the code around it (And correspondingly we may have now some extra bugs to track). - Bigger memory consumption - we now to have to consume memory for this list - even for the built-in ones. - More code to do for v1 of this patchset. Can we perhaps we can make this a lesser priority and keep it the existing if ( .. ) else if (xsplice_find_bug()..) code construct for Xen 4.7? Thanks.