All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@kernel.org" <stable@kernel.org>
Subject: Re: [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode
Date: Fri, 14 Jan 2011 14:36:02 +0100	[thread overview]
Message-ID: <20110114133602.GC23914@amd.com> (raw)
In-Reply-To: <4D2F5204.7020100@redhat.com>

On Thu, Jan 13, 2011 at 02:27:00PM -0500, Avi Kivity wrote:
> On 01/13/2011 05:51 PM, Roedel, Joerg wrote:
> > I also had a look at entry_64.S. The save_paranoid could not be the
> > cause because MSR_GS_BASE is already negative at this point. But the
> > re-schedule condition check at the end of the NMI handler code could
> > also not be the cause because the NMI happens while preemption (and
> > interrupts) are disabled (a re-schedule should also trigger
> > preempt-notifiers and restore KERNEL_GS_BASE).
> >
> 
> I have it:

Cool, good catch. Thanks :)

The only use of load_gs_index in svm is the vcpu_put function. It is
sufficient to just swap the KERNEL_GS_BASE wrmsr and the load_gs_index
function calls in there to be safe.

	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


  reply	other threads:[~2011-01-14 13:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 15:22 [PATCH 0/2] perf-kvm support for SVM Joerg Roedel
2011-01-13 15:22 ` [PATCH 1/2] KVM: SVM: Fix NMI path when NMI happens in guest mode Joerg Roedel
2011-01-13 15:42   ` Avi Kivity
2011-01-13 15:51     ` Roedel, Joerg
2011-01-13 19:27       ` Avi Kivity
2011-01-14 13:36         ` Roedel, Joerg [this message]
2011-01-13 15:48   ` Jan Kiszka
2011-01-13 15:52     ` Roedel, Joerg
2011-01-13 15:22 ` [PATCH 2/2] KVM: SVM: Add support for perf-kvm Joerg Roedel

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=20110114133602.GC23914@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=stable@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.