]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Simplify walk_addr_generic() loop
authorAvi Kivity <avi@redhat.com>
Wed, 12 Sep 2012 12:12:09 +0000 (15:12 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 20 Sep 2012 10:00:08 +0000 (13:00 +0300)
commitb63b1fe452f7cf77457dd050b9c8addee3b7bf35
treee643caac077496bdaaeaf7c12101b43f62b34393
parente54cab17c3b9c27c038ca1fdfd4fffd98893eb3e
KVM: MMU: Simplify walk_addr_generic() loop

The page table walk is coded as an infinite loop, with a special
case on the last pte.

Code it as an ordinary loop with a termination condition on the last
pte (large page or walk length exhausted), and put the last pte handling
code after the loop where it belongs.

Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/paging_tmpl.h