From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: =?utf-8?q?=5BPATCH_v2_1/5=5D_x86/shadow=3A_tidy_up_fr?= =?utf-8?q?agmentary_page_lists_in_multi=E2=80=91page_shadows?= Date: Mon, 2 Feb 2015 11:43:45 +0000 Message-ID: <54CF62F1.1060206@citrix.com> References: <54CF68DF020000780005BD6C@mail.emea.novell.com> <54CF6B24020000780005BD95@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YIFPy-0006et-Gx for xen-devel@lists.xenproject.org; Mon, 02 Feb 2015 11:43:50 +0000 In-Reply-To: <54CF6B24020000780005BD95@mail.emea.novell.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: Jan Beulich , xen-devel Cc: Tim Deegan , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 02/02/15 11:18, Jan Beulich wrote: > From: Tim Deegan > > Multi-page shadows are linked together using the 'list' field. When > those shadows are in the pinned list, the list fragments are spliced > into the pinned list; otherwise they have no associated list head. > > Rework the code that handles these fragments to use the page_list > interface rather than manipulating the fields directly. This makes > the code cleaner, and allows the 'list' field to be either the > compact pdx form or a normal list_entry. > > Signed-off-by: Tim Deegan I put v1 of the patch through XenRT over the weekend, and nothing appeared to blow up spectacularly. Tested-by: Andrew Cooper > > Introduce sh_terminate_list() and make it use LIST_POISON*. > > Move helper array of shadow_size() into common.c. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper , with 1 small comment > > --- a/xen/arch/x86/mm/shadow/common.c > +++ b/xen/arch/x86/mm/shadow/common.c > @@ -1196,6 +1196,26 @@ int shadow_cmpxchg_guest_entry(struct vc > * the free pool. > */ > > +const u32 sh_type_to_size[] = { u8 instead? The maximum value held is 4. ~Andrew