]> xenbits.xensource.com Git - people/iwj/xen.git/commit
x86/mm: fix incorrect unmapping of 2MB and 1GB pages
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Wed, 17 May 2017 15:23:15 +0000 (17:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 17 May 2017 15:23:15 +0000 (17:23 +0200)
commitefa9596e9d167c8fb7d1c4446c10f7ca30453646
tree3d7b7314cb4b4fd76f5ddfbb4bbb32b3824fee27
parent5c4f579e0ee4f38cad5636bbf8ce700a394338d0
x86/mm: fix incorrect unmapping of 2MB and 1GB pages

The same set of functions is used to set as well as to clean
P2M entries, except that for clean operations INVALID_MFN (~0UL)
is passed as a parameter. Unfortunately, when calculating an
appropriate target order for a particular mapping INVALID_MFN
is not taken into account which leads to 4K page target order
being set each time even for 2MB and 1GB mappings. This eventually
breaks down an EPT structure irreversibly into 4K mappings which
prevents consecutive high order mappings to this area.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m.c