]> xenbits.xensource.com Git - xen.git/commit
x86/altp2m: fix display frozen when switching to a new view early
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Sat, 22 Dec 2018 09:43:51 +0000 (09:43 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Sat, 22 Dec 2018 09:43:51 +0000 (09:43 +0000)
commit0fb4b58c8b9cc4036907d595a124b31aa1153f33
tree2c6322e95ea4ed9bd4ee8e5a8c59c62aa50034b2
parent6e23f46ea9bb7403c9b6d29449a35d1381f1c56e
x86/altp2m: fix display frozen when switching to a new view early

When an new altp2m view is created very early on guest boot, the
display will freeze (although the guest will run normally). This
may also happen on resizing the display. The reason is the way
Xen currently (mis)handles logdirty VGA: it intentionally
misconfigures VGA pages so that they will fault.

The problem is that it only does this in the host p2m. Once we
switch to a new altp2m, the misconfigured entries will no longer
fault, so the display will not be updated.

This patch:
* updates ept_handle_misconfig() to use the active altp2m instead
  of the hostp2m;
* modifies p2m_change_entry_type_global(),
  p2m_memory_type_changed(), p2m_change_type_range() and
  p2m_finish_type_change() to propagate their changes to all
  valid altp2ms.

With the introduction of altp2m fields in p2m_memory_type_changed()
the whole function has been put under CONFIG_HVM.

Suggested-by: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m-pt.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/p2m.h