From: Avi Kivity <avi@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] passing interrupts from QEMU to KVM
Date: Thu, 19 Jul 2012 14:43:27 +0300 [thread overview]
Message-ID: <5007F2DF.6080807@redhat.com> (raw)
In-Reply-To: <CAFEAcA8w1==ahubKKHaux4r=vL3KTEDSBW9chSatodfj=5-09A@mail.gmail.com>
On 07/19/2012 02:14 PM, Peter Maydell wrote:
>
> Basically I'm not sure why there's all this variety here,
> or why x86 does things differently for in-kernel irqchip
> versus not -- I would have expected that the only difference
> for an in-kernel irqchip is that there are more interrupt
> lines. Kicking the CPU out of the kernel in particular seems
> a very roundabout way of telling it about an interrupt,
> but I assume there's a rationale for doing it that way...
Non-in-kernel irqchip is synchronous; everything must be executed in
vcpu context. This is because the kernel does not queue any interrupts,
rather userspace requests an "interrupt window" (an instruction boundary
where the vcpu is ready for interrupt injection) and then qemu injects
that interrupt.
In-kernel irqchip added the logic for queueing interrupts, and is
completely asynchronous. You can queue an interrupt from a different
thread, the kernel will inject it when the vcpu is ready.
>
> The way I'm thinking about handling this for ARM is just
> to have both the irqchip and no-irqchip approaches be
> roughly the same: the device code just makes the relevant
> KVM ioctl to inject interrupts (the semantics of the irq
> number change for irqchip vs not irqchip but the general
> behaviour is the same), and we never call cpu_interrupt()
> if KVM is enabled. Is there any reason that wouldn't work?
>
Let's make them even more similar, by removing !in_kernel_irqchip.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-07-19 11:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 11:14 [Qemu-devel] passing interrupts from QEMU to KVM Peter Maydell
2012-07-19 11:43 ` Avi Kivity [this message]
2012-07-19 12:00 ` Peter Maydell
2012-07-19 14:13 ` Alexander Graf
2012-07-19 14:16 ` Peter Maydell
2012-07-19 14:30 ` Alexander Graf
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=5007F2DF.6080807@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).