KVM: x86: MMU: Make mmu_set_spte() return emulate value
authorTakuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Fri, 20 Nov 2015 08:44:05 +0000 (17:44 +0900)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 Nov 2015 16:26:28 +0000 (17:26 +0100)
commit029499b477389f7d6486c8c759a8498bcfecf322
tree7ed75ebd187f8a935629fdb70f54d89926512349
parentfd9514572f721acbabb0ff24f6b5294a2449d492
KVM: x86: MMU: Make mmu_set_spte() return emulate value

mmu_set_spte()'s code is based on the assumption that the emulate
parameter has a valid pointer value if set_spte() returns true and
write_fault is not zero.  In other cases, emulate may be NULL, so a
NULL-check is needed.

Stop passing emulate pointer and make mmu_set_spte() return the emulate
value instead to clean up this complex interface.  Prefetch functions
can just throw away the return value.

Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h