All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carsten Otte <cotte@de.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tossati <mtosatti@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH 3/6] kvm-s390: make sigp restart return busy when stop pending
Date: Mon, 06 Feb 2012 12:53:42 +0100	[thread overview]
Message-ID: <4F2FBF46.2090604@de.ibm.com> (raw)
In-Reply-To: <1328522347-54635-4-git-send-email-borntraeger@de.ibm.com>

Am 06.02.2012 10:59, schrieb Christian Borntraeger:
> +static int __sigp_restart(struct kvm_vcpu *vcpu, u16 cpu_addr)
> +{
> +	int rc = 0;
> +	struct kvm_s390_float_interrupt *fi =&vcpu->kvm->arch.float_int;
> +
> +	spin_lock(&fi->lock);
> +	if (fi->local_int[cpu_addr]->action_bits&  ACTION_STOP_ON_STOP)
> +		rc = 2; /* busy */
> +	else
> +		VCPU_EVENT(vcpu, 4, "sigp restart %x to handle userspace",
> +			cpu_addr);
> +	spin_unlock(&fi->lock);
> +
> +	return rc;
> +}
>
local_int->action_bits is protected by the local int lock of subject CPU,
as one can see in patch #2 of this series. This is racy.


  reply	other threads:[~2012-02-06 11:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06  9:59 [PATCH 0/6] Fixes for kvm on s390 Christian Borntraeger
2012-02-06  9:59 ` [PATCH 1/6] kvm-s390: Sanitize fpc registers for KVM_SET_FPU Christian Borntraeger
2012-02-06  9:59 ` [PATCH 2/6] kvm-s390: do store status after handling STOP_ON_STOP bit Christian Borntraeger
2012-02-06  9:59 ` [PATCH 3/6] kvm-s390: make sigp restart return busy when stop pending Christian Borntraeger
2012-02-06 11:53   ` Carsten Otte [this message]
2012-02-06 13:08     ` Christian Borntraeger
2012-02-08  7:28   ` Fixed restart patch Christian Borntraeger
2012-02-08  7:28     ` [PATCH 3/6 v2] kvm-s390: make sigp restart return busy when stop pending Christian Borntraeger
2012-02-06  9:59 ` [PATCH 4/6] kvm-s390: ignore sigp stop overinitiative Christian Borntraeger
2012-02-06  9:59 ` [PATCH 5/6] kvm-s390: add stop_on_stop flag when doing stop and store Christian Borntraeger
2012-02-06  9:59 ` [PATCH 6/6] kvm-s390: provide control registers via kvm_run Christian Borntraeger
2012-02-08 17:44 ` [PATCH 0/6] Fixes for kvm on s390 Marcelo Tosatti

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=4F2FBF46.2090604@de.ibm.com \
    --to=cotte@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    /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.