KVM: MMU: properly check last spte in fast_page_fault()
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Thu, 17 Apr 2014 09:06:13 +0000 (17:06 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Wed, 23 Apr 2014 20:49:49 +0000 (17:49 -0300)
commit92a476cbfc476c63ee982dd33d15a8c88b4d51b9
tree799bba57656b27699674a51381d489ffa62dcb2b
parenta086f6a1ebc9d8d2d028b99e779ce0dbd9691dea
KVM: MMU: properly check last spte in fast_page_fault()

Using sp->role.level instead of @level since @level is not got from the
page table hierarchy

There is no issue in current code since the fast page fault currently only
fixes the fault caused by dirty-log that is always on the last level
(level = 1)

This patch makes the code more readable and avoids potential issue in the
further development

Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/mmu.c