Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-05 Thread Sean Christopherson
On Mon, Feb 05, 2024, Peter Xu wrote: > Shaoqin, Sean, > > Apologies for a late comment. I'm trying to remember what I wrote.. > > On Fri, Feb 02, 2024 at 01:43:32AM -0500, Shaoqin Huang wrote: > > Why sem_vcpu_cont and sem_vcpu_stop can be non-zero value? It's because > > the

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-05 Thread Peter Xu
On Mon, Feb 05, 2024 at 06:05:02PM +0800, Peter Xu wrote: > Shaoqin, Sean, > > Apologies for a late comment. I'm trying to remember what I wrote.. > > On Fri, Feb 02, 2024 at 01:43:32AM -0500, Shaoqin Huang wrote: > > Why sem_vcpu_cont and sem_vcpu_stop can be non-zero value? It's because > >

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-05 Thread Peter Xu
Shaoqin, Sean, Apologies for a late comment. I'm trying to remember what I wrote.. On Fri, Feb 02, 2024 at 01:43:32AM -0500, Shaoqin Huang wrote: > Why sem_vcpu_cont and sem_vcpu_stop can be non-zero value? It's because > the dirty_ring_before_vcpu_join() execute the sem_post(_vcpu_cont) > at

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-02 Thread Sean Christopherson
On Fri, Feb 02, 2024, Sean Christopherson wrote: > On Fri, Feb 02, 2024, Shaoqin Huang wrote: > > --- > > v2->v3: > > - Rebase to v6.8-rc2. > > - Use TEST_ASSERT(). > > Patch says otherwise. > > > @@ -726,6 +728,11 @@ static void run_test(enum vm_guest_mode mode, void > > *arg) > >

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-02 Thread Sean Christopherson
On Fri, Feb 02, 2024, Shaoqin Huang wrote: > --- > v2->v3: > - Rebase to v6.8-rc2. > - Use TEST_ASSERT(). Patch says otherwise. > @@ -726,6 +728,11 @@ static void run_test(enum vm_guest_mode mode, void *arg) > return; > } > > + sem_getvalue(_vcpu_stop, _val); > +

[PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-01 Thread Shaoqin Huang
When execute the dirty_log_test on some aarch64 machine, it sometimes trigger the ASSERT: Test Assertion Failure dirty_log_test.c:384: dirty_ring_vcpu_ring_full pid=14854 tid=14854 errno=22 - Invalid argument 1 0x004033eb: dirty_ring_collect_dirty_pages at