linux/arch/arm64/kvm
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
..
hyp KVM: arm64: Move pkvm's special 32bit handling into a generic infrastructure 2021-11-24 13:30:50 +00:00
vgic KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
arch_timer.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
arm.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
debug.c KVM: arm64: MDCR_EL2 is a 64-bit register 2021-08-20 11:12:17 +01:00
fpsimd.c KVM: arm64: Save/restore SVE state for nVHE 2021-03-18 14:23:12 +00:00
guest.c KVM: arm64: Change the return type of kvm_vcpu_preferred_target() 2021-11-08 10:48:47 +00:00
handle_exit.c Merge branch kvm-arm64/misc-5.15 into kvmarm-master/next 2021-08-26 11:36:12 +01:00
hypercalls.c KVM: arm64: Add support for the KVM PTP service 2021-04-07 16:33:20 +01:00
inject_fault.c KVM: arm64: Move AArch32 exceptions over to AArch64 sysregs 2020-11-10 11:22:51 +00:00
irq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
Kconfig KVM: arm64: Depend on HAVE_KVM instead of OF 2021-10-11 10:08:50 +01:00
Makefile KVM: stats: Add fd-based API to read binary stats data 2021-06-24 11:47:57 -04:00
mmio.c KVM: arm64: Make kvm_skip_instr() and co private to HYP 2020-11-10 08:34:24 +00:00
mmu.c KVM: Let/force architectures to deal with arch specific memslot data 2021-12-08 04:24:20 -05:00
perf.c KVM: arm64: Fix PMU probe ordering 2021-09-20 12:43:34 +01:00
pmu-emul.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
pmu.c KVM: arm64: Disable PMU support in protected mode 2021-03-19 12:02:19 +00:00
psci.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
pvtime.c KVM: arm64: Use kvm_write_guest_lock when init stolen time 2020-12-03 19:02:18 +00:00
reset.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
sys_regs.c Merge branch kvm-arm64/pkvm/fixed-features into kvmarm-master/next 2021-10-18 17:20:50 +01:00
sys_regs.h KVM: arm64: Refactor sys_regs.h,c for nVHE reuse 2021-08-20 11:12:17 +01:00
trace_arm.h KVM: Move arm64's MMU notifier trace events to generic code 2021-04-17 08:30:56 -04:00
trace_handle_exit.h KVM: arm64: Upgrade trace_kvm_arm_set_dreg32() to 64bit 2021-08-20 11:12:18 +01:00
trace.h KVM: arm64: Move virt/kvm/arm to arch/arm64 2020-05-16 15:03:59 +01:00
trng.c KVM: arm64: Implement the TRNG hypervisor call 2021-01-25 22:19:31 +00:00
va_layout.c KVM: arm64: Generate final CTR_EL0 value when running in Protected mode 2021-03-25 11:00:33 +00:00
vgic-sys-reg-v3.c KVM: arm64: Drop is_aarch32 trap attribute 2020-11-10 11:22:52 +00:00