kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Rutherford <srutherford@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v5 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP.
Date: Wed, 29 Jul 2015 20:04:53 -0700	[thread overview]
Message-ID: <20150730030453.GA15229@google.com> (raw)
In-Reply-To: <55B8CD8A.4030507@redhat.com>

On Wed, Jul 29, 2015 at 02:56:42PM +0200, Paolo Bonzini wrote:
> 
> > +		kvm_rtc_eoi_tracking_restore_one(vcpu);
> >  }
> >  
> >  void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)
> > @@ -1921,7 +1923,8 @@ static void apic_sync_pv_eoi_to_guest(struct kvm_vcpu *vcpu,
> >  	    /* 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)) {
> > +	    kvm_ioapic_handles_vector(vcpu->kvm, apic->highest_isr_cache) ||
> > +	    irqchip_split(vcpu->kvm)) {
> 
> This is ugly (and if anything irqchip_split should be done before
> kvm_ioapic_handles_vector).  Could this just test the EOI exit bitmap
> instead?
> 
That could be done. The EOI exit bitmap write paths for split and !split
would need to be consolidated. (We can't pull them from the VMCS, so we'd
need to fetch them from the one stored in kvm_vcpu).

> Also, who sets TMR in the split irqchip case?  I'll post a patch roday
> or tomorrow to compute TMR in __apic_accept_irq and to do the
> aforementioned EOI exit bitmap test.
Another option would be to compute the TMR in vcpu_scan_ioapic, by
extracting it from the EOI exit bitmaps (which would be most similar
to how it had been done previously), but I prefer computing it in
__apic_accept_irq.

      reply	other threads:[~2015-07-30  3:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 23:17 [PATCH v5 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP Steve Rutherford
2015-07-27 23:17 ` [PATCH v5 2/4] KVM: x86: Add KVM exit for IOAPIC EOIs Steve Rutherford
2015-07-27 23:17 ` [PATCH v5 3/4] KVM: x86: Add EOI exit bitmap inference Steve Rutherford
2015-07-29 12:38   ` Paolo Bonzini
2015-07-29 20:27     ` Steve Rutherford
2015-07-30  6:23       ` Jan Kiszka
2015-07-30  6:27         ` Steve Rutherford
2015-07-27 23:17 ` [PATCH v5 4/4] KVM: x86: Add support for local interrupt requests from userspace Steve Rutherford
2015-07-28 15:58   ` Paolo Bonzini
2015-07-28 19:06     ` Steve Rutherford
2015-07-28 22:05       ` Paolo Bonzini
2015-07-29  0:50         ` Steve Rutherford
2015-07-29 10:21       ` Paolo Bonzini
2015-07-29 10:15   ` Paolo Bonzini
2015-07-29 12:56 ` [PATCH v5 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP Paolo Bonzini
2015-07-30  3:04   ` Steve Rutherford [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=20150730030453.GA15229@google.com \
    --to=srutherford@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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 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).