mbox series

[0/3] KVM: Scalable memslots implementation additional patches

Message ID cover.1637884349.git.maciej.szmigiero@oracle.com (mailing list archive)
Headers show
Series KVM: Scalable memslots implementation additional patches | expand

Message

Maciej S. Szmigiero Nov. 26, 2021, 12:31 a.m. UTC
From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>

While the last "5.5" version of KVM scalable memslots implementation was
merged to kvm/queue some changes from its review round are still pending.

This series contains these changes which still apply to the final form of
the code.

The changes include switching kvm_for_each_memslot_in_gfn_range() to use
iterators.
However, I've dropped kvm_for_each_memslot_in_hva_range() rework to
use dedicated iterators since the existing implementation was already
returning only strictly overlapping memslots and it was already using
interval tree iterators.
The code there is also self-contained and very simple.

The code was tested on x86 with KASAN on and booted various guests
successfully (including nested ones; with TDP MMU both enabled and disabled).

There were some VMX APICv warnings during these tests but these look
related to the latest VMX PI changes rather than memslots handling code.

 arch/x86/include/asm/kvm_host.h |   2 +-
 arch/x86/kvm/mmu/mmu.c          |  11 ++--
 arch/x86/kvm/x86.c              |   3 +-
 include/linux/kvm_host.h        | 104 ++++++++++++++++++++------------
 virt/kvm/kvm_main.c             |  25 +++-----
 5 files changed, 83 insertions(+), 62 deletions(-)

Comments

Paolo Bonzini Nov. 26, 2021, 10:35 a.m. UTC | #1
On 11/26/21 01:31, Maciej S. Szmigiero wrote:
> From: "Maciej S. Szmigiero"<maciej.szmigiero@oracle.com>
> 
> While the last "5.5" version of KVM scalable memslots implementation was
> merged to kvm/queue some changes from its review round are still pending.

You can go ahead and post v6, I'll replace.  However, note that I would 
prefer the current form instead of patch 2's atomic_long_cmpxchg.

Paolo
Maciej S. Szmigiero Nov. 26, 2021, 1:18 p.m. UTC | #2
On 26.11.2021 11:35, Paolo Bonzini wrote:
> On 11/26/21 01:31, Maciej S. Szmigiero wrote:
>> From: "Maciej S. Szmigiero"<maciej.szmigiero@oracle.com>
>>
>> While the last "5.5" version of KVM scalable memslots implementation was
>> merged to kvm/queue some changes from its review round are still pending.
> 
> You can go ahead and post v6, I'll replace.

Which tree should I target then?
kvm/queue already has these commits so git refuses to rebase on top of it.

By the way, v6 will have more changes than this series since there will be
patches for intermediate forms of code, too.

> However, note that I would prefer the current form instead of patch 2's atomic_long_cmpxchg.

Understood.

> Paolo

Thanks,
Maciej
Paolo Bonzini Nov. 26, 2021, 1:19 p.m. UTC | #3
On 11/26/21 14:18, Maciej S. Szmigiero wrote:
>>
>> You can go ahead and post v6, I'll replace.
> 
> Which tree should I target then?
> kvm/queue already has these commits so git refuses to rebase on top of it.
> 
> By the way, v6 will have more changes than this series since there will be
> patches for intermediate forms of code, too.

I'll undo them from kvm/queue shortly, since I've now updated all my 
development machines to 5.16-rc2.

Paolo