diff xen/include/asm-x86/p2m.h @ 15812:86a154e1ef5d

[HVM] Shadow: don't shadow the p2m table.
For HVM vcpus with paging disabled, we used to shadow the p2m table,
and skip the p2m lookup to go from gfn to mfn. Instead, we now
provide a simple pagetable that gives a one-to-one mapping of 4GB, and
shadow that, making the translations from gfn to mfn via the p2m.
This removes the paging-disabled special-case code from the shadow
fault handler, and allows us to expand the p2m interface, since all HVM
translations now go through the same p2m lookups.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Fri Aug 31 11:06:22 2007 +0100 (2007-08-31)
parents 3d5f39c610ad
children 4633e9604da9
line diff
     1.1 --- a/xen/include/asm-x86/p2m.h	Fri Aug 31 10:59:41 2007 +0100
     1.2 +++ b/xen/include/asm-x86/p2m.h	Fri Aug 31 11:06:22 2007 +0100
     1.3 @@ -61,7 +61,8 @@ static inline mfn_t gfn_to_mfn_current(u
     1.4  mfn_t gfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
     1.6  /* General conversion function from gfn to mfn */
     1.7 -static inline mfn_t gfn_to_mfn(struct domain *d, unsigned long gfn)
     1.8 +#define gfn_to_mfn(d, g) _gfn_to_mfn((d), (g))
     1.9 +static inline mfn_t _gfn_to_mfn(struct domain *d, unsigned long gfn)
    1.10  {
    1.11      if ( !paging_mode_translate(d) )
    1.12          return _mfn(gfn);