lkml.org 
[lkml]   [2021]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: const-ify all relevant uses of struct kvm_memory_slot

Hey Peter,

On Fri, Jul 30 2021 at 04:19:21 PM -0400, Peter Xu <peterx@redhat.com>
wrote:
> This patch breaks kvm/queue with above issue. Constify of
> kvm_memory_slot
> pointer should have nothing to do with this so at least it should
> need a
> separate patch. At the meantime I also don't understand why memcpy()
> here,
> which seems to be even slower..

To const-ify the slot member of struct slot_rmap_walk_iterator, we need
to
initialize a new struct and then copy it over (otherwise we would need
to relay
on casting again or the compiler will complain about it).


\
 
 \ /
  Last update: 2021-07-30 22:48    [W:0.111 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site