x86/shadow: fix PAE check for top-level table unshadowing

Clearly within the for_each_vcpu() the vCPU of this loop is meant, not
the (loop invariant) one the fault occurred on.

Fixes: 3d5e6a3ff3 ("x86 hvm: implement HVMOP_pagetable_dying")
Fixes: ef3b0d8d2c ("x86/shadow: shadow_table[] needs only one entry for PV-only configs")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2023-01-20 09:23:42 +01:00
1 parent 41dbbfb596
commit f8fdceefbb
1 file changed
+2 -2
+2 -2
View File
@@ -2677,10 +2677,10 @@ static int cf_check sh_page_fault(
#if GUEST_PAGING_LEVELS == 3
unsigned int i;
for_each_shadow_table(v, i)
for_each_shadow_table(tmp, i)
{
mfn_t smfn = pagetable_get_mfn(
v->arch.paging.shadow.shadow_table[i]);
tmp->arch.paging.shadow.shadow_table[i]);
if ( mfn_x(smfn) )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.