From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3dfC-0008Nb-6e for qemu-devel@nongnu.org; Tue, 01 Dec 2015 00:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3df8-0001Dh-4J for qemu-devel@nongnu.org; Tue, 01 Dec 2015 00:39:42 -0500 Date: Tue, 1 Dec 2015 16:13:56 +1100 From: David Gibson Message-ID: <20151201051356.GT31343@voom.redhat.com> References: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> <1447201710-10229-38-git-send-email-benh@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wiiWofWi8Et/oezL" Content-Disposition: inline In-Reply-To: <1447201710-10229-38-git-send-email-benh@kernel.crashing.org> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 37/77] ppc/xics: Split ICS into base class and "simple" implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org --wiiWofWi8Et/oezL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 11, 2015 at 11:27:50AM +1100, Benjamin Herrenschmidt wrote: > The existing implementation becomes the "ics-simple" subclass of ICS, > so there should be no change in behaviour for SPAPR. >=20 > This will allow different implementations for the source controllers > such as the MSI support of PHB3 on Power8 which uses in-memory state > tables for example. >=20 > Signed-off-by: Benjamin Herrenschmidt [snip] > diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c > index fc331d8..f7d444a 100644 > --- a/hw/intc/xics_spapr.c > +++ b/hw/intc/xics_spapr.c > @@ -112,7 +112,7 @@ static void rtas_set_xive(PowerPCCPU *cpu, sPAPRMachi= neState *spapr, > uint32_t nret, target_ulong rets) > { > ICSState *ics =3D QLIST_FIRST(&spapr->xics->ics); > - uint32_t nr, server, priority; > + uint32_t nr, src_no, server, priority; Nit: elsewhere I use srcno without a _ for this value. [snip] > diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h > index 5acb329..93a627b 100644 > --- a/include/hw/ppc/xics.h > +++ b/include/hw/ppc/xics.h > @@ -116,6 +116,9 @@ struct ICPState { > #define TYPE_ICS "ics" > #define ICS(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS) > =20 > +#define TYPE_ICS_SIMPLE "ics-simple" > +#define ICS_SIMPLE(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS_SIMPLE) Again, changing type names will break migration, I believe. So better to leave this as ics and add "ics-base" and "ics-native" or similar. > + > #define TYPE_KVM_ICS "icskvm" > #define KVM_ICS(obj) OBJECT_CHECK(ICSState, (obj), TYPE_KVM_ICS) > =20 > @@ -129,6 +132,9 @@ struct ICSStateClass { > =20 > void (*pre_save)(ICSState *s); > int (*post_load)(ICSState *s, int version_id); > + void (*reject)(ICSState *s, uint32_t irq); > + void (*resend)(ICSState *s); > + void (*eoi)(ICSState *s, uint32_t irq); > }; > =20 > struct ICSState { > @@ -184,10 +190,10 @@ uint32_t icp_accept(ICPState *ss); > uint32_t icp_ipoll(ICPState *ss, uint32_t *mfrr); > void icp_eoi(XICSState *icp, int server, uint32_t xirr); > =20 > -void ics_write_xive(ICSState *ics, int nr, int server, > - uint8_t priority, uint8_t saved_priority); > +void ics_simple_write_xive(ICSState *ics, int nr, int server, > + uint8_t priority, uint8_t saved_priority); > =20 > -void ics_set_irq_type(ICSState *ics, int srcno, bool lsi); > +void ics_simple_set_irq_type(ICSState *ics, int srcno, bool lsi); > =20 > void xics_set_nr_servers(XICSState *icp, uint32_t nr_servers, Error **er= rp); > ICSState *xics_find_source(XICSState *icp, int irq); --=20 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 --wiiWofWi8Et/oezL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWXSyUAAoJEGw4ysog2bOSYbgP/R6hKjgL8eYSc+4N348vQgdm NqwJ0CH8qGU2JFv3ElgrSSKuXjLAzdniH3qYKODOcm/cpXdAhu8WY9UsQPX00EI3 Vf3nF1EUQJ+vTl6aGLLyszUeV5Ix8eJhg30D82xG003BCqS15po8bIWA9KMZTovK T6yRsd5eR4AQ5IZp67E5OQHdNgXLLT28ogGZCVFvCaLN+tTav8xXN5N2KSKCScJR hOboE0z91XujI00IUToe+u6taLk9bnZi+JuK3QhOSVL8wLZrSbQ3q9RODWPJqQFQ bGpsMXEuoWm8X2XbUit80k67QC+/JggrA3jH4ocACGsv9NBhEW834779/70XgA0H RmzaAAaoXVF4QVKrf6HYgQ3xzlKMA/N1zLypAqgFOIh57RWwqf1TI0DukHeRuepd QHnWfEaRm4UBZSMNcYeP9yN8eyJ2oCNkVWlF/lLpul/UYv+RklclLlMUpem69hhB sTBkKDl12rCohXr5mklXUt21sAfTMAszYnpNq5wMZ/W8TKN78dG3RT+vKG3PDXbt /bR2Tu2HaPTTk7dx5/5QO9hz5Bbrwqtnb0m3Dssx5zlxCfQILBgYgmLTjaM1AycY gd9gSKvlZepLBZivhpd5jXDr8hr91UeiK4RiuALbikyHnzMpAlkb7D1jpJq1Qh4H nIO94mtUISqqOK1ZPCam =jhHp -----END PGP SIGNATURE----- --wiiWofWi8Et/oezL--