From: Gleb Natapov <gleb@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kvm: dont clear TMR on EOI
Date: Thu, 12 Apr 2012 14:49:55 +0300 [thread overview]
Message-ID: <20120412114955.GI20431@redhat.com> (raw)
In-Reply-To: <20120412020318.GA3037@amt.cnet>
On Wed, Apr 11, 2012 at 11:03:18PM -0300, Marcelo Tosatti wrote:
> On Wed, Apr 11, 2012 at 06:49:55PM +0300, Michael S. Tsirkin wrote:
> > Intel spec says that TMR needs to be set/cleared
> > when IRR is set, but kvm also clears it on EOI.
> >
> > I did some tests on a real (AMD based) system,
> > and I see same TMR values both before
> > and after EOI, so I think it's a minor bug in kvm.
> >
> > This patch fixes TMR to be set/cleared on IRR set
> > only as per spec.
> >
> > And now that we don't clear TMR, we can save
> > an atomic read of TMR on EOI that's not propagated
> > to ioapic, by checking whether ioapic needs
> > a specific vector first and calculating
> > the mode afterwards.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > arch/x86/kvm/lapic.c | 19 +++++++++++++------
> > virt/kvm/ioapic.c | 10 +++++++---
> > virt/kvm/ioapic.h | 1 +
> > 3 files changed, 21 insertions(+), 9 deletions(-)
>
> Looks OK, ioapic_service -> accept_apic_irq will set TMR
> again if IRR is raised. Gleb, can you review please?
>
Looks good to me.
--
Gleb.
next prev parent reply other threads:[~2012-04-12 11:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 15:49 [PATCH] kvm: dont clear TMR on EOI Michael S. Tsirkin
2012-04-12 2:03 ` Marcelo Tosatti
2012-04-12 11:49 ` Gleb Natapov [this message]
2012-04-14 1:25 ` Marcelo Tosatti
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=20120412114955.GI20431@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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