[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.7] x86: use 64 bit mask when masking away mfn bits
commit ada9e109d7539ec93e1b554805721110d2807521 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Tue Apr 4 15:00:35 2017 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Apr 4 15:00:35 2017 +0200 x86: use 64 bit mask when masking away mfn bits When using _PAGE_PSE_PAT as base for a negated bit mask make sure it is propagated to 64 bits when applied to a 64 bit value. There seems to be only one place where this is a problem, so fix this by casting _PAGE_PSE_PAT to 64 bits there. Not doing so will probably lead to problems on hosts with more than 16 TB of memory. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx> master commit: 4edb1a42e3320757e3559f17edf6903bc1777de3 master date: 2017-03-30 15:11:24 +0200 --- xen/arch/x86/mm/p2m-pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c index 3d80612..ce4836a 100644 --- a/xen/arch/x86/mm/p2m-pt.c +++ b/xen/arch/x86/mm/p2m-pt.c @@ -452,7 +452,7 @@ static int do_recalc(struct p2m_domain *p2m, unsigned long gfn) mfn |= _PAGE_PSE_PAT >> PAGE_SHIFT; } else - mfn &= ~(_PAGE_PSE_PAT >> PAGE_SHIFT); + mfn &= ~((unsigned long)_PAGE_PSE_PAT >> PAGE_SHIFT); flags |= _PAGE_PSE; } e = l1e_from_pfn(mfn, flags); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.7 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |