aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/paging.h
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2007-08-31 11:06:22 +0100
committerTim Deegan <Tim.Deegan@xensource.com>2007-08-31 11:06:22 +0100
commitc028cc106a4abb57e9f0c199e37073a627de7eb6 (patch)
tree10916bd347c0321f8af3190455cd207cdbacbba1 /xen/include/asm-x86/paging.h
parente5544039c94197ca04586cccf1af317ed11a05fe (diff)
downloadxen-c028cc106a4abb57e9f0c199e37073a627de7eb6.tar.gz
xen-c028cc106a4abb57e9f0c199e37073a627de7eb6.tar.bz2
xen-c028cc106a4abb57e9f0c199e37073a627de7eb6.zip
[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>
Diffstat (limited to 'xen/include/asm-x86/paging.h')
-rw-r--r--xen/include/asm-x86/paging.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h
index 35067b289b..842c4c7134 100644
--- a/xen/include/asm-x86/paging.h
+++ b/xen/include/asm-x86/paging.h
@@ -66,19 +66,6 @@
/* flags used for paging debug */
#define PAGING_DEBUG_LOGDIRTY 0
-/******************************************************************************
- * The equivalent for a particular vcpu of a shadowed domain. */
-
-/* Is this vcpu using the P2M table to translate between GFNs and MFNs?
- *
- * This is true of translated HVM domains on a vcpu which has paging
- * enabled. (HVM vcpus with paging disabled are using the p2m table as
- * its paging table, so no translation occurs in this case.)
- * It is also true for all vcpus of translated PV domains. */
-#define paging_vcpu_mode_translate(_v) ((_v)->arch.paging.translate_enabled)
-
-
-
/*****************************************************************************
* Mode-specific entry points into the shadow code.
*
@@ -222,9 +209,6 @@ static inline int paging_invlpg(struct vcpu *v, unsigned long va)
#define INVALID_GFN (-1UL)
static inline unsigned long paging_gva_to_gfn(struct vcpu *v, unsigned long va)
{
- if ( unlikely(!paging_vcpu_mode_translate(v)) )
- return va >> PAGE_SHIFT;
-
return v->arch.paging.mode->gva_to_gfn(v, va);
}