linux-stable/arch/powerpc
Sean Christopherson 537a17b314 KVM: Let/force architectures to deal with arch specific memslot data
Pass the "old" slot to kvm_arch_prepare_memory_region() and force arch
code to handle propagating arch specific data from "new" to "old" when
necessary.  This is a baby step towards dynamically allocating "new" from
the get go, and is a (very) minor performance boost on x86 due to not
unnecessarily copying arch data.

For PPC HV, copy the rmap in the !CREATE and !DELETE paths, i.e. for MOVE
and FLAGS_ONLY.  This is functionally a nop as the previous behavior
would overwrite the pointer for CREATE, and eventually discard/ignore it
for DELETE.

For x86, copy the arch data only for FLAGS_ONLY changes.  Unlike PPC HV,
x86 needs to reallocate arch data in the MOVE case as the size of x86's
allocations depend on the alignment of the memslot's gfn.

Opportunistically tweak kvm_arch_prepare_memory_region()'s param order to
match the "commit" prototype.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
[mss: add missing RISCV kvm_arch_prepare_memory_region() change]
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <67dea5f11bbcfd71e3da5986f11e87f5dd4013f9.1638817639.git.maciej.szmigiero@oracle.com>
2021-12-08 04:24:20 -05:00
..
boot powerpc updates for 5.16 2021-11-05 08:15:46 -07:00
configs Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
crypto
include KVM: Let/force architectures to deal with arch specific memslot data 2021-12-08 04:24:20 -05:00
kernel powerpc fixes for 5.16 #2 2021-11-21 10:26:35 -08:00
kexec powerpc/machdep: Remove stale functions from ppc_md structure 2021-10-22 15:22:05 +11:00
kvm KVM: Let/force architectures to deal with arch specific memslot data 2021-12-08 04:24:20 -05:00
lib Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm powerpc/book3e: Fix TLBCAM preset at boot 2021-11-16 21:20:59 +11:00
net powerpc updates for 5.16 2021-11-05 08:15:46 -07:00
perf powerpc updates for 5.16 2021-11-05 08:15:46 -07:00
platforms powerpc/pseries/ddw: Do not try direct mapping with persistent memory and one window 2021-11-15 15:46:46 +11:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev powerpc/xive: Change IRQ domain to a tree domain 2021-11-17 21:55:42 +11:00
tools powerpc/head_check: Fix shellcheck errors 2021-08-17 22:52:02 +10:00
xmon powerpc/xmon: fix task state output 2021-10-28 22:32:03 +11:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc/64s: Default to 64K pages for 64 bit book3s 2021-10-27 22:31:22 +11:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
Makefile.postlink