Re: [PATCH 2/3] KVM: s390: Remove one byte cmpxchg() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 25 Nov 2024 14:37:55 +0100
Heiko Carstens <hca@xxxxxxxxxxxxx> wrote:

> On Mon, Nov 25, 2024 at 01:16:17PM +0100, Claudio Imbrenda wrote:
> > On Mon, 25 Nov 2024 12:50:38 +0100
> > Heiko Carstens <hca@xxxxxxxxxxxxx> wrote:  
> > > @@ -128,23 +126,16 @@ static void sca_clear_ext_call(struct kvm_vcpu *vcpu)
> > >  		struct esca_block *sca = vcpu->kvm->arch.sca;
> > >  		union esca_sigp_ctrl *sigp_ctrl =
> > >  			&(sca->cpu[vcpu->vcpu_id].sigp_ctrl);
> > > -		union esca_sigp_ctrl old;
> > >  
> > > -		old = READ_ONCE(*sigp_ctrl);
> > > -		expect = old.value;
> > > -		rc = cmpxchg(&sigp_ctrl->value, old.value, 0);
> > > +		WRITE_ONCE(sigp_ctrl->value, 9);  
> > 
> > that's supposed to be a 0, right?  
> 
> Duh... yes, of course. I added the "9" to better find the corresponding
> code in assembly, and obviously forgot to replace it with 0 again.
> Thanks for pointing this out!
> 
> Strange enough this still worked. Hmm.

with that fixed:

Acked-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux