From: Avi Kivity <avi@redhat.com>
To: kvm-ia64@vger.kernel.org
Subject: Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP
Date: Thu, 16 Dec 2010 09:11:59 +0000 [thread overview]
Message-ID: <4D09D7DF.3010209@redhat.com> (raw)
In-Reply-To: <20101216014326.9210211a.takuya.yoshikawa@gmail.com>
On 12/15/2010 06:43 PM, Takuya Yoshikawa wrote:
> From: Takuya Yoshikawa<yoshikawa.takuya@oss.ntt.co.jp>
>
> Move slots_lock aquisition from kvm_ioapic_init() and kvm_create_pic()
> to their caller.
>
> As a result, x86's KVM_CREATE_IRQCHIP is now covered by a unified slots_lock
> section, including kvm_setup_default_irq_routing().
>
>
I'm not sure about this...
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3300,6 +3300,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
> struct kvm_pic *vpic;
>
> mutex_lock(&kvm->lock);
> + mutex_lock(&kvm->slots_lock);
here, the reader might wonder why we take slots_lock, since we aren't
manipulating anything covered by the lock directly.
> r = -EEXIST;
> if (kvm->arch.vpic)
> goto create_irqchip_unlock;
> @@ -3308,10 +3309,8 @@ long kvm_arch_vm_ioctl(struct file *filp,
> if (vpic) {
> r = kvm_ioapic_init(kvm);
> if (r) {
> - mutex_lock(&kvm->slots_lock);
and here, the reader might wonder why we don't take slots_lock, which
protects io_bus.
Maybe we ought to move slots_lock acquisition to kvm_io_bus_register()
and friends.
--
error compiling committee.c: too many arguments to function
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org,
yoshikawa.takuya@oss.ntt.co.jp, kvm-ia64@vger.kernel.org
Subject: Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP
Date: Thu, 16 Dec 2010 11:11:59 +0200 [thread overview]
Message-ID: <4D09D7DF.3010209@redhat.com> (raw)
In-Reply-To: <20101216014326.9210211a.takuya.yoshikawa@gmail.com>
On 12/15/2010 06:43 PM, Takuya Yoshikawa wrote:
> From: Takuya Yoshikawa<yoshikawa.takuya@oss.ntt.co.jp>
>
> Move slots_lock aquisition from kvm_ioapic_init() and kvm_create_pic()
> to their caller.
>
> As a result, x86's KVM_CREATE_IRQCHIP is now covered by a unified slots_lock
> section, including kvm_setup_default_irq_routing().
>
>
I'm not sure about this...
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3300,6 +3300,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
> struct kvm_pic *vpic;
>
> mutex_lock(&kvm->lock);
> + mutex_lock(&kvm->slots_lock);
here, the reader might wonder why we take slots_lock, since we aren't
manipulating anything covered by the lock directly.
> r = -EEXIST;
> if (kvm->arch.vpic)
> goto create_irqchip_unlock;
> @@ -3308,10 +3309,8 @@ long kvm_arch_vm_ioctl(struct file *filp,
> if (vpic) {
> r = kvm_ioapic_init(kvm);
> if (r) {
> - mutex_lock(&kvm->slots_lock);
and here, the reader might wonder why we don't take slots_lock, which
protects io_bus.
Maybe we ought to move slots_lock acquisition to kvm_io_bus_register()
and friends.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-12-16 9:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 16:43 [PATCH 2/3] KVM: Centralize slots_lock aquisition during Takuya Yoshikawa
2010-12-15 16:43 ` [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP Takuya Yoshikawa
2010-12-16 9:11 ` Avi Kivity [this message]
2010-12-16 9:11 ` Avi Kivity
2010-12-16 9:29 ` Takuya Yoshikawa
2010-12-16 9:29 ` Takuya Yoshikawa
2010-12-16 9:34 ` Avi Kivity
2010-12-16 9:34 ` Avi Kivity
2010-12-16 9:47 ` Takuya Yoshikawa
2010-12-16 9:47 ` Takuya Yoshikawa
2010-12-16 9:55 ` Avi Kivity
2010-12-16 9:55 ` Avi Kivity
2010-12-16 12:51 ` [PATCH 2/3] KVM: Centralize slots_lock aquisition during Takuya Yoshikawa
2010-12-16 12:51 ` [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP Takuya Yoshikawa
-- strict thread matches above, loose matches on Subject: below --
2010-12-15 16:45 [PATCH 3/3] KVM: Centralize irq_lock aquisition during Takuya Yoshikawa
2010-12-15 16:45 ` [PATCH 3/3] KVM: Centralize irq_lock aquisition during KVM_CREATE_IRQCHIP Takuya Yoshikawa
2010-12-15 16:41 [PATCH 1/3] KVM: Take missing slots_lock for Takuya Yoshikawa
2010-12-15 16:41 ` [PATCH 1/3] KVM: Take missing slots_lock for kvm_io_bus_unregister_dev() Takuya Yoshikawa
2010-12-16 9:12 ` Avi Kivity
2010-12-16 9:12 ` Avi Kivity
2010-12-15 16:39 [PATCH-v2 0/3] KVM: Take missing slots_lock for Takuya Yoshikawa
2010-12-15 16:39 ` [PATCH-v2 0/3] KVM: Take missing slots_lock for kvm_io_bus_unregister_dev() Takuya Yoshikawa
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=4D09D7DF.3010209@redhat.com \
--to=avi@redhat.com \
--cc=kvm-ia64@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.