From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 1/4] expand x86 arch_shared_info to support linear p2m list Date: Fri, 21 Nov 2014 14:04:58 +0000 Message-ID: <546F468A.2030606@citrix.com> References: <1415957846-22703-1-git-send-email-jgross@suse.com> <1415957846-22703-2-git-send-email-jgross@suse.com> <546F3CBE0200007800049B77@smtp.nue.novell.com> <546F36C9.3020004@suse.com> <546F3D6D.9030204@citrix.com> <546F4013.5060402@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XrorX-0002NP-94 for xen-devel@lists.xenproject.org; Fri, 21 Nov 2014 14:07:03 +0000 In-Reply-To: <546F4013.5060402@suse.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: =?windows-1252?Q?J=FCrgen_Gro=DF?= , Jan Beulich Cc: "keir@xen.org" , "Ian.Campbell@citrix.com" , Tim Deegan , Ian Jackson , david.vrabel@citrix.com, xen-devel List-Id: xen-devel@lists.xenproject.org On 21/11/14 13:37, J=FCrgen Gro=DF wrote: > On 11/21/2014 02:26 PM, Andrew Cooper wrote: >> On 21/11/14 12:57, Juergen Gross wrote: >>> On 11/21/2014 01:23 PM, Jan Beulich wrote: >>>>>>> On 14.11.14 at 10:37, <"jgross@suse.com".non-mime.internet> wrote: >>>>> --- a/xen/include/public/arch-x86/xen.h >>>>> +++ b/xen/include/public/arch-x86/xen.h >>>>> @@ -224,7 +224,12 @@ struct arch_shared_info { >>>>> /* Frame containing list of mfns containing list of mfns >>>>> containing p2m. */ >>>>> xen_pfn_t pfn_to_mfn_frame_list_list; >>>>> unsigned long nmi_reason; >>>>> - uint64_t pad[32]; >>>>> + /* >>>>> + * Following two fields are valid if pfn_to_mfn_frame_list_list >>>>> contains >>>>> + * ~0UL. >>>>> + */ >>>>> + unsigned long p2m_vaddr; /* virtual address of the p2m >>>>> list */ >>>>> + unsigned long p2m_as_root; /* mfn of the top level page >>>>> table */ >>>> >>>> xen_pfn_t please. And what does the "as" in the name stand for? >>> >>> "as" is address space. I can rename it to e.g. "p2m_pgd_mfn". >> >> That is a linuxism in naming, which is also not accurate. >> >> From my understanding, this frame must be an L4 table for 64bit guests, >> and an L3 table for 32bit guests. I.e. it is effectively a cr3 with >> which to use the p2m_vaddr field above? > > Okay, so p2m_cr3 then? > > I think that is reasonable, along with the comment explaining that it must reference an L4 or L3 frame, depending on the width of the guest. = In the case of a 32bit guest, it should be a magic folded pfn, in the same representation that cr3 has in the vcpu register state. ~Andrew