From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 264B4EB64D7 for ; Wed, 28 Jun 2023 07:18:03 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEPQl-0002U1-Po; Wed, 28 Jun 2023 03:17:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEPQU-0002Qe-ED for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:17:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEPQS-0007q1-Od for qemu-devel@nongnu.org; Wed, 28 Jun 2023 03:17:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687936633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DM36D0IFIiMOVqzyPBl5t7nMw8/woLBi0aBrbWDf64c=; b=EwuaBq37NwGS7YV+DekwbboAK19vliqlk+5QhmfktsU3WPxcXE6zYE+SvPixP8jvfYK2Ue c95io97GI5WJUxMVZp4Q5lM+rsdPjwfS+qioLAM89azn48CnvuW2C+nSWJfNlxb83zW5HX LR9GJkRjuNqLhieFZYOp33gGZTXMGXY= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-3-p-6jNun4NVql8oTT5lXzNg-1; Wed, 28 Jun 2023 03:17:12 -0400 X-MC-Unique: p-6jNun4NVql8oTT5lXzNg-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-400a393268cso40930901cf.3 for ; Wed, 28 Jun 2023 00:17:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687936631; x=1690528631; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DM36D0IFIiMOVqzyPBl5t7nMw8/woLBi0aBrbWDf64c=; b=Cn9WiiVhknVjbgYznaVUxtivKd7/eSwTRnfm1+raSR1en7BKxNN0+GSuw0qPPByUix F35vb8tWOpuOh3ZP7tRhUiTG2+pWiwyul3I34ElprPrr6lwq8U3hZvi0eubc76D+25Nr beJ4f/mGiXQrOWIjOGTCptO2Mww7KPTmFwxjLy+JnXX3z/3KVaJ+vABxmjsDUvkMMKzM /DPLjrHEW2WVCmLWm2iNFCslPn4We0o5vLzaIqCQUi4WA+U8KNTAcqb3GdtOOV52m0fi 6cZPpBsGYLh6Map8fPOF5/Xhpc+yAvFux4kfoyzLVIutQN3JzAYXKYBVKE72ijQTCbMM diSg== X-Gm-Message-State: AC+VfDwlYTkoaHulkf3pgm29uofrEkQTeFtIuvyn+YuXZIgBNRjXdHm+ ShtAYgNzf/omCeU8IXw8Q5wXnfI/Tnw0kq1+/0oY4Ts5exmrZd3kHeLnBUMAjWR/99VCVzOCwoD yx//9aP6KJ7Qa/A4= X-Received: by 2002:ac8:5c01:0:b0:400:ab8e:5f82 with SMTP id i1-20020ac85c01000000b00400ab8e5f82mr7714640qti.52.1687936631363; Wed, 28 Jun 2023 00:17:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7RQUOxeZsHmT+Xjss8cuBFQJSkpiKVaA79UC07XA5TKtka7Q5uVH5VcnWDkk8V8Rf3WpnkQQ== X-Received: by 2002:ac8:5c01:0:b0:400:ab8e:5f82 with SMTP id i1-20020ac85c01000000b00400ab8e5f82mr7714618qti.52.1687936631077; Wed, 28 Jun 2023 00:17:11 -0700 (PDT) Received: from ?IPV6:2a01:e0a:280:24f0:576b:abc6:6396:ed4a? ([2a01:e0a:280:24f0:576b:abc6:6396:ed4a]) by smtp.gmail.com with ESMTPSA id x4-20020a05622a000400b003f7a54fa72fsm5583088qtw.0.2023.06.28.00.17.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Jun 2023 00:17:10 -0700 (PDT) Message-ID: <2bc2ca94-c1ba-a9de-0b81-6f9d3d4ad333@redhat.com> Date: Wed, 28 Jun 2023 09:17:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 0/4] target/ppc: Catch invalid real address accesses Content-Language: en-US To: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , Mark Cave-Ayland , Howard Spoelstra Cc: Peter Maydell , Nicholas Piggin , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Christophe Leroy , BALATON Zoltan , Harsh Prateek Bora , Daniel Henrique Barboza , David Gibson , Greg Kurz , Frederic Barrat , Richard Henderson References: <20230623081953.290875-1-npiggin@gmail.com> <47197a73-b106-47d5-9502-393a6bdc9945@redhat.com> <966b3fce-512d-f122-e76e-efded0db9731@kaod.org> <8e3010d8-9ca7-c834-3348-e11060c53f8a@ilande.co.uk> <840c34e7-0f5c-89fa-2dfa-f8de3da4d643@ilande.co.uk> <7e596b48-c631-34d5-2b63-0aac1922de93@kaod.org> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= In-Reply-To: <7e596b48-c631-34d5-2b63-0aac1922de93@kaod.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.129.124; envelope-from=clegoate@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.103, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org >>>> qemu-system-ppc.exe -M mac99,via=pmu -cdrom C:\mac-iso\9.2.2.iso -boot d -L pc-bios >>>> crashes Mac OS with an address error. (with unpatched and patched builds). >>> >>> Same on Linux. I get an invalid opcode. QEMU 7.2 work fine though. >>> >>> C. >> >> That certainly shouldn't happen, and if it worked in 7.2 then there's definitely a regression which has crept in there somewhere. I'll try and bisect this at some point soon, but feel free to try and beat me ;) > > bisect points to : > > commit e506ad6a05c806bbef460a7d014a184ff8d707a6 > Author: Richard Henderson > Date:   Mon Mar 6 04:30:11 2023 +0300 > >     accel/tcg: Pass last not end to tb_invalidate_phys_range >     Pass the address of the last byte to be changed, rather than >     the first address past the last byte.  This avoids overflow >     when the last page of the address space is involved. >     Reviewed-by: Philippe Mathieu-Daudé >     Signed-off-by: Richard Henderson > >  include/exec/exec-all.h   |  2 +- >  accel/tcg/tb-maint.c      | 31 ++++++++++++++++--------------- >  accel/tcg/translate-all.c |  2 +- >  accel/tcg/user-exec.c     |  2 +- >  softmmu/physmem.c         |  2 +- >  5 files changed, 20 insertions(+), 19 deletions(-) > > > I think the instruction is fnmadds. Needs more digging. the invalid opcode is just a symptom of something bad happening. C.