From 097baed0b10099cd43477f81bf18cf4dd4a58ecf Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Thu, 2 Aug 2012 14:44:53 +0100 Subject: [PATCH] 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 Acked-by: Christoph Egger Committed-by: Tim Deegan --- xen/arch/x86/mm/p2m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.30.2