lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] KVM: s390: clear kicked_mask if not idle after set
From
Date


Am 20.10.21 um 09:52 schrieb Halil Pasic:
> On Tue, 19 Oct 2021 23:35:25 +0200
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>
>>> @@ -426,6 +426,7 @@ static void __unset_cpu_idle(struct kvm_vcpu *vcpu)
>>> {
>>> kvm_s390_clear_cpuflags(vcpu, CPUSTAT_WAIT);
>>> clear_bit(vcpu->vcpu_idx, vcpu->kvm->arch.idle_mask);
>>> + clear_bit(vcpu->vcpu_idx, vcpu->kvm->arch.gisa_int.kicked_mask);
>
> BTW, do you know are bit-ops garanteed to be serialized as seen by
> another cpu even when acting on a different byte? I mean
> could the kick_single_vcpu() set the clear of the kicked_mask bit but
> not see the clear of the idle mask?

clear_bit explicitely says.
* This is a relaxed atomic operation (no implied memory barriers).

so if we really need the ordering, then we need to add a barrier.

>
> If that is not true we may need some barriers, or possibly merging the
> two bitmasks like idle bit, kick bit alterating to ensure there
> absolutely ain't no race.
>

\
 
 \ /
  Last update: 2021-10-26 10:53    [W:0.125 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site