[{"id":1770861,"web_url":"http://patchwork.ozlabs.org/comment/1770861/","msgid":"<20170919073615.GN27153@umbus>","list_archive_url":null,"date":"2017-09-19T07:36:15","subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Mon, Sep 11, 2017 at 07:12:23PM +0200, Cédric Le Goater wrote:\n> The XIVE interrupt presenter exposes a set of Thread Interrupt\n> Management Areas, also called rings, one per different level of\n> privilege (four in all). This area is used to handle priority\n> management and interrupt acknowledgment among other things.\n> \n> We extend the ICPState object with a cache of the register data for\n> XIVE. The integration with the sPAPR machine is much easier and we\n> need a common framework to switch from one controller model to\n> another: XICS <-> XIVE.\n\nThis sounds like an even worse idea than referencing the ICS state.\nThe TIMA really needs to be managed by a different object than the ICP.\n\n> The next patch will introduce the MMIO handlers to interact with the\n> TIMA, OS only, which is required for the sPAPR support.\n> \n> Signed-off-by: Cédric Le Goater <clg@kaod.org>\n> ---\n>  hw/intc/xics.c        | 4 ++++\n>  include/hw/ppc/xics.h | 6 ++++++\n>  2 files changed, 10 insertions(+)\n> \n> diff --git a/hw/intc/xics.c b/hw/intc/xics.c\n> index a84ba51ad8ff..927d4fec966a 100644\n> --- a/hw/intc/xics.c\n> +++ b/hw/intc/xics.c\n> @@ -274,6 +274,7 @@ static const VMStateDescription vmstate_icp_server = {\n>          VMSTATE_UINT32(xirr, ICPState),\n>          VMSTATE_UINT8(pending_priority, ICPState),\n>          VMSTATE_UINT8(mfrr, ICPState),\n> +        VMSTATE_UINT8_ARRAY(tima, ICPState, 0x40),\n>          VMSTATE_END_OF_LIST()\n>      },\n>  };\n> @@ -293,6 +294,7 @@ static void icp_reset(void *dev)\n>      if (icpc->reset) {\n>          icpc->reset(icp);\n>      }\n> +    memset(icp->tima, 0, sizeof(icp->tima));\n>  }\n>  \n>  static void icp_realize(DeviceState *dev, Error **errp)\n> @@ -343,6 +345,8 @@ static void icp_realize(DeviceState *dev, Error **errp)\n>          icpc->realize(icp, errp);\n>      }\n>  \n> +    icp->tima_os = &icp->tima[0x10];\n> +\n>      qemu_register_reset(icp_reset, dev);\n>      vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);\n>  }\n> diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h\n> index 28d248abad61..c835997303c4 100644\n> --- a/include/hw/ppc/xics.h\n> +++ b/include/hw/ppc/xics.h\n> @@ -83,6 +83,12 @@ struct ICPState {\n>      qemu_irq output;\n>  \n>      XICSFabric *xics;\n> +\n> +    /* XIVE section */\n> +#define XIVE_TM_RING_COUNT 4\n> +\n> +    uint8_t tima[XIVE_TM_RING_COUNT * 0x10];\n> +    uint8_t *tima_os;\n>  };\n>  \n>  #define ICP_PROP_XICS \"xics\"","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"N9wOj74Y\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxKZW5nx9z9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 20:57:07 +1000 (AEST)","from localhost ([::1]:41460 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duGDB-0000q2-RN\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 06:57:05 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51212)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1duFtX-0001Gk-8L\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 06:36:50 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1duFtU-0002u4-Cv\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 06:36:47 -0400","from ozlabs.org ([2401:3900:2:1::2]:50233)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1duFtT-0002pa-UG; Tue, 19 Sep 2017 06:36:44 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xxK6q1Fbwz9t3f; Tue, 19 Sep 2017 20:36:34 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505817395;\n\tbh=YrYAkDwn5cetOpUaibGNt9TFfKcFnauN/TZUJgSg1qg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=N9wOj74Y19r/UWnDJ2cEZ3wmSTqsWdRKZ22IV461/7nOG9CLtafa3LiW8iMzx/RR0\n\tr2o2nXPR+OBhondKvWRuLFacOMSuoKpPmgEFvOoPi9PRgzyZBWNOS9T+900y7Ous40\n\tgXctqMnZafha+/QxFY5yF7bd+nosB7OdDV5nL+68=","Date":"Tue, 19 Sep 2017 17:36:15 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"=?iso-8859-1?q?C=E9dric?= Le Goater <clg@kaod.org>","Message-ID":"<20170919073615.GN27153@umbus>","References":"<20170911171235.29331-1-clg@kaod.org>\n\t<20170911171235.29331-10-clg@kaod.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"aIbcA3MSwnGacr4f\"","Content-Disposition":"inline","In-Reply-To":"<20170911171235.29331-10-clg@kaod.org>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2401:3900:2:1::2","Subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1771314,"web_url":"http://patchwork.ozlabs.org/comment/1771314/","msgid":"<52f31e9e-f7de-ae27-a8a6-bd2f37666659@kaod.org>","list_archive_url":null,"date":"2017-09-19T19:28:45","subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","submitter":{"id":68548,"url":"http://patchwork.ozlabs.org/api/people/68548/","name":"Cédric Le Goater","email":"clg@kaod.org"},"content":"On 09/19/2017 09:36 AM, David Gibson wrote:\n> On Mon, Sep 11, 2017 at 07:12:23PM +0200, Cédric Le Goater wrote:\n>> The XIVE interrupt presenter exposes a set of Thread Interrupt\n>> Management Areas, also called rings, one per different level of\n>> privilege (four in all). This area is used to handle priority\n>> management and interrupt acknowledgment among other things.\n>>\n>> We extend the ICPState object with a cache of the register data for\n>> XIVE. The integration with the sPAPR machine is much easier and we\n>> need a common framework to switch from one controller model to\n>> another: XICS <-> XIVE.\n> \n> This sounds like an even worse idea than referencing the ICS state.\n\nok ok.\n\n> The TIMA really needs to be managed by a different object than the ICP.\n\nlike an array under the machine indexed by the cpu index ? \n\nat some point, we will need to :\n\n    PowerPCCPU *cpu = POWERPC_CPU(current_cpu);\n    ICPState *icp = ICP(cpu->intc);\n\nand \n\n    icp = xics_icp_get(xive->ics->xics, target);\n\n\nisn't the cpu->intc pointer  the best option to hold that information ? \nand it is migrated.\n\nC. \n\n\n>> The next patch will introduce the MMIO handlers to interact with the\n>> TIMA, OS only, which is required for the sPAPR support.\n>>\n>> Signed-off-by: Cédric Le Goater <clg@kaod.org>\n>> ---\n>>  hw/intc/xics.c        | 4 ++++\n>>  include/hw/ppc/xics.h | 6 ++++++\n>>  2 files changed, 10 insertions(+)\n>>\n>> diff --git a/hw/intc/xics.c b/hw/intc/xics.c\n>> index a84ba51ad8ff..927d4fec966a 100644\n>> --- a/hw/intc/xics.c\n>> +++ b/hw/intc/xics.c\n>> @@ -274,6 +274,7 @@ static const VMStateDescription vmstate_icp_server = {\n>>          VMSTATE_UINT32(xirr, ICPState),\n>>          VMSTATE_UINT8(pending_priority, ICPState),\n>>          VMSTATE_UINT8(mfrr, ICPState),\n>> +        VMSTATE_UINT8_ARRAY(tima, ICPState, 0x40),\n>>          VMSTATE_END_OF_LIST()\n>>      },\n>>  };\n>> @@ -293,6 +294,7 @@ static void icp_reset(void *dev)\n>>      if (icpc->reset) {\n>>          icpc->reset(icp);\n>>      }\n>> +    memset(icp->tima, 0, sizeof(icp->tima));\n>>  }\n>>  \n>>  static void icp_realize(DeviceState *dev, Error **errp)\n>> @@ -343,6 +345,8 @@ static void icp_realize(DeviceState *dev, Error **errp)\n>>          icpc->realize(icp, errp);\n>>      }\n>>  \n>> +    icp->tima_os = &icp->tima[0x10];\n>> +\n>>      qemu_register_reset(icp_reset, dev);\n>>      vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);\n>>  }\n>> diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h\n>> index 28d248abad61..c835997303c4 100644\n>> --- a/include/hw/ppc/xics.h\n>> +++ b/include/hw/ppc/xics.h\n>> @@ -83,6 +83,12 @@ struct ICPState {\n>>      qemu_irq output;\n>>  \n>>      XICSFabric *xics;\n>> +\n>> +    /* XIVE section */\n>> +#define XIVE_TM_RING_COUNT 4\n>> +\n>> +    uint8_t tima[XIVE_TM_RING_COUNT * 0x10];\n>> +    uint8_t *tima_os;\n>>  };\n>>  \n>>  #define ICP_PROP_XICS \"xics\"\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxXxq3HWwz9s7p\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 05:29:35 +1000 (AEST)","from localhost ([::1]:45004 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duOD7-0006w3-IC\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 15:29:33 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34234)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1duOCg-0006uW-C1\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 15:29:08 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1duOCb-00007I-Se\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 15:29:06 -0400","from 2.mo2.mail-out.ovh.net ([188.165.53.149]:52696)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <clg@kaod.org>) id 1duOCb-00006P-ME\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 15:29:01 -0400","from player157.ha.ovh.net (b9.ovh.net [213.186.33.59])\n\tby mo2.mail-out.ovh.net (Postfix) with ESMTP id 7A82CAC0E2\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 21:29:00 +0200 (CEST)","from zorba.kaod.org (LFbn-1-2231-173.w90-76.abo.wanadoo.fr\n\t[90.76.52.173]) (Authenticated sender: postmaster@kaod.org)\n\tby player157.ha.ovh.net (Postfix) with ESMTPSA id E4743500087;\n\tTue, 19 Sep 2017 21:28:50 +0200 (CEST)"],"To":"David Gibson <david@gibson.dropbear.id.au>","References":"<20170911171235.29331-1-clg@kaod.org>\n\t<20170911171235.29331-10-clg@kaod.org> <20170919073615.GN27153@umbus>","From":"=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>","Message-ID":"<52f31e9e-f7de-ae27-a8a6-bd2f37666659@kaod.org>","Date":"Tue, 19 Sep 2017 21:28:45 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170919073615.GN27153@umbus>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","X-Ovh-Tracer-Id":"8069043157825391480","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelledrheejgddugedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"188.165.53.149","Subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1773493,"web_url":"http://patchwork.ozlabs.org/comment/1773493/","msgid":"<20170922105855.GO4998@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-22T10:58:55","subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Tue, Sep 19, 2017 at 09:28:45PM +0200, Cédric Le Goater wrote:\n> On 09/19/2017 09:36 AM, David Gibson wrote:\n> > On Mon, Sep 11, 2017 at 07:12:23PM +0200, Cédric Le Goater wrote:\n> >> The XIVE interrupt presenter exposes a set of Thread Interrupt\n> >> Management Areas, also called rings, one per different level of\n> >> privilege (four in all). This area is used to handle priority\n> >> management and interrupt acknowledgment among other things.\n> >>\n> >> We extend the ICPState object with a cache of the register data for\n> >> XIVE. The integration with the sPAPR machine is much easier and we\n> >> need a common framework to switch from one controller model to\n> >> another: XICS <-> XIVE.\n> > \n> > This sounds like an even worse idea than referencing the ICS state.\n> \n> ok ok.\n> \n> > The TIMA really needs to be managed by a different object than the ICP.\n> \n> like an array under the machine indexed by the cpu index ? \n\nOr individual TIMA objects which the cpus point to using their intc\npointers.\n\n> at some point, we will need to :\n> \n>     PowerPCCPU *cpu = POWERPC_CPU(current_cpu);\n>     ICPState *icp = ICP(cpu->intc);\n> \n> and \n> \n>     icp = xics_icp_get(xive->ics->xics, target);\n> \n> \n> isn't the cpu->intc pointer  the best option to hold that information ? \n> and it is migrated.\n\nNo, it shouldn't be migrated.  It's set up during machine construction.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"FfZtZ3dp\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xz9yB3X9fz9sP1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 21:20:34 +1000 (AEST)","from localhost ([::1]:58058 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dvM0W-0004k9-Hv\n\tfor incoming@patchwork.ozlabs.org; Fri, 22 Sep 2017 07:20:32 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37844)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dvLzr-0004i8-D3\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 07:19:52 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dvLzo-0007DZ-6W\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 07:19:51 -0400","from ozlabs.org ([103.22.144.67]:52559)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dvLzn-0007Aa-25; Fri, 22 Sep 2017 07:19:48 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xz9xC29fRz9t3h; Fri, 22 Sep 2017 21:19:43 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1506079183;\n\tbh=/F1KZbk5Nw/abraerkQ0czb2pvFBwBIoI29UBMpCpos=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=FfZtZ3dpYyNFQiQvhyKzjRhl6zVgnCeh2ve0Xq+FVmNRG3WeMfrnUF3OQqWfyNN3z\n\thHW8TWwyOpR8DtRfJmjz0twTYhu4CT9bMdZCyL1aHfBuDKX0OxcICHALNHJI7bthFg\n\trSaoWK/zEP+PfGrAKBgs5UBPeUSQKqmdRumS76js=","Date":"Fri, 22 Sep 2017 20:58:55 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"=?iso-8859-1?q?C=E9dric?= Le Goater <clg@kaod.org>","Message-ID":"<20170922105855.GO4998@umbus.fritz.box>","References":"<20170911171235.29331-1-clg@kaod.org>\n\t<20170911171235.29331-10-clg@kaod.org>\n\t<20170919073615.GN27153@umbus>\n\t<52f31e9e-f7de-ae27-a8a6-bd2f37666659@kaod.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"Ck22u5fw4m2k6hx2\"","Content-Disposition":"inline","In-Reply-To":"<52f31e9e-f7de-ae27-a8a6-bd2f37666659@kaod.org>","User-Agent":"Mutt/1.9.0 (2017-09-02)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"103.22.144.67","Subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1773552,"web_url":"http://patchwork.ozlabs.org/comment/1773552/","msgid":"<b28520f1-4431-8cf6-1709-5fad3889e6df@kaod.org>","list_archive_url":null,"date":"2017-09-22T12:27:59","subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","submitter":{"id":68548,"url":"http://patchwork.ozlabs.org/api/people/68548/","name":"Cédric Le Goater","email":"clg@kaod.org"},"content":"On 09/22/2017 12:58 PM, David Gibson wrote:\n> On Tue, Sep 19, 2017 at 09:28:45PM +0200, Cédric Le Goater wrote:\n>> On 09/19/2017 09:36 AM, David Gibson wrote:\n>>> On Mon, Sep 11, 2017 at 07:12:23PM +0200, Cédric Le Goater wrote:\n>>>> The XIVE interrupt presenter exposes a set of Thread Interrupt\n>>>> Management Areas, also called rings, one per different level of\n>>>> privilege (four in all). This area is used to handle priority\n>>>> management and interrupt acknowledgment among other things.\n>>>>\n>>>> We extend the ICPState object with a cache of the register data for\n>>>> XIVE. The integration with the sPAPR machine is much easier and we\n>>>> need a common framework to switch from one controller model to\n>>>> another: XICS <-> XIVE.\n>>>\n>>> This sounds like an even worse idea than referencing the ICS state.\n>>\n>> ok ok.\n>>\n>>> The TIMA really needs to be managed by a different object than the ICP.\n>>\n>> like an array under the machine indexed by the cpu index ? \n> \n> Or individual TIMA objects which the cpus point to using their intc\n> pointers.\n\nah ok. We really are splitting the two worlds.\n\nC.\n \n>> at some point, we will need to :\n>>\n>>     PowerPCCPU *cpu = POWERPC_CPU(current_cpu);\n>>     ICPState *icp = ICP(cpu->intc);\n>>\n>> and \n>>\n>>     icp = xics_icp_get(xive->ics->xics, target);\n>>\n>>\n>> isn't the cpu->intc pointer  the best option to hold that information ? \n>> and it is migrated.\n> \n> No, it shouldn't be migrated.  It's set up during machine construction.\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xzCkS4tnMz9t16\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 22:40:32 +1000 (AEST)","from localhost ([::1]:58657 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dvNFu-0006dP-51\n\tfor incoming@patchwork.ozlabs.org; Fri, 22 Sep 2017 08:40:30 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:55006)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1dvN48-0004vw-RO\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 08:28:22 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1dvN3u-0003jn-V0\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 08:28:20 -0400","from 8.mo179.mail-out.ovh.net ([46.105.75.26]:54164)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <clg@kaod.org>) id 1dvN3u-0003jG-OS\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 08:28:06 -0400","from player690.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo179.mail-out.ovh.net (Postfix) with ESMTP id 3F4C064D8F\n\tfor <qemu-devel@nongnu.org>; Fri, 22 Sep 2017 14:28:05 +0200 (CEST)","from zorba.kaod.org (LFbn-1-2231-173.w90-76.abo.wanadoo.fr\n\t[90.76.52.173]) (Authenticated sender: postmaster@kaod.org)\n\tby player690.ha.ovh.net (Postfix) with ESMTPSA id 0C7ED54006D;\n\tFri, 22 Sep 2017 14:28:00 +0200 (CEST)"],"To":"David Gibson <david@gibson.dropbear.id.au>","References":"<20170911171235.29331-1-clg@kaod.org>\n\t<20170911171235.29331-10-clg@kaod.org> <20170919073615.GN27153@umbus>\n\t<52f31e9e-f7de-ae27-a8a6-bd2f37666659@kaod.org>\n\t<20170922105855.GO4998@umbus.fritz.box>","From":"=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>","Message-ID":"<b28520f1-4431-8cf6-1709-5fad3889e6df@kaod.org>","Date":"Fri, 22 Sep 2017 14:27:59 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170922105855.GO4998@umbus.fritz.box>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","X-Ovh-Tracer-Id":"132011766647327608","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelledrieeggdehgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"46.105.75.26","Subject":"Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the\n\tinterrupt presenter model for XIVE","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]