All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, davej@redhat.com
Subject: Re: [PATCH 3.4-rc] KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context
Date: Wed, 18 Apr 2012 23:42:44 -0300	[thread overview]
Message-ID: <20120419024244.GD17648@amt.cnet> (raw)
In-Reply-To: <1334750584-10884-1-git-send-email-avi@redhat.com>

On Wed, Apr 18, 2012 at 03:03:04PM +0300, Avi Kivity wrote:
> kvm_set_shared_msr() may not be called in preemptible context,
> but vmx_set_msr() does so:
> 
>   BUG: using smp_processor_id() in preemptible [00000000] code: qemu-kvm/22713
>   caller is kvm_set_shared_msr+0x32/0xa0 [kvm]
>   Pid: 22713, comm: qemu-kvm Not tainted 3.4.0-rc3+ #39
>   Call Trace:
>    [<ffffffff8131fa82>] debug_smp_processor_id+0xe2/0x100
>    [<ffffffffa0328ae2>] kvm_set_shared_msr+0x32/0xa0 [kvm]
>    [<ffffffffa03a103b>] vmx_set_msr+0x28b/0x2d0 [kvm_intel]
>    ...
> 
> Making kvm_set_shared_msr() work in preemptible is cleaner, but
> it's used in the fast path.  Making two variants is overkill, so
> this patch just disables preemption around the call.
> 
> Reported-by: Dave Jones <davej@redhat.com>
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
>  arch/x86/kvm/vmx.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied, thanks.

      reply	other threads:[~2012-04-19  2:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18  2:58 kvm_set_shared_msr using smp_processor_id() in preemptible code Dave Jones
2012-04-18 12:03 ` [PATCH 3.4-rc] KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context Avi Kivity
2012-04-19  2:42   ` Marcelo Tosatti [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=20120419024244.GD17648@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=davej@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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.