KVM: add "new" argument to kvm_arch_commit_memory_region
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 May 2015 11:20:23 +0000 (13:20 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 May 2015 08:42:58 +0000 (10:42 +0200)
commitf36f3f2846b5578d62910ee0b6dbef59fdd1cfa4
treecb8e161adbf3d4f32e871e73d445d8e23856cc4b
parent15f46015ee17681b542432df21747f5c51857156
KVM: add "new" argument to kvm_arch_commit_memory_region

This lets the function access the new memory slot without going through
kvm_memslots and id_to_memslot.  It will simplify the code when more
than one address space will be supported.

Unfortunately, the "const"ness of the new argument must be casted
away in two places.  Fixing KVM to accept const struct kvm_memory_slot
pointers would require modifications in pretty much all architectures,
and is left for later.

Reviewed-by: Radim Krcmar <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 files changed:
arch/arm/kvm/mmu.c
arch/mips/kvm/mips.c
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/powerpc.c
arch/s390/kvm/kvm-s390.c
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c