From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Paul Mackerras <paulus@samba.org>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page
Date: Tue, 19 Jun 2012 12:04:48 +0000 [thread overview]
Message-ID: <4FE06AE0.2000106@redhat.com> (raw)
In-Reply-To: <5D3A1EC1-6772-4363-B439-BD1A70548829@suse.de>
On 06/19/2012 01:50 PM, Alexander Graf wrote:
>
> On 06.06.2012, at 17:52, Alexander Graf wrote:
>
>> On 06/06/2012 02:28 PM, Avi Kivity wrote:
>>> On 06/01/2012 01:20 PM, Paul Mackerras wrote:
>>>> At the moment we call kvmppc_pin_guest_page() in kvmppc_update_vpa()
>>>> with two spinlocks held: the vcore lock and the vcpu->vpa_update_lock.
>>>> This is not good, since kvmppc_pin_guest_page() calls down_read() and
>>>> get_user_pages_fast(), both of which can sleep. This bug was introduced
>>>> in 2e25aa5f ("KVM: PPC: Book3S HV: Make virtual processor area
>>>> registration more robust").
>>>>
>>>> This arranges to drop those spinlocks before calling
>>>> kvmppc_pin_guest_page() and re-take them afterwards. Dropping the
>>>> vcore lock in kvmppc_run_core() means we have to set the vcore_state
>>>> field to VCORE_RUNNING before we drop the lock, so that other vcpus
>>>> won't try to run this vcore.
>>>>
>>>> Signed-off-by: Paul Mackerras<paulus@samba.org>
>>>> ---
>>>> Since this bug is in Linus' tree, and it can cause a scheduling while
>>>> atomic bug message, can we send this to Linus for inclusion in 3.5,
>>>> after review of course?
>>>>
>>> Sure, Alex?
>>
>> Yup, reviewed and tested. Looks ready to go into the tree to me. Can you pull it in the short way please?
>
> Avi?
Sorry! Applied to master, will push upstream shortly.
--
error compiling committee.c: too many arguments to function
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Paul Mackerras <paulus@samba.org>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page
Date: Tue, 19 Jun 2012 15:04:48 +0300 [thread overview]
Message-ID: <4FE06AE0.2000106@redhat.com> (raw)
In-Reply-To: <5D3A1EC1-6772-4363-B439-BD1A70548829@suse.de>
On 06/19/2012 01:50 PM, Alexander Graf wrote:
>
> On 06.06.2012, at 17:52, Alexander Graf wrote:
>
>> On 06/06/2012 02:28 PM, Avi Kivity wrote:
>>> On 06/01/2012 01:20 PM, Paul Mackerras wrote:
>>>> At the moment we call kvmppc_pin_guest_page() in kvmppc_update_vpa()
>>>> with two spinlocks held: the vcore lock and the vcpu->vpa_update_lock.
>>>> This is not good, since kvmppc_pin_guest_page() calls down_read() and
>>>> get_user_pages_fast(), both of which can sleep. This bug was introduced
>>>> in 2e25aa5f ("KVM: PPC: Book3S HV: Make virtual processor area
>>>> registration more robust").
>>>>
>>>> This arranges to drop those spinlocks before calling
>>>> kvmppc_pin_guest_page() and re-take them afterwards. Dropping the
>>>> vcore lock in kvmppc_run_core() means we have to set the vcore_state
>>>> field to VCORE_RUNNING before we drop the lock, so that other vcpus
>>>> won't try to run this vcore.
>>>>
>>>> Signed-off-by: Paul Mackerras<paulus@samba.org>
>>>> ---
>>>> Since this bug is in Linus' tree, and it can cause a scheduling while
>>>> atomic bug message, can we send this to Linus for inclusion in 3.5,
>>>> after review of course?
>>>>
>>> Sure, Alex?
>>
>> Yup, reviewed and tested. Looks ready to go into the tree to me. Can you pull it in the short way please?
>
> Avi?
Sorry! Applied to master, will push upstream shortly.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-06-19 12:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-01 10:20 [PATCH] KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page Paul Mackerras
2012-06-01 10:20 ` Paul Mackerras
2012-06-06 12:28 ` Avi Kivity
2012-06-06 12:28 ` Avi Kivity
2012-06-06 15:52 ` Alexander Graf
2012-06-06 15:52 ` Alexander Graf
2012-06-19 10:50 ` Alexander Graf
2012-06-19 10:50 ` Alexander Graf
2012-06-19 12:04 ` Avi Kivity [this message]
2012-06-19 12:04 ` Avi Kivity
2018-01-29 23:51 ` [PATCH] KVM: PPC: Book3S HV: Drop locks before reading guest memory Paul Mackerras
2018-01-29 23:51 ` Paul Mackerras
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=4FE06AE0.2000106@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@samba.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.