]> git.openpandora.org Git - pandora-kernel.git/commitdiff
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)
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

index e9ac084d21ea9d091236fa2272f3ac4cf2669166..7f473e6d3bf56f5293c84bf91b5c8a1cd219728d 100644 (file)
@@ -1721,6 +1721,7 @@ out:
 void kvm_arch_commit_memory_region(struct kvm *kvm,
                                   const struct kvm_userspace_memory_region *mem,
                                   const struct kvm_memory_slot *old,
+                                  const struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
 {
        /*
index 5963e2e8a6d7aa5e60addc7bb95d618a259cd0f1..cd4c129ce7434d60fc6af74bb6b764b536de4dda 100644 (file)
@@ -207,6 +207,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
 void kvm_arch_commit_memory_region(struct kvm *kvm,
                                   const struct kvm_userspace_memory_region *mem,
                                   const struct kvm_memory_slot *old,
+                                  const struct kvm_memory_slot *new,
                                   enum kvm_mr_change change)
 {
        unsigned long npages = 0;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge