Re: [PATCH v2 11/12] KVM: s390: add and wire function gib_alert_irq_handler()

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

 



On Mon, Nov 19, 2018 at 06:25:35PM +0100, Michael Mueller wrote:
> @@ -3521,6 +3523,10 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason)
>  	vcpu->run->s.regs.gprs[15] = vcpu->arch.sie_block->gg15;
> 
>  	atomic_dec(&vcpu->kvm->arch.vcpus_in_sie);
> +	if (vcpu->kvm->arch.gib_in_use &&
> +	    !in_alert_list(vcpu->kvm->arch.gisa) &&
> +	    !atomic_fetch_andnot(0, &vcpu->kvm->arch.vcpus_in_sie))
> +		vcpu->kvm->arch.gisa->iam = vcpu->kvm->arch.iam;

This looks a bit odd to me. Why not simply
!atomic_read(&vcpu->kvm->arch.vcpus_in_sie))
instead of the atomic_fetch_andnot() construct?

Did I miss something?




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux