All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
To: Zachary Amsden <zamsden@redhat.com>
Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org,
	takuya.yoshikawa@gmail.com
Subject: Re: [PATCH 1/2] KVM: take kvm_lock for hardware_disable() during cpu hotplug
Date: Thu, 18 Nov 2010 11:04:22 +0900	[thread overview]
Message-ID: <4CE489A6.4010100@oss.ntt.co.jp> (raw)
In-Reply-To: <4CE4889A.7010808@redhat.com>

(2010/11/18 10:59), Zachary Amsden wrote:
> On 11/15/2010 10:35 PM, Takuya Yoshikawa wrote:
>> In kvm_cpu_hotplug(), only CPU_STARTING case is protected by kvm_lock.
>> This patch adds missing protection for CPU_DYING case.
>>
>> Signed-off-by: Takuya Yoshikawa<yoshikawa.takuya@oss.ntt.co.jp>
>> ---
>> virt/kvm/kvm_main.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
>> index 339dd43..0fdd911 100644
>> --- a/virt/kvm/kvm_main.c
>> +++ b/virt/kvm/kvm_main.c
>> @@ -2148,7 +2148,9 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
>> case CPU_DYING:
>> printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",
>> cpu);
>> + spin_lock(&kvm_lock);
>> hardware_disable(NULL);
>> + spin_unlock(&kvm_lock);
>> break;
>> case CPU_STARTING:
>> printk(KERN_INFO "kvm: enabling virtualization on CPU%d\n",
>
> I believe this is correct.

You mean lock is not necessary?

  reply	other threads:[~2010-11-18  2:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16  8:32 [PATCH 0/2] KVM: fix and cleanup: kvm_lock and hardware_disable Takuya Yoshikawa
2010-11-16  8:35 ` [PATCH 1/2] KVM: take kvm_lock for hardware_disable() during cpu hotplug Takuya Yoshikawa
2010-11-18  1:59   ` Zachary Amsden
2010-11-18  2:04     ` Takuya Yoshikawa [this message]
2010-11-18  2:33       ` Zachary Amsden
2010-11-18  2:41         ` Takuya Yoshikawa
2010-11-18  5:45           ` Zachary Amsden
2010-11-18  8:33             ` Takuya Yoshikawa
2010-11-16  8:37 ` [PATCH 2/2] KVM: rename hardware_[dis|en]able() to *_nolock() and add locking wrappers Takuya Yoshikawa
2010-11-18 15:26 ` [PATCH 0/2] KVM: fix and cleanup: kvm_lock and hardware_disable 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=4CE489A6.4010100@oss.ntt.co.jp \
    --to=yoshikawa.takuya@oss.ntt.co.jp \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=takuya.yoshikawa@gmail.com \
    --cc=zamsden@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 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.