]> xenbits.xensource.com Git - people/dariof/xen.git/commit
x86/shadow: compile most write emulation code just once
authorJan Beulich <jbeulich@suse.com>
Thu, 10 Mar 2016 15:48:23 +0000 (16:48 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Mar 2016 15:48:23 +0000 (16:48 +0100)
commit2c80710a78c931457ed1215d19834efe26ff115d
tree68c0b0d26869d577144d13862a32b0d584736004
parent4640ab6e227c3d7b84dccd37c3be4aa8e3894fb6
x86/shadow: compile most write emulation code just once

No need to compile all of this code three times, as most of it really
is guest mode independent. The savings are between 3k and 4k of binary
code in my builds. For this to fully work out, the sh_gva_to_gfn()
calls are being replaced by indirect ones through the paging mode
table.

No functional change (i.e. only formatting and naming changes) except
for
- sh_emulate_map_dest()'s user mode check corrected for the PV case
  (affecting debugging mode only, this isn't being split out)
- simplifying the vaddr argument to emulate_gva_to_mfn() for the second
  part in the cross page write case

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c
xen/arch/x86/mm/shadow/private.h