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: Tue, 24 Jul 2012 11:56:17 +0300 [thread overview]
Message-ID: <500E6331.6080808@redhat.com> (raw)
In-Reply-To: <CAFEAcA9bM1be43iqqgE3TgtHseznZ94kUxT+jvQ6GXriP-eMDw@mail.gmail.com>
On 07/23/2012 06:19 PM, Peter Maydell wrote:
> On 23 July 2012 13:26, Avi Kivity <avi@redhat.com> wrote:
>> On 07/21/2012 11:54 AM, Peter Maydell wrote:
>>> The reason I want to get rid of common-code uses of kvm_irqchip_in_kernel()
>>> is because I think they're all similar to this -- the common code is
>>> using the check as a proxy for something else, and it should be directly
>>> asking about that something else. The only bits of code that should
>>> care about "is the irqchip in kernel?" are:
>>> * target-specific device/machine setup code which needs to know
>>> which apic/etc to instantiate
>>> * target-specific x86 code which has this weird synchronous IRQ
>>> delivery model for irqchip-not-in-kernel
>>> (Obviously I might have missed something, I'm flailing around
>>> trying to understand this code :-))
>>
>> Agree naming should be improved. In fact the early series I pushed to
>> decompose local apic, ioapic, and pic, but that didn't happen. If it
>> did we'd probably not have this conversation.
>
> OK, let's see if we can get some agreement about naming here.
>
> First, some test-functions I think we definitely need:
>
> kvm_interrupts_are_async()
> -- true if interrupt delivery is asynchronous
> default false in kvm_init, set true in kvm_irqchip_create,
> architectures may set it true in kvm_arch_init [ARM will
> do so; PPC might want to do so]
Interrupts are by nature async. I'd say kvm_async_interrupt_injection()
to make it clearer.
>
> kvm_irqchip_in_kernel()
> -- the user-settable option, actual behaviour is arch specific
> on x86, true means (as it does now) LAPIC,IOAPIC,PIT in kernel
> on ARM, we ignore this setting and just DTRT
> on PPC, used as a convenience setting for whether to use
> an in-kernel model of the interrupt controller
> Shouldn't be used in non-target-specific code
If it's 100% arch specific, the name can/should be arch specific since
it will never be used in generic core. So kvm_ioapic_in_kernel(),
kvm_gic_in_kernel() (or even kvm_ioapic(), kvm_gic(), since "kvm"
already implies the kernel (that's the k in kvm, after all).
>
> and two I'm not quite so sure about:
>
> kvm_has_msi_routing()
> -- true if we can do routing of MSIs
> set true only if x86 and kvm_irqchip_in_kernel
>
> kvm_has_irqfds()
> -- true if kernel supports IRQFDs
> currently true only if x86 and kvm_irqchip_in_kernel
Will be true for everyone, eventually.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-07-24 8:56 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
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 [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=500E6331.6080808@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).