From: Steve Rutherford <srutherford@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace
Date: Thu, 4 Jun 2015 13:21:55 -0700 [thread overview]
Message-ID: <20150604202155.GA22371@google.com> (raw)
In-Reply-To: <556ECB0D.2060709@redhat.com>
On Wed, Jun 03, 2015 at 11:38:21AM +0200, Paolo Bonzini wrote:
> However, why is the roundtrip to userspace necessary? Could you pass
> the extint index directly as an argument to KVM_INTERRUPT? It's
> backwards-compatible, because KVM_INTERRUPT so far could not be used
> together with an in-kernel LAPIC. If you could do that, you could also
> avoid the new userspace_extint_available field.
This is possible, and definitely simpler, but not accurate to the spec.
In general, the PIC fires an INT, which leads to the CPU responding with
and INTA, and fetching the interrupt vector. It might not be strictly
necessary for this handshake to occur, but it is how the hardware did it
originally.
In certain cases, having the interface modelled after the hardware is
convenient. For example, devices can send external interrupt MSIs,
which require an Interrupt Ack to fetch the vector. They're a bit weird,
and I have absolutely no idea why someone would want these, but they are
a definitely a thing.
Looking back at KVM though, it doesn't look like KVM even supports these,
so this may not be a real issue. Eliding the roundtrip might be acceptable.
It's certainly simpler.
> Userspace can figure out who's the BSP. The rendez-vous between the
> irqchip and the BSP's VCPU thread is still needed, but it can be done
> entirely in userspace.
Good point. I'll push this up into userspace.
next prev parent reply other threads:[~2015-06-04 20:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 23:51 [PATCH v3 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP Steve Rutherford
2015-06-02 23:51 ` [PATCH v3 2/4] KVM: x86: Add KVM exit for IOAPIC EOIs Steve Rutherford
2015-06-03 9:16 ` Paolo Bonzini
2015-06-02 23:51 ` [PATCH v3 3/4] KVM: x86: Add EOI exit bitmap inference Steve Rutherford
2015-06-03 9:16 ` Paolo Bonzini
2015-06-04 20:39 ` Steve Rutherford
2015-06-08 10:33 ` Wanpeng Li
2015-06-08 14:15 ` Paolo Bonzini
2015-06-09 2:16 ` Wanpeng Li
2015-06-17 8:14 ` Paolo Bonzini
2015-06-02 23:51 ` [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace Steve Rutherford
2015-06-03 9:38 ` Paolo Bonzini
2015-06-04 20:21 ` Steve Rutherford [this message]
2015-06-20 0:41 ` Steve Rutherford
2015-06-21 20:10 ` Paolo Bonzini
2015-06-26 0:26 ` Steve Rutherford
2015-06-26 8:49 ` Paolo Bonzini
2015-06-03 8:54 ` [PATCH v3 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP Paolo Bonzini
2015-06-04 20:38 ` Steve Rutherford
2015-06-05 7:19 ` Paolo Bonzini
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=20150604202155.GA22371@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).