From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 00/26] ppc/xics: simplify ICS and ICP creation
Date: Tue, 28 Feb 2017 14:54:00 +1100 [thread overview]
Message-ID: <20170228035400.GA12655@umbus.fritz.box> (raw)
In-Reply-To: <1488205773-30436-1-git-send-email-clg@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 4887 bytes --]
On Mon, Feb 27, 2017 at 03:29:07PM +0100, Cédric Le Goater wrote:
>
> Hello,
>
> The goal behind this series is to simplify the XICS interface by
> moving back in the machine the way the ICS and ICP objects interact
> together. It's up to the machine to implement this "fabric" logic by
> providing a set of handlers of a QOM interface. These handlers are
> used to grab an ICS or an ICP object and also do irq resends. The idea
> was suggested by David Gibson.
>
>
> The patchset is organised as follow. It starts with a preliminary
> cleanup to get rid of the set_nr_irqs() and set_nr_servers()
> handlers. It also moves the creation of the ICS and ICP objects from
> the XICS object to the sPAPR machine. This simplifies the code
> significantly and prepares ground for future changes.
>
> As the sPAPR machine only makes use of a single ICS, we can store it
> at the machine level. This lets us remove dependencies on the list of
> ICS of the XICS object and simplify even more the code for the
> following changes.
>
> The QOM interface to interact with the ICS and ICP objects is then
> introduced. These are moved under the machine and cleanups are done
> accordingly.
>
> Finally, the XICSState classes are removed as they have been
> deprecated by the QOM interface.
>
>
> After the initial cleanups, which are rather big, each patch are small
> and simple. The make target 'check-qtest-ppc64' runs succesfully for
> each of them and so does migration of HV and TCG guests.
>
> The tree is available here :
>
> https://github.com/legoater/qemu/tree/ppc-2.9
There are some things I'd do differently, and I think there's room for
some future improvements, but this is certainly much better than where
we started. So I've merged this into ppc-for-2.9. Assuming my usual
tests pass, I hope to send a pull request shortly, to squeeze in just
in time for the soft freeze.
>
> Thanks,
>
> C.
>
>
>
> Caveats:
>
> - The kernel ICP file descriptor 'kernel_xics_fd' was made static to
> ease changes but that could be an issue. We could move it under the
> sPAPR machine if needed.
>
> Changes since v3:
>
> - reintroduced 'xics' backlinks to remove useless calls to
> qdev_get_machine()
> - moved InterruptStatsProvider to the sPAPR machine for a better
> output
> - moved move ics-simple post_load under the machine and removed the
> icp_resend() XICSFabric handler
>
> Changes since v2:
>
> - renamed QOM Interface to XICSFabric
>
> Cédric Le Goater (25):
> ppc/xics: fix ICP and ICS reset
> ppc/xics: remove set_nr_irqs() handler from XICSStateClass
> ppc/xics: remove set_nr_servers() handler from XICSStateClass
> ppc/xics: store the ICS object under the sPAPR machine
> ppc/xics: add an InterruptStatsProvider interface to ICS and ICP
> objects
> ppc/xics: introduce a XICSFabric QOM interface to handle ICSs
> ppc/xics: use the QOM interface under the sPAPR machine
> ppc/xics: use the QOM interface to get irqs
> ppc/xics: use the QOM interface to resend irqs
> ppc/xics: remove xics_find_source()
> ppc/xics: register the reset handler of ICS objects
> ppc/xics: remove the XICS list of ICS
> ppc/xics: extend the QOM interface to handle ICPs
> ppc/xics: move kernel_xics_fd out of KVMXICSState
> ppc/xics: simplify the cpu_setup() handler
> ppc/xics: move the cpu_setup() handler under the ICPState class
> ppc/xics: use the QOM interface to grab an ICP
> ppc/xics: simplify spapr_dt_xics() interface
> ppc/xics: register the reset handler of ICP objects
> ppc/xics: move the ICP array under the sPAPR machine
> ppc/xics: export the XICS init routines
> ppc/xics: remove the XICSState classes
> ppc/xics: move ics-simple post_load under the machine
> ppc/xics: move InterruptStatsProvider to the sPAPR machine
> ppc/xics: rename 'ICPState *' variables to 'icp'
>
> David Gibson (1):
> xics: XICS should not be a SysBusDevice
>
> hw/intc/xics.c | 461 +++++++++++++++++---------------------------
> hw/intc/xics_kvm.c | 184 +++++-------------
> hw/intc/xics_spapr.c | 128 +++---------
> hw/ppc/spapr.c | 134 ++++++++++---
> hw/ppc/spapr_cpu_core.c | 4 +-
> hw/ppc/spapr_events.c | 10 +-
> hw/ppc/spapr_pci.c | 10 +-
> hw/ppc/spapr_vio.c | 2 +-
> include/hw/pci-host/spapr.h | 2 +-
> include/hw/ppc/spapr.h | 5 +-
> include/hw/ppc/spapr_vio.h | 2 +-
> include/hw/ppc/xics.h | 97 ++++------
> 12 files changed, 424 insertions(+), 615 deletions(-)
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2017-02-28 3:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 14:29 [Qemu-devel] [PATCH v4 00/26] ppc/xics: simplify ICS and ICP creation Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 01/26] xics: XICS should not be a SysBusDevice Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 02/26] ppc/xics: fix ICP and ICS reset Cédric Le Goater
2017-02-28 2:00 ` David Gibson
2017-02-28 6:54 ` Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 03/26] ppc/xics: remove set_nr_irqs() handler from XICSStateClass Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 04/26] ppc/xics: remove set_nr_servers() " Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 05/26] ppc/xics: store the ICS object under the sPAPR machine Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 06/26] ppc/xics: add an InterruptStatsProvider interface to ICS and ICP objects Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 07/26] ppc/xics: introduce a XICSFabric QOM interface to handle ICSs Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 08/26] ppc/xics: use the QOM interface under the sPAPR machine Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 09/26] ppc/xics: use the QOM interface to get irqs Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 10/26] ppc/xics: use the QOM interface to resend irqs Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 11/26] ppc/xics: remove xics_find_source() Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 12/26] ppc/xics: register the reset handler of ICS objects Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 13/26] ppc/xics: remove the XICS list of ICS Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 14/26] ppc/xics: extend the QOM interface to handle ICPs Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 15/26] ppc/xics: move kernel_xics_fd out of KVMXICSState Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 16/26] ppc/xics: simplify the cpu_setup() handler Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 17/26] ppc/xics: move the cpu_setup() handler under the ICPState class Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 18/26] ppc/xics: use the QOM interface to grab an ICP Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 19/26] ppc/xics: simplify spapr_dt_xics() interface Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 20/26] ppc/xics: register the reset handler of ICP objects Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 21/26] ppc/xics: move the ICP array under the sPAPR machine Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 22/26] ppc/xics: export the XICS init routines Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 23/26] ppc/xics: remove the XICSState classes Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 24/26] ppc/xics: move ics-simple post_load under the machine Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 25/26] ppc/xics: move InterruptStatsProvider to the sPAPR machine Cédric Le Goater
2017-02-27 14:29 ` [Qemu-devel] [PATCH v4 26/26] ppc/xics: rename 'ICPState *' variables to 'icp' Cédric Le Goater
2017-02-28 3:54 ` David Gibson [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=20170228035400.GA12655@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).