[PATCH] kvm: Fix gva_to_gpa()
authorAvi Kivity <avi@qumranet.com>
Mon, 12 Feb 2007 08:54:36 +0000 (00:54 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 12 Feb 2007 17:48:40 +0000 (09:48 -0800)
commite119d117a1d16e71876144188c0e0b3ecb8aeede
tree54c1ba0f055ea4c7aa306fb9f4563b1ad96f019d
parenta0610ddf6be6465049a5da448d7e6c5e821240e6
[PATCH] kvm: Fix gva_to_gpa()

gva_to_gpa() needs to be updated to the new walk_addr() calling convention,
otherwise it may oops under some circumstances.

Use the opportunity to remove all the code duplication in gva_to_gpa(), which
essentially repeats the calculations in walk_addr().

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/kvm/paging_tmpl.h