]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: const-ify uses of struct kvm_userspace_memory_region
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 May 2015 11:59:39 +0000 (13:59 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 May 2015 10:40:13 +0000 (12:40 +0200)
commit09170a49422bd786be3eac5cec1955257c5a34b7
treeab427ac2ef8739a7faf1d34eab7a94f18df37dd5
parent9f6b8029787bb37170d4535e9fc09158f634282c
KVM: const-ify uses of struct kvm_userspace_memory_region

Architecture-specific helpers are not supposed to muck with
struct kvm_userspace_memory_region contents.  Add const to
enforce this.

In order to eliminate the only write in __kvm_set_memory_region,
the cleaning of deleted slots is pulled up from update_memslots
to __kvm_set_memory_region.

Reviewed-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Reviewed-by: Radim Krcmar <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
12 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/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c