From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: "Overall list:Overall" <kvm@vger.kernel.org>,
<kvm-ppc@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>,
Stuart Yoder <stuart.yoder@freescale.com>,
Paul Mackerras <paulus@samba.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: in-kernel interrupt controller steering
Date: Mon, 4 Mar 2013 18:59:16 -0600 [thread overview]
Message-ID: <1362445156.16575.9@snotra> (raw)
In-Reply-To: <9A4D26CC-338A-418B-B2EC-7FCA9B7E99C4@suse.de> (from agraf@suse.de on Mon Mar 4 16:20:47 2013)
On 03/04/2013 04:20:47 PM, Alexander Graf wrote:
> Howdy,
>
> We just sat down to discuss the proposed XICS and MPIC interfaces and
> how we can take bits of each and create an interface that works for
> everyone. In this, it feels like we came to some conclusions. Some of
> which we already reached earlier, but forgot in between :).
>
> I hope I didn't forget too many pieces. Scott, Paul and Stuart,
> please add whatever you find missing in here.
It looks about right.
> 1) We need to set the generic interrupt type of the system before we
> create vcpus.
>
> This is a new ioctl that sets the overall system interrupt controller
> type to a specific model. This used so that when we create vcpus, we
> can create the appended "local interrupt controller" state without
> the actual interrupt controller device available yet. It is also used
> later to switch between interrupt controller implementations.
>
> This interrupt type is write once and frozen after the first vcpu got
> created.
Who is going to write up this patch?
> 2) Interrupt controllers (XICS / MPIC) get created by the device
> create api
>
> Getting and setting state of an interrupt controller also happens
> through this. Getting and setting state from vcpus happens through
> ONE_REG. Injecting interrupt happens through the normal irqchip ioctl
> (we probably need to encode the target device id in there somehow).
>
> This fits in nicely with a model where the interrupt controller is a
> proper QOM device in QEMU, since we can create it long after vcpus
> have been created.
>
>
> 3) We open code interrupt controller distinction
>
> There is no need for function pointers. We just switch() based on the
> type that gets set in the initial ioctl to determine which code to
> call. The retrieval of the irq type happens through a static inline
> function in a header that can return a constant number for
> configurations that don't support multiple in-kernel irqchips.
>
>
> 4) The device attribute API has separate groups that target different
> use cases
>
> Paul needs live migration, so he will implement device attributes
> that enable him to do live migration.
> Scott doesn't implement live migration, so his MPIC attribute groups
> are solely for debugging purposes today.
>
>
> 5) There is no need for atomic device control accessors today.
>
> Live migration happens with vcpus stopped, so we don't need to be
> atomic in the kernel <-> user space interface.
>
>
> 6) The device attribute API will keep read and write (get / set)
> accessors.
>
> There is no specific need for a generic "command" ioctl.
Gleb, is this OK? A bidirectional command accessor could be added
later if a need arises.
Will attributes still be renamed to "commands", even if the get/set
approach is retained?
> 7) Interrupt line connections to vcpus are implicit
>
> We don't explicitly mark which in-kernel irqchip interrupt line goes
> to which vcpu. This is done implicitly. If we see a need for it, we
> create a new irqchip device type that allows us to explicitly
> configure vcpu connections.
Are there any changes needed to the device control api patch (just
patch 1/6, not the rest of the patchset), besides Christoffer's request
to tone down one of the comments, and whatever the response is to the
questions in #6?
Should we add a "size" field in kvm_device, both for error checking and
to assist tools such as strace?
-Scott
next prev parent reply other threads:[~2013-03-05 0:59 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 22:20 in-kernel interrupt controller steering Alexander Graf
2013-03-05 0:59 ` Scott Wood [this message]
2013-03-05 5:44 ` Paul Mackerras
2013-03-05 15:25 ` Gleb Natapov
2013-03-06 9:40 ` Paolo Bonzini
2013-03-06 9:58 ` Gleb Natapov
2013-03-06 10:04 ` Alexander Graf
2013-03-06 10:12 ` Gleb Natapov
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:44 ` Paolo Bonzini
2013-03-06 11:46 ` Alexander Graf
2013-03-06 11:59 ` Gleb Natapov
2013-03-06 12:02 ` Alexander Graf
2013-03-06 12:14 ` Paolo Bonzini
2013-03-06 12:20 ` Alexander Graf
2013-03-06 12:28 ` Paolo Bonzini
2013-03-06 13:14 ` Gleb Natapov
2013-03-06 13:22 ` Alexander Graf
2013-03-06 13:56 ` Gleb Natapov
2013-03-06 14:03 ` Alexander Graf
2013-03-06 14:12 ` Paolo Bonzini
2013-03-06 14:30 ` Alexander Graf
2013-03-06 14:37 ` Paolo Bonzini
2013-03-06 14:40 ` Alexander Graf
2013-03-06 14:41 ` Gleb Natapov
2013-03-06 14:48 ` Alexander Graf
2013-03-06 14:59 ` Alexander Graf
2013-03-06 15:02 ` Paolo Bonzini
2013-03-06 15:30 ` Gleb Natapov
2013-03-06 16:33 ` Alexander Graf
2013-03-07 0:32 ` Paul Mackerras
2013-03-07 7:43 ` Paolo Bonzini
2013-03-06 13:41 ` Paolo Bonzini
2013-03-06 14:11 ` Gleb Natapov
2013-03-06 14:31 ` Alexander Graf
2013-03-06 18:46 ` Peter Maydell
2013-03-06 19:20 ` Alexander Graf
2013-03-06 11:44 ` Alexander Graf
2013-03-06 11:46 ` Paolo Bonzini
2013-03-06 11:47 ` Alexander Graf
2013-03-06 11:57 ` Paolo Bonzini
2013-03-06 11:58 ` Alexander Graf
2013-03-06 13:16 ` Gleb Natapov
2013-03-06 0:23 ` Benjamin Herrenschmidt
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=1362445156.16575.9@snotra \
--to=scottwood@freescale.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox