kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>,
	penberg@kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
	kvm@vger.kernel.org
Subject: Re: [PATCH] kvm tools: Add 'kvm nmi' command
Date: Wed, 7 Dec 2011 12:41:50 +0200	[thread overview]
Message-ID: <20111207104150.GQ12507@redhat.com> (raw)
In-Reply-To: <20111207103725.GD21678@moon>

On Wed, Dec 07, 2011 at 02:37:25PM +0400, Cyrill Gorcunov wrote:
> On Wed, Dec 07, 2011 at 12:33:05PM +0200, Gleb Natapov wrote:
> > On Wed, Dec 07, 2011 at 02:31:11PM +0400, Cyrill Gorcunov wrote:
> > > On Wed, Dec 07, 2011 at 12:21:52PM +0200, Gleb Natapov wrote:
> > > > On Tue, Dec 06, 2011 at 10:42:55PM +0200, Sasha Levin wrote:
> > > > > +static void handle_nmi(int fd, u32 type, u32 len, u8 *msg)
> > > > > +{
> > > > > +	u32 vcpu = *(u32 *)msg;
> > > > > +
> > > > > +	ioctl(kvm_cpus[vcpu]->vcpu_fd, KVM_NMI);
> > > >
> > > > You need to check that vcpu apic's LINT1 is configured to receive
> > > > NMI (and not masked obviously) before injecting NMI. 
> > > > 
> > > 
> > > I've been configuring mptable to have lint1 as nmi receiver,
> > > so it should remain so I suppose (if only we've not masked it
> > > somewhere else ;)
> > > 
> >
> > That's up to the guest. mptable is just a hint to an OS on how things is
> > wired in HW.
> > 
> 
> Yup, but while we support linux kernels only it should be fine. Still
> of course on long term we need a check.
> 
Tomorrow someone will send a patch to change how Linux behaves and
slightly older kvmtool will not be able to run newer kernels :) No need
to wait for long term, a couple of lines of code will fix the issue in the
patch. Look here for reference:

http://article.gmane.org/gmane.comp.emulators.kvm.devel/80339

--
			Gleb.

  reply	other threads:[~2011-12-07 10:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 20:42 [PATCH] kvm tools: Add 'kvm nmi' command Sasha Levin
2011-12-07  8:16 ` Ingo Molnar
2011-12-07 17:13   ` Pekka Enberg
2011-12-07 17:31     ` Sasha Levin
2011-12-07 10:21 ` Gleb Natapov
2011-12-07 10:31   ` Cyrill Gorcunov
2011-12-07 10:33     ` Gleb Natapov
2011-12-07 10:37       ` Cyrill Gorcunov
2011-12-07 10:41         ` Gleb Natapov [this message]
2011-12-07 10:49           ` Cyrill Gorcunov

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=20111207104150.GQ12507@redhat.com \
    --to=gleb@redhat.com \
    --cc=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).