Re: [PATCH v2 1/4] KVM: Dynamic sized kvm memslots array

2024-09-06 Thread Peter Xu
On Fri, Sep 06, 2024 at 12:54:37PM +0200, Juraj Marcin wrote: > Hi Peter, > > On Thu, Sep 5, 2024 at 6:00 PM Peter Xu wrote: > > > > On Thu, Sep 05, 2024 at 05:32:46PM +0200, Juraj Marcin wrote: > > > Hi Peter, > > > > Hi, Juraj, > > > > [...] > > > > > > unsigned int kvm_get_max_memslots(void)

Re: [PATCH v2 1/4] KVM: Dynamic sized kvm memslots array

2024-09-06 Thread Juraj Marcin
Hi Peter, On Thu, Sep 5, 2024 at 6:00 PM Peter Xu wrote: > > On Thu, Sep 05, 2024 at 05:32:46PM +0200, Juraj Marcin wrote: > > Hi Peter, > > Hi, Juraj, > > [...] > > > > unsigned int kvm_get_max_memslots(void) > > > { > > > KVMState *s = KVM_STATE(current_accel()); > > > @@ -193,15 +247,20

Re: [PATCH v2 1/4] KVM: Dynamic sized kvm memslots array

2024-09-05 Thread Peter Xu
On Thu, Sep 05, 2024 at 05:32:46PM +0200, Juraj Marcin wrote: > Hi Peter, Hi, Juraj, [...] > > unsigned int kvm_get_max_memslots(void) > > { > > KVMState *s = KVM_STATE(current_accel()); > > @@ -193,15 +247,20 @@ unsigned int kvm_get_free_memslots(void) > > /* Called with KVMMemoryListen

Re: [PATCH v2 1/4] KVM: Dynamic sized kvm memslots array

2024-09-05 Thread Juraj Marcin
Hi Peter, On Thu, Sep 5, 2024 at 12:35 AM Peter Xu wrote: > > Zhiyi reported an infinite loop issue in VFIO use case. The cause of that > was a separate discussion, however during that I found a regression of > dirty sync slowness when profiling. > > Each KVMMemoryListerner maintains an array of

[PATCH v2 1/4] KVM: Dynamic sized kvm memslots array

2024-09-04 Thread Peter Xu
Zhiyi reported an infinite loop issue in VFIO use case. The cause of that was a separate discussion, however during that I found a regression of dirty sync slowness when profiling. Each KVMMemoryListerner maintains an array of kvm memslots. Currently it's statically allocated to be the max suppo