From: Paolo Bonzini <pbonzini@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Alexander Graf <agraf@suse.de>,
kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
Stuart Yoder <stuart.yoder@freescale.com>,
Scott Wood <scottwood@freescale.com>,
Paul Mackerras <paulus@samba.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: in-kernel interrupt controller steering
Date: Wed, 06 Mar 2013 13:41:04 +0000 [thread overview]
Message-ID: <51374770.5040405@redhat.com> (raw)
In-Reply-To: <20130306131424.GR11223@redhat.com>
Il 06/03/2013 14:14, Gleb Natapov ha scritto:
>>>> The problem would only start if KVM_SET_IRQCHIP_TYPE (new name of
>>>> KVM_CREATE_IRQCHIP_ARGS) forced you to later call KVM_CREATE_DEVICE.
>>>
>>> Ah, I see. I don't see why it would. The fact that there is a
>>> "LAPIC" doesn't mean that the per-vcpu SET_INTERRUPT ioctl stops
>>> working. So if SET_IRQCHIP_TYPE(!none) breaks user-space interrupt
>>> controller emulation I would consider that a bug.
>>
> For x86 this is the case though. I do not see how it can't be. If
> LAPIC is emulated in userspace SET_INTERRUPT is used to pass IRQ
> vector that should be handled as a result of LAPIC emulation.
SET_IRQCHIP_TYPE creates the LAPICs; it would indeed break userspace
LAPIC emulation because the LAPICs would not cause userspace exits anymore.
However, it need not mandate the usage of an in-kernel IOAPIC or PIC
though. KVM_INTERRUPT, the docs say, "is only useful if in-kernel local
APIC or equivalent is not used", but it is really only useful for if
in-kernel *IOAPIC* is not used. The userspace IOAPIC can use it to
inject the interrupts to the in-kernel LAPIC.
So, it would be possible to create the IOAPIC or PIC separately with
KVM_CREATE_DEVICE, and have the userspace devices inject the interrupts
with KVM_IRQ_LINE_STATUS (PIC->IOAPIC) or KVM_INTERRUPT (IOAPIC->LAPIC).
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Alexander Graf <agraf@suse.de>,
kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
Stuart Yoder <stuart.yoder@freescale.com>,
Scott Wood <scottwood@freescale.com>,
Paul Mackerras <paulus@samba.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: in-kernel interrupt controller steering
Date: Wed, 06 Mar 2013 14:41:04 +0100 [thread overview]
Message-ID: <51374770.5040405@redhat.com> (raw)
In-Reply-To: <20130306131424.GR11223@redhat.com>
Il 06/03/2013 14:14, Gleb Natapov ha scritto:
>>>> The problem would only start if KVM_SET_IRQCHIP_TYPE (new name of
>>>> KVM_CREATE_IRQCHIP_ARGS) forced you to later call KVM_CREATE_DEVICE.
>>>
>>> Ah, I see. I don't see why it would. The fact that there is a
>>> "LAPIC" doesn't mean that the per-vcpu SET_INTERRUPT ioctl stops
>>> working. So if SET_IRQCHIP_TYPE(!none) breaks user-space interrupt
>>> controller emulation I would consider that a bug.
>>
> For x86 this is the case though. I do not see how it can't be. If
> LAPIC is emulated in userspace SET_INTERRUPT is used to pass IRQ
> vector that should be handled as a result of LAPIC emulation.
SET_IRQCHIP_TYPE creates the LAPICs; it would indeed break userspace
LAPIC emulation because the LAPICs would not cause userspace exits anymore.
However, it need not mandate the usage of an in-kernel IOAPIC or PIC
though. KVM_INTERRUPT, the docs say, "is only useful if in-kernel local
APIC or equivalent is not used", but it is really only useful for if
in-kernel *IOAPIC* is not used. The userspace IOAPIC can use it to
inject the interrupts to the in-kernel LAPIC.
So, it would be possible to create the IOAPIC or PIC separately with
KVM_CREATE_DEVICE, and have the userspace devices inject the interrupts
with KVM_IRQ_LINE_STATUS (PIC->IOAPIC) or KVM_INTERRUPT (IOAPIC->LAPIC).
Paolo
next prev parent reply other threads:[~2013-03-06 13:41 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 22:20 in-kernel interrupt controller steering Alexander Graf
2013-03-04 22:20 ` Alexander Graf
2013-03-05 0:59 ` Scott Wood
2013-03-05 0:59 ` Scott Wood
2013-03-05 5:44 ` Paul Mackerras
2013-03-05 5:44 ` Paul Mackerras
2013-03-05 15:25 ` Gleb Natapov
2013-03-05 15:25 ` Gleb Natapov
2013-03-06 9:40 ` Paolo Bonzini
2013-03-06 9:40 ` Paolo Bonzini
2013-03-06 9:58 ` Gleb Natapov
2013-03-06 9:58 ` Gleb Natapov
2013-03-06 10:04 ` Alexander Graf
2013-03-06 10:04 ` Alexander Graf
2013-03-06 10:12 ` Gleb Natapov
2013-03-06 10:12 ` Gleb Natapov
2013-03-06 10:38 ` Paolo Bonzini
2013-03-06 10:38 ` Paolo Bonzini
2013-03-06 10:38 ` Paolo Bonzini
2013-03-06 10:38 ` Paolo Bonzini
2013-03-06 11:26 ` Gleb Natapov
2013-03-06 11:26 ` Gleb Natapov
2013-03-06 11:44 ` Alexander Graf
2013-03-06 11:44 ` Alexander Graf
2013-03-06 11:46 ` Paolo Bonzini
2013-03-06 11:46 ` Paolo Bonzini
2013-03-06 11:47 ` Alexander Graf
2013-03-06 11:47 ` Alexander Graf
2013-03-06 11:57 ` Paolo Bonzini
2013-03-06 11:57 ` Paolo Bonzini
2013-03-06 11:58 ` Alexander Graf
2013-03-06 11:58 ` Alexander Graf
2013-03-06 13:16 ` Gleb Natapov
2013-03-06 13:16 ` Gleb Natapov
2013-03-06 11:44 ` Paolo Bonzini
2013-03-06 11:44 ` Paolo Bonzini
2013-03-06 11:46 ` Alexander Graf
2013-03-06 11:46 ` Alexander Graf
2013-03-06 11:59 ` Gleb Natapov
2013-03-06 11:59 ` Gleb Natapov
2013-03-06 12:02 ` Alexander Graf
2013-03-06 12:02 ` Alexander Graf
2013-03-06 12:14 ` Paolo Bonzini
2013-03-06 12:14 ` Paolo Bonzini
2013-03-06 12:20 ` Alexander Graf
2013-03-06 12:20 ` Alexander Graf
2013-03-06 12:28 ` Paolo Bonzini
2013-03-06 12:28 ` Paolo Bonzini
2013-03-06 13:14 ` Gleb Natapov
2013-03-06 13:14 ` Gleb Natapov
2013-03-06 13:22 ` Alexander Graf
2013-03-06 13:22 ` Alexander Graf
2013-03-06 13:56 ` Gleb Natapov
2013-03-06 13:56 ` Gleb Natapov
2013-03-06 14:03 ` Alexander Graf
2013-03-06 14:03 ` Alexander Graf
2013-03-06 14:12 ` Paolo Bonzini
2013-03-06 14:12 ` Paolo Bonzini
2013-03-06 14:30 ` Alexander Graf
2013-03-06 14:30 ` Alexander Graf
2013-03-06 14:37 ` Paolo Bonzini
2013-03-06 14:37 ` Paolo Bonzini
2013-03-06 14:40 ` Alexander Graf
2013-03-06 14:40 ` Alexander Graf
2013-03-06 14:41 ` Gleb Natapov
2013-03-06 14:41 ` Gleb Natapov
2013-03-06 14:48 ` Alexander Graf
2013-03-06 14:48 ` Alexander Graf
2013-03-06 14:59 ` Alexander Graf
2013-03-06 14:59 ` Alexander Graf
2013-03-06 15:02 ` Paolo Bonzini
2013-03-06 15:02 ` Paolo Bonzini
2013-03-06 15:30 ` Gleb Natapov
2013-03-06 15:30 ` Gleb Natapov
2013-03-06 16:33 ` Alexander Graf
2013-03-06 16:33 ` Alexander Graf
2013-03-07 0:32 ` Paul Mackerras
2013-03-07 0:32 ` Paul Mackerras
2013-03-07 7:43 ` Paolo Bonzini
2013-03-07 7:43 ` Paolo Bonzini
2013-03-06 13:41 ` Paolo Bonzini [this message]
2013-03-06 13:41 ` Paolo Bonzini
2013-03-06 14:11 ` Gleb Natapov
2013-03-06 14:11 ` Gleb Natapov
2013-03-06 14:31 ` Alexander Graf
2013-03-06 14:31 ` Alexander Graf
2013-03-06 18:46 ` Peter Maydell
2013-03-06 18:46 ` Peter Maydell
2013-03-06 19:20 ` Alexander Graf
2013-03-06 19:20 ` Alexander Graf
2013-03-06 0:23 ` Benjamin Herrenschmidt
2013-03-06 0:23 ` Benjamin Herrenschmidt
2013-03-06 0:33 ` Alexander Graf
2013-03-06 0:33 ` 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=51374770.5040405@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=gleb@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@samba.org \
--cc=peter.maydell@linaro.org \
--cc=scottwood@freescale.com \
--cc=stuart.yoder@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.