From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: x86@kernel.org, kvm@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCHv5 5/5] kvm: host side for eoi optimization
Date: Thu, 31 May 2012 17:52:20 +0300 [thread overview]
Message-ID: <20120531145219.GA20290@redhat.com> (raw)
In-Reply-To: <20120531101513.GO2311@redhat.com>
On Thu, May 31, 2012 at 01:15:13PM +0300, Gleb Natapov wrote:
> > > > + /* Cache not set: safe but we don't bother. */
> > > > + unlikely(apic->isr_cache == -1) ||
> > > > + /* Need EOI to update ioapic. */
> > > > + unlikely(kvm_ioapic_handles_vector(vcpu->kvm, apic->isr_cache)))
> > > > + return;
> > > > +
> > > > + pv_eoi_set_pending(apic->vcpu);
> > > > +}
> > > > +
> > > apic_sync_pv_eoi_to_guest() is not paired with
> > > apic_sync_pv_eoi_from_guest() if event injection is canceled.
> > > You can enter guest with stale pv_eoi bit.
> >
> > Never. The pv_eoi bit is cleared on each exit.
> There will be no exit since there will be no entry. Search for
> "goto out" after kvm_lapic_sync_to_vapic().
I think you've found a bug, thanks a bunch.
I have fixed it but the x86 guys asked me not to
post more patches until merge window closes :(
So I'll sit on a fix for several days.
prev parent reply other threads:[~2012-05-31 14:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 14:05 [PATCHv5 0/5] apic: eoi optimization support Michael S. Tsirkin
2012-05-22 14:05 ` [PATCHv5 1/5] kvm_para: guest side for eoi avoidance Michael S. Tsirkin
2012-05-22 14:05 ` [PATCHv5 2/5] x86/bitops: note on __test_and_clear_bit atomicity Michael S. Tsirkin
2012-05-22 14:05 ` [PATCHv5 3/5] kvm: eoi msi documentation Michael S. Tsirkin
2012-05-22 14:05 ` [PATCHv5 4/5] kvm: only sync when attention bits set Michael S. Tsirkin
2012-05-22 14:05 ` [PATCHv5 5/5] kvm: host side for eoi optimization Michael S. Tsirkin
2012-05-31 9:57 ` Gleb Natapov
2012-05-31 10:11 ` Michael S. Tsirkin
2012-05-31 10:15 ` Gleb Natapov
2012-05-31 14:52 ` Michael S. Tsirkin [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=20120531145219.GA20290@redhat.com \
--to=mst@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--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