All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>
Cc: KVM <kvm@vger.kernel.org>, linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH 4/5] KVM: s390: drop use of spin lock in __floating_irq_kick
Date: Mon, 8 Jan 2018 13:10:38 +0100	[thread overview]
Message-ID: <078285ca-7777-1870-dcd6-ecd683ec6c0e@redhat.com> (raw)
In-Reply-To: <20171220155300.102321-5-borntraeger@de.ibm.com>

On 20.12.2017 16:52, Christian Borntraeger wrote:
> From: Michael Mueller <mimu@linux.vnet.ibm.com>
> 
> It is not required to take to a lock to protect access to the cpuflags
> of the local interrupt structure of a vcpu as the performed operation
> is an atomic_or.
> 
> Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com>
> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kvm/interrupt.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index 024ad8bcc516..818aa4248b0f 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -1569,7 +1569,6 @@ static void __floating_irq_kick(struct kvm *kvm, u64 type)
>  
>  	/* make the VCPU drop out of the SIE, or wake it up if sleeping */
>  	li = &dst_vcpu->arch.local_int;
> -	spin_lock(&li->lock);
>  	switch (type) {
>  	case KVM_S390_MCHK:
>  		atomic_or(CPUSTAT_STOP_INT, li->cpuflags);
> @@ -1581,7 +1580,6 @@ static void __floating_irq_kick(struct kvm *kvm, u64 type)
>  		atomic_or(CPUSTAT_EXT_INT, li->cpuflags);
>  		break;
>  	}
> -	spin_unlock(&li->lock);
>  	kvm_s390_vcpu_wakeup(dst_vcpu);
>  }
>  
> 

I remember that being somehow used to avoid the target VCPU just
clearing the indicators via __reset_intercept_indicators().

But as far as I can see, this has no effect and
set_intercept_indicators() will take care of it. In the worst case, we
have too many flags set, simply resulting in a VCPU exit and the
superfluous flags getting cleared.

So this looks sane to me.

-- 

Thanks,

David / dhildenb

  parent reply	other threads:[~2018-01-08 12:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 15:52 [PATCH 0/5] preview of first chunk of s390 patches for kvm/next Christian Borntraeger
2017-12-20 15:52 ` [PATCH 1/5] s390x/mm: cleanup gmap_pte_op_walk() Christian Borntraeger
2017-12-20 16:33   ` Cornelia Huck
2017-12-20 15:52 ` [PATCH 2/5] KVM: s390: use created_vcpus in more places Christian Borntraeger
2017-12-20 16:35   ` Cornelia Huck
2018-01-08 11:08   ` David Hildenbrand
2017-12-20 15:52 ` [PATCH 3/5] KVM: s390: add debug tracing for cpu features of CPU model Christian Borntraeger
2017-12-20 16:37   ` Cornelia Huck
2018-01-08 11:14   ` David Hildenbrand
2017-12-20 15:52 ` [PATCH 4/5] KVM: s390: drop use of spin lock in __floating_irq_kick Christian Borntraeger
2017-12-20 16:40   ` Cornelia Huck
2018-01-08 12:10   ` David Hildenbrand [this message]
2017-12-20 15:53 ` [PATCH 5/5] kvm_config: add CONFIG_S390_GUEST Christian Borntraeger
2017-12-20 16:44   ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=078285ca-7777-1870-dcd6-ecd683ec6c0e@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.