diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-08 18:06:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 05:01:03 -0400 |
commit | ebd879e397f6361727c36267a12d1650710e465a (patch) | |
tree | e25ef12602eaa5d7ac07ec41e4c77d56f69c8170 | |
parent | 39dbc5bd345ebf93e066dde7f8e29467eb61b42e (diff) |
xen: fix truncation of machine address
arbitrary_virt_to_machine can truncate a machine address if its above
4G. Cast the problem away.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/xen/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 2579e70cdd08..05d7392a7a4c 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -186,7 +186,7 @@ xmaddr_t arbitrary_virt_to_machine(unsigned long address) | |||
186 | 186 | ||
187 | BUG_ON(pte == NULL); | 187 | BUG_ON(pte == NULL); |
188 | 188 | ||
189 | return XMADDR((pte_mfn(*pte) << PAGE_SHIFT) + offset); | 189 | return XMADDR(((phys_addr_t)pte_mfn(*pte) << PAGE_SHIFT) + offset); |
190 | } | 190 | } |
191 | 191 | ||
192 | void make_lowmem_page_readonly(void *vaddr) | 192 | void make_lowmem_page_readonly(void *vaddr) |