x86/p2m: Fix paging_gva_to_gfn() for nested virt
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 31 Dec 2020 16:55:20 +0000 (16:55 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 4 Jan 2021 13:19:51 +0000 (13:19 +0000)
commit7ba2ab495be54f608cb47440e1497b2795bd301a
tree5449bbd7371eccd38f50a31bf7f23b340d63ff5d
parent62dde2c1eff6d4e5d45883b78bdae5447e7d2d9c
x86/p2m: Fix paging_gva_to_gfn() for nested virt

nestedhap_walk_L1_p2m() takes guest physical addresses, not frame numbers.
This means the l2 input is off-by-PAGE_SHIFT, as is the l1 value eventually
returned to the caller.

Delete the misleading comment as well.

Fixes: bab2bd8e222de ("xen/nested_p2m: Don't walk EPT tables with a regular PT walker")
Reported-by: Tamas K Lengyel <tamas@tklengyel.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/x86/mm/p2m.c