Re: [PATCH] KVM: const-ify all relevant uses of struct kvm_memory_slot

From: Hamza Mahfooz
Date: Sat Jul 31 2021 - 01:13:42 EST




On Fri, Jul 30 2021 at 04:19:21 PM -0400, Peter Xu <peterx@xxxxxxxxxx> wrote:
separate patch. At the meantime I also don't understand why memcpy() here,
which seems to be even slower..

Alright, I've now had a chance to compare the object code generated before
my patch is applied, with what is generated after it is applied and the
same object code is generated for arch/x86/kvm/mmu/mmu.c in both cases (at
least when compiling with clang, however I suspect other optimizing
compilers would behave similarly).