KVM: RISC-V: Use "new" memslot instead of userspace memory region
authorSean Christopherson <seanjc@google.com>
Mon, 6 Dec 2021 19:54:17 +0000 (20:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:24 +0000 (04:24 -0500)
commitd01495d4cffb327200d4522db6eb3fabfdc9e2f5
tree30aef746ab6a24c39b7c57772538f4e0ed3846c4
parent9d7d18ee3f48903f7b9bbf6305d690078c67271b
KVM: RISC-V: Use "new" memslot instead of userspace memory region

Get the slot ID, hva, etc... from the "new" memslot instead of the
userspace memory region when preparing/committing a memory region.  This
will allow a future commit to drop @mem from the prepare/commit hooks
once all architectures convert to using "new".

Opportunistically wait to get the various "new" values until after
filtering out the DELETE case in anticipation of a future commit passing
NULL for @new when deleting a memslot.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <543608ab88a1190e73a958efffafc98d2652c067.1638817640.git.maciej.szmigiero@oracle.com>
arch/riscv/kvm/mmu.c