kvm: mmu: Separate generating and setting mmio ptes
authorBen Gardon <bgardon@google.com>
Mon, 3 Feb 2020 23:09:10 +0000 (15:09 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 5 Feb 2020 14:54:07 +0000 (15:54 +0100)
commit8f79b064959b1c858cddad1cecbf0511adca8209
tree717a54a97065d8d32a5335525a0e51f9a6c50e9a
parent0a2b64c50db00196c85ec9e8e4c3d7506cd09db9
kvm: mmu: Separate generating and setting mmio ptes

Separate the functions for generating MMIO page table entries from the
function that inserts them into the paging structure. This refactoring
will facilitate changes to the MMU sychronization model to use atomic
compare / exchanges (which are not guaranteed to succeed) instead of a
monolithic MMU lock.

No functional change expected.

Tested by running kvm-unit-tests on an Intel Haswell machine. This
commit introduced no new failures.

Signed-off-by: Ben Gardon <bgardon@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c