Thread (66 messages) 66 messages, 5 authors, 2021-11-26

Re: [PATCH v5.5 05/30] KVM: Resync only arch fields when slots_arch_lock gets reacquired

From: Maciej S. Szmigiero <hidden>
Date: 2021-11-09 00:40:00
Also in: kvm, kvm-riscv, kvmarm, linux-mips, linux-riscv, lkml

On 04.11.2021 01:25, Sean Christopherson wrote:
From: Maciej S. Szmigiero <redacted>

There is no need to copy the whole memslot data after releasing
slots_arch_lock for a moment to install temporary memslots copy in
kvm_set_memslot() since this lock only protects the arch field of each
memslot.

Just resync this particular field after reacquiring slots_arch_lock.

Note, this also eliminates the need to manually clear the INVALID flag
when restoring memslots; the "setting" of the INVALID flag was an
unwanted side effect of copying the entire memslots.

Signed-off-by: Maciej S. Szmigiero <redacted>
[sean: tweak shortlog, note INVALID flag in changelog, revert comment]
This updated patch also open-codes kvm_copy_memslots(), which my
previous version didn't.
I think it's worth mentioning this in the change log, too.

Thanks,
Maciej

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help