From: Gleb Natapov Date: Mon, 4 Nov 2013 08:20:57 +0000 (+0200) Subject: Merge branch 'kvm-ppc-queue' of git://github.com/agraf/linux-2.6 into queue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95f328d3ad1a8e4e3175a18546fb35c495e31130;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'kvm-ppc-queue' of git://github.com/agraf/linux-2.6 into queue Conflicts: arch/powerpc/include/asm/processor.h --- 95f328d3ad1a8e4e3175a18546fb35c495e31130 diff --cc arch/powerpc/include/asm/processor.h index ce4de5aed7b5,b43844442a6c..75a9e5a34ef9 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@@ -198,6 -184,27 +184,27 @@@ struct debug_reg unsigned long dvc2; #endif #endif + }; + + struct thread_struct { + unsigned long ksp; /* Kernel stack pointer */ - unsigned long ksp_limit; /* if ksp <= ksp_limit stack overflow */ + + #ifdef CONFIG_PPC64 + unsigned long ksp_vsid; + #endif + struct pt_regs *regs; /* Pointer to saved register state */ + mm_segment_t fs; /* for get_fs() validation */ + #ifdef CONFIG_BOOKE + /* BookE base exception scratch space; align on cacheline */ + unsigned long normsave[8] ____cacheline_aligned; + #endif + #ifdef CONFIG_PPC32 + void *pgdir; /* root of page-table tree */ ++ unsigned long ksp_limit; /* if ksp <= ksp_limit stack overflow */ + #endif + /* Debug Registers */ + struct debug_reg debug; + /* FP and VSX 0-31 register set */ double fpr[32][TS_FPRWIDTH] __attribute__((aligned(16))); struct { diff --cc virt/kvm/kvm_main.c index 82c4047aa0e3,0932c3b64155..7a317a7f9025 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@@ -883,23 -899,9 +884,23 @@@ int __kvm_set_memory_region(struct kvm kvm_arch_commit_memory_region(kvm, mem, &old, change); - kvm_free_physmem_slot(&old, &new); + kvm_free_physmem_slot(kvm, &old, &new); kfree(old_memslots); + /* + * IOMMU mapping: New slots need to be mapped. Old slots need to be + * un-mapped and re-mapped if their base changes. Since base change + * unmapping is handled above with slot deletion, mapping alone is + * needed here. Anything else the iommu might care about for existing + * slots (size changes, userspace addr changes and read-only flag + * changes) is disallowed above, so any other attribute changes getting + * here can be skipped. + */ + if ((change == KVM_MR_CREATE) || (change == KVM_MR_MOVE)) { + r = kvm_iommu_map_pages(kvm, &new); + return r; + } + return 0; out_slots: