From: Steve Rutherford <srutherford@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH v5 4/4] KVM: x86: Add support for local interrupt requests from userspace
Date: Tue, 28 Jul 2015 17:50:56 -0700 [thread overview]
Message-ID: <20150729005056.GA29865@google.com> (raw)
In-Reply-To: <55B7FCB1.1020508@redhat.com>
On Wed, Jul 29, 2015 at 12:05:37AM +0200, Paolo Bonzini wrote:
> Ok, I understand it now. However, you're still not causing an exit
> when LVT0 changes, are you? post_kvm_run_save is not run until the
> next exit to userspace, which could be a long time later.
Yes! This is definitely right. This may wait as long as an entire entry/exit
before actually exiting to userspace. Moving into dm_request_for_irq_injection
is definitely the way to go.
>
> So, I think that you do not need KVM_REQ_PIC_UNMASK_EXIT. Instead,
> you can modify dm_request_for_irq_injection to handle the split-irqchip
> case, like this:
>
> if (!vcpu->run->request_interrupt_window || pic_in_kernel(vcpu->kvm))
> return false;
>
> if (kvm_cpu_has_interrupt(vcpu))
> return false;
>
> return (irqchip_split(vcpu->kvm)
> ? kvm_apic_accept_pic_intr(vcpu)
> : kvm_arch_interrupt_allowed(vcpu));
>
> This will cause KVM_RUN to return -EINTR, which QEMU happens to handle
> the same way as KVM_EXIT_IRQ_WINDOW_OPEN.
I definitely prefer the explit exit reason.
It's also a bit easier to make work with our VMM ;)
> Feel free to post v6 of this patch only. Everything else is mostly
> okay; there are some leftovers here and there (lapic_in_kernel,
> GET_VECTOR_FROM_USERSPACE) but I can fix that.
I'll give it another once over to remove the dead code. Sorry about
leaving that junk in.
> How is the integration with QEMU going? With this latest iteration
> it should be relatively easy.
A new team member is sinking his teeth into it, as an starter project.
He'll likely have a prototype of it working soon.
Steve
>
> Paolo
next prev parent reply other threads:[~2015-07-29 0:52 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 [this message]
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
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=20150729005056.GA29865@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 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.