From: Avi Kivity <avi@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: kvm <kvm@vger.kernel.org>,
patches@linaro.org, Marcelo Tosatti <mtosatti@redhat.com>,
Alexander Graf <agraf@suse.de>,
qemu-devel@nongnu.org, Jan Kiszka <jan.kiszka@web.de>
Subject: Re: [Qemu-devel] [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386
Date: Mon, 23 Jul 2012 16:38:35 +0300 [thread overview]
Message-ID: <500D53DB.5080005@redhat.com> (raw)
In-Reply-To: <CAFEAcA9tmYzSsnp+fWf2Ysz7KWSgsnHk+nahD0uT7hxZwEo-+g@mail.gmail.com>
On 07/23/2012 04:27 PM, Peter Maydell wrote:
> On 23 July 2012 14:09, Avi Kivity <avi@redhat.com> wrote:
>> On 07/23/2012 03:58 PM, Peter Maydell wrote:
>>> So should we be using something other than KVM_CREATE_IRQCHIP to
>>> ask the kernel to create a GIC model for us (and leave KVM_CREATE_IRQCHIP
>>> as a dummy "always succeed" ioctl)?
>>
>> Some time ago I suggested using the parameter to KVM_CREATE_IRQCHIP to
>> select the "irqchip type".
>
> That seems reasonable, although we have an awkward ordering issue
> in KVM as it stands: KVM_CREATE_IRQCHIP needs to be called before
> we start creating VCPU threads (at the moment it is done via kvm_init)
> but we don't know what kind of irqchip we want to create until the
> machine model code actually creates the irqchip device, which generally
> happens after the CPU object is created (and VCPU threads are created
> at that point). We could fix that by moving creation of the actual
> VCPU thread to vl.c after the model has been initialized.
Seems to be purely a qemu problem, no? While I think it's reasonable to
be flexible, in this case I think qemu ought to know all these things
beforehand.
>
>>> I'm not sure ARM has any equivalent to the local APIC -- the GIC
>>> deals with everything and we don't have any equivalent division
>>> of labour to the x86 LAPIC-IOAPIC one.
>>
>> It's probably a tiny part of the core with no name. The point is that
>> the x86<->lapic interface is synchronous and bidirectional, while the
>> lapic<->ioapic interface is asynchronous (it is still bidirectional, but
>> not in a stop-the-vcpu way). I assume the ARM<->GIC interface is
>> unidirectional?
>
> Well, strictly speaking the ARM<->GIC interface is implementation
> defined, but in practice you can think of it as "the GIC controls
> the IRQ and FIQ input lines to each core and uses them to signal
> that an interrupt is present". There's no need for anything to
> be signalled back in the other direction: the GIC will just continue
> to hold IRQ asserted until the interrupt handler code writes the
> relevant GIC register to indicate that the interrupt has been
> handled.
Okay. This agrees with my mental model of how it works.
> (On a core with the virtualization extensions there are also
> signals for the GIC to raise a virtual IRQ or FIQ, but we can
> ignore those for KVM because we don't and can't provide the
> virtualization extensions to a guest.)
Yet.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-07-23 13:38 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 19:14 [Qemu-devel] [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386 Peter Maydell
2012-07-21 6:57 ` Jan Kiszka
2012-07-21 8:54 ` Peter Maydell
2012-07-21 9:14 ` Jan Kiszka
2012-07-21 9:30 ` Peter Maydell
2012-07-21 9:44 ` Jan Kiszka
2012-07-21 9:56 ` Peter Maydell
2012-07-21 10:22 ` Jan Kiszka
2012-07-21 10:53 ` Peter Maydell
2012-07-21 11:08 ` Jan Kiszka
2012-07-21 12:17 ` Peter Maydell
2012-07-21 12:35 ` Jan Kiszka
2012-07-21 12:57 ` Peter Maydell
2012-07-21 13:16 ` Jan Kiszka
2012-07-23 12:04 ` Cornelia Huck
2012-07-23 12:18 ` Avi Kivity
2012-07-23 12:25 ` Peter Maydell
2012-07-23 12:31 ` Avi Kivity
2012-07-23 12:34 ` Avi Kivity
2012-07-23 13:06 ` Cornelia Huck
2012-07-23 13:14 ` Avi Kivity
2012-07-23 13:55 ` Cornelia Huck
2012-07-23 14:27 ` Avi Kivity
2012-07-23 15:01 ` Cornelia Huck
2012-07-23 12:26 ` Avi Kivity
2012-07-23 12:58 ` Peter Maydell
2012-07-23 13:09 ` Avi Kivity
2012-07-23 13:27 ` Peter Maydell
2012-07-23 13:38 ` Avi Kivity [this message]
2012-07-23 13:50 ` Peter Maydell
2012-07-23 14:30 ` Avi Kivity
2012-07-23 17:58 ` Peter Maydell
2012-07-24 8:50 ` Avi Kivity
2012-07-24 8:54 ` Peter Maydell
2012-07-24 8:58 ` Jan Kiszka
2012-07-23 15:19 ` Peter Maydell
2012-07-23 16:55 ` Jan Kiszka
2012-07-23 17:41 ` Peter Maydell
2012-07-23 17:51 ` Jan Kiszka
2012-07-24 8:56 ` Avi Kivity
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=500D53DB.5080005@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=patches@linaro.org \
--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).