From: Abe Petrov Subject: Question about linear mapping of shadow page tables for 64bit HVM guest Date: Sat, 21 Nov 2009 13:38:54 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 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: gianluca.guida@eu.citrix.com, Tim.Deegan@citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Linear mapping of shadow page tables is used to find shadow PTEs that map a given guest VA. If I understand the following macros correctly #define __sh_linear_l1_table ((shadow_l1e_t *)(SH_LINEAR_PT_VIRT_START)) #define __sh_linear_l2_table ((shadow_l2e_t *) \ (__sh_linear_l1_table + shadow_l1_linear_offset(SH_LINEAR_PT_VIRT_START))) there is an overlap between L1 and L2 (also L3 and L4) tables. That creates potential conflicts between different guest VAs. For example L1 shadow PTE for guest VA1 = 0x818000000000 (the same as SH_LINEAR_PT_VIRT_START) coincides with L2 shadow PTE for the guest VA2 = 0x0. So updating L1 shadow PTE for guest VA1 would overwrite L2 shadow PTE for the guest VA2. What am I missing? Sorry for the novice question. Thank you, Abe.