xen: Speed up set_phys_to_machine() by using read-only mappings
authorJuergen Gross <jgross@suse.com>
Fri, 28 Nov 2014 10:53:59 +0000 (11:53 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 4 Dec 2014 14:09:20 +0000 (14:09 +0000)
Instead of checking at each call of set_phys_to_machine() whether a
new p2m page has to be allocated due to writing an entry in a large
invalid or identity area, just map those areas read only and react
to a page fault on write by allocating the new page.

This change will make the common path with no allocation much
faster as it only requires a single write of the new mfn instead
of walking the address translation tables and checking for the
special cases.

Suggested-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
arch/x86/xen/p2m.c

Simple merge