All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Ronen Hod <rhod@redhat.com>,
	vrozenfe@redhat.com, pbonzini@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH RFC untested] kvm/x86: implement hv EOI assist
Date: Tue, 22 Apr 2014 22:57:48 -0300	[thread overview]
Message-ID: <20140423015748.GA4434@amt.cnet> (raw)
In-Reply-To: <20140422221249.GA837@redhat.com>

On Wed, Apr 23, 2014 at 01:12:49AM +0300, Michael S. Tsirkin wrote:
> On Tue, Apr 22, 2014 at 04:26:48PM -0300, Marcelo Tosatti wrote:
> > On Tue, Apr 22, 2014 at 12:11:47PM +0300, Michael S. Tsirkin wrote:
> > > On Mon, Apr 21, 2014 at 06:40:17PM -0300, Marcelo Tosatti wrote:
> > > > On Sun, Apr 13, 2014 at 04:10:22PM +0300, Michael S. Tsirkin wrote:
> > > > > It seems that it's easy to implement the EOI assist
> > > > > on top of the PV EOI feature: simply convert the
> > > > > page address to the format expected by PV EOI.
> > > > > 
> > > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > 
> > > > Looks alright except:
> > > > 
> > > > - There is no handling of PV EOI data to be performed at HV_X64_MSR_EOI write
> > > > path?
> 
> I thought HV_X64_MSR_EOI is a separate optimization - it's an X2APIC
> replacement that lets you do EOI with an MSR and not IO.
> No?

Yes.

> > > > - Migration fails with PV-EOI not enabled in CPUID ? (perhaps could
> > > >   require it for PV-EOI over HV-APIC-ASSIST).
> 
> Did not try migration yet - could you explain the issue please?
> HV-APIC-ASSIST MSR is in the list of saved MSRs ...

Restoration of MSR_KVM_PV_EOI_EN is required for migration under
when PVEOI enabled ?

> > > > - MS docs mention "No EOI required" is set only if interrupt injected is edge
> > > >   triggered.
> > > 
> > > Hmm I thought level interrupts are going through IOAPIC so that's already true isn't it?
> > > 
> > >         if (!pv_eoi_enabled(vcpu) ||
> > >             /* IRR set or many bits in ISR: could be nested. */
> > >             apic->irr_pending ||
> > >             /* Cache not set: could be safe but we don't bother. */
> > >             apic->highest_isr_cache == -1 ||
> > > --->        /* Need EOI to update ioapic. */
> > >             kvm_ioapic_handles_vector(vcpu->kvm, apic->highest_isr_cache)) {
> > 
> > Right.
> > 
> > >                 /*
> > >                  * PV EOI was disabled by apic_sync_pv_eoi_from_guest
> > >                  * so we need not do anything here.
> > >                  */
> > >                 return;
> > >         }
> > > 
> > > In any case if some interrupt handler ignores this bit because it's
> > > level, that's harmless since it will do EOI and then we'll clear the
> > > bit, right?
> > 
> > Yes.

  reply	other threads:[~2014-04-23  1:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-13 13:10 [PATCH RFC untested] kvm/x86: implement hv EOI assist Michael S. Tsirkin
2014-04-21 21:40 ` Marcelo Tosatti
2014-04-22  9:11   ` Michael S. Tsirkin
2014-04-22 19:26     ` Marcelo Tosatti
2014-04-22 22:12       ` Michael S. Tsirkin
2014-04-23  1:57         ` Marcelo Tosatti [this message]
2014-04-23  5:52           ` Michael S. Tsirkin
2014-04-23 18:30             ` 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=20140423015748.GA4434@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rhod@redhat.com \
    --cc=vrozenfe@redhat.com \
    /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.