public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
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, Avi Kivity <avi@redhat.com>
Subject: Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386
Date: Sat, 21 Jul 2012 15:16:56 +0200	[thread overview]
Message-ID: <500AABC8.7080406@web.de> (raw)
In-Reply-To: <CAFEAcA8GHrwvSXCfOz6v_fz3SMxBPE-Vm1P3d6_p46k1OcQJ=A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3114 bytes --]

On 2012-07-21 14:57, Peter Maydell wrote:
> On 21 July 2012 13:35, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2012-07-21 14:17, Peter Maydell wrote:
>>> You still haven't really explained why we can't just ignore irqfd
>>> for now. I don't see how it would particularly affect the design
>>> of the kernel implementation very much, and the userspace interface
>>> seems to just be an extra ioctl.
>>
>> I bet you ignored MSI so far. Physical IRQ lines are just a part of the
>> whole picture. How are MSIs delivered on the systems you want to add?
> 
> You're using random acronyms without defining them again. It looks
> as if MSI is a PCI specific term. That would seem to me to fall
> under the heading of "routing across a board model" which we can't
> do anyway, because you have no idea how this all wired up, it
> will depend on the details of the SoC and the PCI controller.

For sure you can. You need to discover those wiring, cache it, and then
let the source inject to the final destination directly. See the INTx
routing notifier and pci_device_route_intx_to_irq from [1] for that
simplistic approach we are taking on the x86/PC architecture.

> (As it happens the initial board model doesn't have PCI support;
> most ARM boards don't.) I'm not entirely sure we want to have
> "in kernel random SoC-specific PCI controller"...

Isn't ARM going after server scenarios as well? Will be hard without
some PCI support. The good news is that you likely won't need a full
in-kernel PCI model for this (we don't do so on x86 as well).

> 
> [Point taken that thought is required here, though.]
> 
>>>> Once you support the backend (KVM_SET_GSI_ROUTING + KVM_IRQ_LINE),
>>>> adding irqfd is in fact simple.
>>>
>>> I don't really understand where KVM_SET_GSI_ROUTING comes into
>>> this -- the documentation is a bit opaque. It says "Sets the GSI
>>> routing table entries" but it doesn't define what a GSI is or
>>> what we're routing to where. Googling suggests GSI is an APIC
>>> specific term so it doesn't sound like it's relevant for non-x86.
>>
>> As I said before: "GSI" needs to be read as "physical or virtual IRQ
>> line". The virtual ones can be of any source you define, irqfd is just one.
> 
> What's a virtual irq line in this context? We're modelling a physical
> bit of hardware which has N interrupt lines, so I'm not sure what
> a virtual irq line would be or how it would appear to the guest...

A virtual line is an input of the in-kernel IRQ router you configure via
SET_GSI_ROUTING. A physical line is a potential output of it that goes
into some in-kernel interrupt controller model. It can also be an
interrupt message sent to a specific CPU - provided the arch supports
such a delivery protocol.

Of course, the current router was modeled after x86 and ia64. So I
wouldn't be surprised if some ARM system configuration cannot be
expressed this way. Then we need to discuss reasonable extensions. But
it should provide a sound foundation at least.

Jan

[1] http://permalink.gmane.org/gmane.comp.emulators.qemu/160792


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-07-21 13:16 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1342811652-16931-1-git-send-email-peter.maydell@linaro.org>
2012-07-21  6:57 ` [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386 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 [this message]
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

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=500AABC8.7080406@web.de \
    --to=jan.kiszka@web.de \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --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