[{"id":1765968,"web_url":"http://patchwork.ozlabs.org/comment/1765968/","msgid":"<333a9b48-d30d-03b9-83e4-52a24b2128f3@redhat.com>","list_archive_url":null,"date":"2017-09-10T16:30:25","subject":"Re: [Qemu-devel] [PATCH 1/4] ppc: change CPUPPCState access_type\n\tfrom int to uint8_t","submitter":{"id":66421,"url":"http://patchwork.ozlabs.org/api/people/66421/","name":"Laurent Vivier","email":"lvivier@redhat.com"},"content":"On 10/09/2017 16:37, Mark Cave-Ayland wrote:\n> This change was suggested by Alexey in advance of a subsequent commit which\n> adds access_type into vmstate_ppc_cpu.\n> \n> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n> ---\n>  target/ppc/cpu.h     |    4 ++--\n>  target/ppc/machine.c |    4 +++-\n>  2 files changed, 5 insertions(+), 3 deletions(-)\n> \n> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h\n> index 12f0949..59d1656 100644\n> --- a/target/ppc/cpu.h\n> +++ b/target/ppc/cpu.h\n> @@ -1010,8 +1010,8 @@ struct CPUPPCState {\n>      /* Next instruction pointer */\n>      target_ulong nip;\n>  \n> -    int access_type; /* when a memory exception occurs, the access\n> -                        type is stored here */\n> +    uint8_t access_type; /* when a memory exception occurs, the access\n> +                            type is stored here */\n\nI think this breaks TCG as we have:\n\ntarget/ppc/translate.c:\n\n     82 void ppc_translate_init(void)\n...\n    191 \n    192     cpu_access_type = tcg_global_mem_new_i32(cpu_env,\n    193                                              offsetof(CPUPPCState, access_type), \"access_type\");\n    194 \n    195     done_init = 1;\n    196 }\n\nit expects an int32_t (or int).\n\nThanks,\nLaurent","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>)","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=lvivier@redhat.com"],"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 3xqxPv5B18z9rxm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 02:30:59 +1000 (AEST)","from localhost ([::1]:53586 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 1dr58L-0000jX-RM\n\tfor incoming@patchwork.ozlabs.org; Sun, 10 Sep 2017 12:30:57 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:43058)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <lvivier@redhat.com>) id 1dr57y-0000jQ-SV\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:30:35 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <lvivier@redhat.com>) id 1dr57u-0006wu-Uq\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 12:30:34 -0400","from mx1.redhat.com ([209.132.183.28]:57232)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <lvivier@redhat.com>)\n\tid 1dr57u-0006wN-PM; Sun, 10 Sep 2017 12:30:30 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 76729205AA6;\n\tSun, 10 Sep 2017 16:30:28 +0000 (UTC)","from [10.36.116.60] (ovpn-116-60.ams2.redhat.com [10.36.116.60])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id C3D655C67F;\n\tSun, 10 Sep 2017 16:30:26 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 76729205AA6","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-devel@nongnu.org, \n\tqemu-ppc@nongnu.org, david@gibson.dropbear.id.au, aik@ozlabs.ru","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-2-git-send-email-mark.cave-ayland@ilande.co.uk>","From":"Laurent Vivier <lvivier@redhat.com>","Message-ID":"<333a9b48-d30d-03b9-83e4-52a24b2128f3@redhat.com>","Date":"Sun, 10 Sep 2017 18:30:25 +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":"<1505054255-2990-2-git-send-email-mark.cave-ayland@ilande.co.uk>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]);\n\tSun, 10 Sep 2017 16:30:29 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH 1/4] ppc: change CPUPPCState access_type\n\tfrom int to uint8_t","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>","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":1765983,"web_url":"http://patchwork.ozlabs.org/comment/1765983/","msgid":"<ddecc45a-0199-8e83-0575-1227ac1ca02c@ilande.co.uk>","list_archive_url":null,"date":"2017-09-10T18:00:13","subject":"Re: [Qemu-devel] [PATCH 1/4] ppc: change CPUPPCState access_type\n\tfrom int to uint8_t","submitter":{"id":12451,"url":"http://patchwork.ozlabs.org/api/people/12451/","name":"Mark Cave-Ayland","email":"mark.cave-ayland@ilande.co.uk"},"content":"On 10/09/17 17:30, Laurent Vivier wrote:\n\n> On 10/09/2017 16:37, Mark Cave-Ayland wrote:\n>> This change was suggested by Alexey in advance of a subsequent commit which\n>> adds access_type into vmstate_ppc_cpu.\n>>\n>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n>> ---\n>>  target/ppc/cpu.h     |    4 ++--\n>>  target/ppc/machine.c |    4 +++-\n>>  2 files changed, 5 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h\n>> index 12f0949..59d1656 100644\n>> --- a/target/ppc/cpu.h\n>> +++ b/target/ppc/cpu.h\n>> @@ -1010,8 +1010,8 @@ struct CPUPPCState {\n>>      /* Next instruction pointer */\n>>      target_ulong nip;\n>>  \n>> -    int access_type; /* when a memory exception occurs, the access\n>> -                        type is stored here */\n>> +    uint8_t access_type; /* when a memory exception occurs, the access\n>> +                            type is stored here */\n> \n> I think this breaks TCG as we have:\n> \n> target/ppc/translate.c:\n> \n>      82 void ppc_translate_init(void)\n> ...\n>     191 \n>     192     cpu_access_type = tcg_global_mem_new_i32(cpu_env,\n>     193                                              offsetof(CPUPPCState, access_type), \"access_type\");\n>     194 \n>     195     done_init = 1;\n>     196 }\n> \n> it expects an int32_t (or int).\n\nIndeed, yes. I'm really surprised this didn't break compilation or\nanything at runtime...\n\nHaving a further look I can't see any implementations for\ntcg_global_mem_new_u8() or tcg_gen_movi_u8() so changing this isn't a\nstraightforward type swap.\n\nAlexey, do you still think this is required?\n\n\nATB,\n\nMark.","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 3xqzRR2z2rz9s4s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 04:02:27 +1000 (AEST)","from localhost ([::1]:53807 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 1dr6Yr-0007EG-E7\n\tfor incoming@patchwork.ozlabs.org; Sun, 10 Sep 2017 14:02:25 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35674)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1dr6X3-0006S0-Kv\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 14:00:34 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1dr6X2-0007xf-Rn\n\tfor qemu-devel@nongnu.org; Sun, 10 Sep 2017 14:00:33 -0400","from chuckie.co.uk ([82.165.15.123]:32992\n\thelo=s16892447.onlinehome-server.info)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1dr6Wy-0007ui-FE; Sun, 10 Sep 2017 14:00:28 -0400","from host109-147-184-220.range109-147.btcentralplus.com\n\t([109.147.184.220] helo=[192.168.1.65])\n\tby s16892447.onlinehome-server.info with esmtpsa\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1dr6Wv-0006pA-4M; Sun, 10 Sep 2017 19:00:26 +0100"],"To":"Laurent Vivier <lvivier@redhat.com>, qemu-devel@nongnu.org,\n\tqemu-ppc@nongnu.org, david@gibson.dropbear.id.au, aik@ozlabs.ru","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-2-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<333a9b48-d30d-03b9-83e4-52a24b2128f3@redhat.com>","From":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<ddecc45a-0199-8e83-0575-1227ac1ca02c@ilande.co.uk>","Date":"Sun, 10 Sep 2017 19:00:13 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<333a9b48-d30d-03b9-83e4-52a24b2128f3@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-SA-Exim-Connect-IP":"109.147.184.220","X-SA-Exim-Mail-From":"mark.cave-ayland@ilande.co.uk","X-SA-Exim-Version":"4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000)","X-SA-Exim-Scanned":"Yes (on s16892447.onlinehome-server.info)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [fuzzy]","X-Received-From":"82.165.15.123","Subject":"Re: [Qemu-devel] [PATCH 1/4] ppc: change CPUPPCState access_type\n\tfrom int to uint8_t","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>","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>"}}]