qemu-devel.nongnu.org archive mirror
 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>, Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, patches@linaro.org,
	Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386
Date: Sat, 21 Jul 2012 08:57:03 +0200	[thread overview]
Message-ID: <500A52BF.9080207@web.de> (raw)
In-Reply-To: <1342811652-16931-1-git-send-email-peter.maydell@linaro.org>

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

On 2012-07-20 21:14, Peter Maydell wrote:
> kvm_allows_irq0_override() is a totally x86 specific concept:
> move it to the target-specific source file where it belongs.
> This means we need a new header file for the prototype:
> kvm_i386.h, in line with the existing kvm_ppc.h.

First of all, the patch is inconsistent as it lacks something like
target-i386/kvm-stub.c (IOW, you forgot about kvm_allows_irq0_override
in kvm-stub.c). But the approach is wrong in general, see below.

> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I'm sure this isn't the only x86ism in the KVM generic source
> files. However the thing I'm specifically trying to do is
> nuke all the uses of kvm_irqchip_in_kernel() in common code,

No, "irqchip in kernel" is supposed to be a generic concept. We will
also have it on Power. Not sure what your plans are for ARM, maybe it
will always be true there.

That said, maybe there is room for discussion about what it means for
the general KVM code and its users if the irqchip is in the kernel. Two
things that should be common for every arch:
 - VCPU idle management is done inside the kernel
 - in-kernel KVM helpers like vhost or VFIO can inject IRQs directly

The latter point implies that irqfd is available and that interrupt
routes from virtual IRQs (*) (like the one associated with an irqfd) to
the in-kernel IRQ controller have to be established. That's pretty generic.

> as part of trying to untangle "what irqchip model do you want"
> from other aspects of the interrupt handling model.
> 
> Other than this one, there are uses in cpus.c and hw/virtio-pci.c,
> but I haven't figured out yet exactly what those bits of code
> are trying to do...

See above for the two reasons.

Jan

(*) "GSI" actually means "physical or virtual IRQ line".


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

  reply	other threads:[~2012-07-21  6:57 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 [this message]
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

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=500A52BF.9080207@web.de \
    --to=jan.kiszka@web.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;
as well as URLs for NNTP newsgroup(s).