public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>
Subject: Re: [PULL 4/4] KVM: s390: clear local interrupts at cpu initial reset
Date: Tue, 25 Mar 2014 15:18:12 +0100	[thread overview]
Message-ID: <53319024.1030306@de.ibm.com> (raw)
In-Reply-To: <53318B25.9070805@redhat.com>

On 25/03/14 14:56, Paolo Bonzini wrote:
> Il 25/03/2014 14:35, Christian Borntraeger ha scritto:
>> +    spin_lock_bh(&li->lock);
>> +    list_for_each_entry_safe(inti, n, &li->list, list) {
>> +        list_del(&inti->list);
>> +        kfree(inti);
>> +    }
>> +    atomic_set(&li->active, 0);
>> +    spin_unlock_bh(&li->lock);
>> +}
> 
> Out of curiosity, why the _bh?

Probably just copied from all other accesses. We normally protect against the hrtimer 
wakeup bottom half(see kvm_s390_tasklet). For normal guests/userspace this should not
happen, (after all we are resetting the CPU only on startup or during reset when the vCPUS
are nor running) but the KVM interface allows to trigger this while the CPU is waiting
for a timer.

In fact I think your question just made me realize that this code needs some more
fixes, e.g. resetting the timer on initial reset and getting the CPU out of wait.
Will investigate.

Christian

      reply	other threads:[~2014-03-25 14:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 13:35 [PULL 0/4] KVM: s390: last fixes for next merge window Christian Borntraeger
2014-03-25 13:35 ` [PULL 1/4] KVM: s390: randomize sca address Christian Borntraeger
2014-03-25 13:53   ` Paolo Bonzini
2014-03-25 14:04     ` Christian Borntraeger
2014-03-25 13:35 ` [PULL 2/4] KVM: s390: fix calculation of idle_mask array size Christian Borntraeger
2014-03-25 13:55   ` Paolo Bonzini
2014-03-25 13:35 ` [PULL 3/4] KVM: s390: Fix possible memory leak in SIGP functions Christian Borntraeger
2014-03-25 14:02   ` Paolo Bonzini
2014-03-25 14:39     ` Christian Borntraeger
2014-03-25 14:43       ` Paolo Bonzini
2014-03-25 13:35 ` [PULL 4/4] KVM: s390: clear local interrupts at cpu initial reset Christian Borntraeger
2014-03-25 13:56   ` Paolo Bonzini
2014-03-25 14:18     ` Christian Borntraeger [this message]

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=53319024.1030306@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox