From: Vincent Hanquez Subject: [PATCH 0/7][RFC] make xenguest save & restore functions reentrant Date: Fri, 13 Nov 2009 23:43:00 +0000 Message-ID: <1258155787-28327-1-git-send-email-vincent.hanquez@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel Cc: Vincent Hanquez List-Id: xen-devel@lists.xenproject.org The following patchset make suspend and restore code reentrant by having an explicit context to store current variables across all the suspend/restore code. This work is necessary for beeing able to get rid of the fork of processes during save&restore, and provide a simpler interface for toolstack developers. it hasn't been properly stress tested yet. Vincent Hanquez (7): add explicit parameter to macros instead of assuming symbol name available on the stack or as a global variable. p2m_size is unnecessarily passed as a parameter when it's available as a global variable. move global variable in suspend into a global context move the suspend_ctx on the save stack instead of a global one alias i/FPP(guest_width) as p2m_index and replace every usage move restore global variable into a global context pass restore context as an argument instead of a global context tools/libxc/xc_core.c | 2 +- tools/libxc/xc_core_x86.c | 20 ++-- tools/libxc/xc_domain_restore.c | 331 +++++++++++++++++++-------------------- tools/libxc/xc_domain_save.c | 243 ++++++++++++++--------------- tools/libxc/xc_offline_page.c | 8 +- tools/libxc/xc_resume.c | 12 +- tools/libxc/xg_private.h | 16 +- tools/libxc/xg_save_restore.h | 22 ++-- 8 files changed, 324 insertions(+), 330 deletions(-)