aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Deegan <tim@xen.org>2012-08-02 14:44:53 +0100
committerTim Deegan <tim@xen.org>2012-08-02 14:44:53 +0100
commit097baed0b10099cd43477f81bf18cf4dd4a58ecf (patch)
tree4c0cb29e744d914dab1898cceddb64439735a83e
parentd2a57e8153361633ce9ac95bb94f0f11ed399f33 (diff)
downloadxen-097baed0b10099cd43477f81bf18cf4dd4a58ecf.tar.gz
xen-097baed0b10099cd43477f81bf18cf4dd4a58ecf.tar.bz2
xen-097baed0b10099cd43477f81bf18cf4dd4a58ecf.zip
nestedhvm: return the pfec from the pagetable walk.
Don't clobber it with the pfec from teh p2m walk behind it; the guest will not expect (or be able to handle) error codes that come from the p2m table, which it can't see or control. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Tim Deegan <tim@xen.org>
-rw-r--r--xen/arch/x86/mm/p2m.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 3cdc417d78..75926558fd 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1581,6 +1581,7 @@ unsigned long paging_gva_to_gfn(struct vcpu *v,
unsigned long gfn;
struct p2m_domain *p2m;
const struct paging_mode *mode;
+ uint32_t pfec_21 = *pfec;
uint64_t ncr3 = nhvm_vcpu_hostcr3(v);
/* translate l2 guest va into l2 guest gfn */
@@ -1590,7 +1591,7 @@ unsigned long paging_gva_to_gfn(struct vcpu *v,
/* translate l2 guest gfn into l1 guest gfn */
return hostmode->p2m_ga_to_gfn(v, hostp2m, ncr3,
- gfn << PAGE_SHIFT, pfec, NULL);
+ gfn << PAGE_SHIFT, &pfec_21, NULL);
}
return hostmode->gva_to_gfn(v, hostp2m, va, pfec);