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 0C1E6C433F5 for ; Wed, 15 Dec 2021 16:54:53 +0000 (UTC) Received: from localhost ([::1]:48382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxXYK-00036p-EA for qemu-devel@archiver.kernel.org; Wed, 15 Dec 2021 11:54:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxXRH-0001oy-8L; Wed, 15 Dec 2021 11:47:36 -0500 Received: from smtpout4.mo529.mail-out.ovh.net ([217.182.185.173]:60693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxXRC-0001NW-2m; Wed, 15 Dec 2021 11:47:31 -0500 Received: from mxplan5.mail.ovh.net (unknown [10.109.156.124]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 09DC4D2258D5; Wed, 15 Dec 2021 17:47:10 +0100 (CET) Received: from kaod.org (37.59.142.102) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Wed, 15 Dec 2021 17:47:09 +0100 Authentication-Results: garm.ovh; auth=pass (GARM-102R004c9586c5e-13f8-4386-9a6a-a050da366ad7, DB2000250E14A505ED1736C7348301D5E40ED0AA) smtp.auth=clg@kaod.org X-OVh-ClientIp: 90.76.172.47 Message-ID: Date: Wed, 15 Dec 2021 17:47:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [RFC PATCH v2 0/4] QEMU/openbios: PPC Software TLB support in the G4 family Content-Language: en-US To: Fabiano Rosas , References: <20211130230123.781844-1-farosas@linux.ibm.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= In-Reply-To: <20211130230123.781844-1-farosas@linux.ibm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [37.59.142.102] X-ClientProxiedBy: DAG6EX2.mxp5.local (172.16.2.52) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 66be6796-2f44-4adc-9fc2-d55f69a00e42 X-Ovh-Tracer-Id: 2021271810133560111 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvuddrledvgdelgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgihesthejredttdefjeenucfhrhhomhepveorughrihgtpgfnvggpifhorghtvghruceotghlgheskhgrohgurdhorhhgqeenucggtffrrghtthgvrhhnpefhhfelgeeukedtteffvdffueeiuefgkeekleehleetfedtgfetffefheeugeelheenucfkpheptddrtddrtddrtddpfeejrdehledrudegvddruddtvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepmhigphhlrghnhedrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegtlhhgsehkrghougdrohhrghdprhgtphhtthhopehrihgthhgrrhgurdhhvghnuggvrhhsohhnsehlihhnrghrohdrohhrgh Received-SPF: pass client-ip=217.182.185.173; envelope-from=clg@kaod.org; helo=smtpout4.mo529.mail-out.ovh.net X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-1.64, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Cc: richard.henderson@linaro.org, danielhb413@gmail.com, mark.cave-ayland@ilande.co.uk, qemu-ppc@nongnu.org, openbios@openbios.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 12/1/21 00:01, Fabiano Rosas wrote: > Hi all, > > Recap: > > - QEMU enables 7450 SW TLB search by default; > - OpenBIOS does not know about SW TLB (vectors 0x1000, 0x1100, 0x1200); > - OpenBIOS does not know about 7450s PVRs. > > Proposed solutions: > > a) find another firmware/guest OS code that supports the feature; > > b) implement the switching of the feature in QEMU and have the guest > code enable it only when supported. That would take some fiddling with > the MMU code to: merge POWERPC_MMU_SOFT_74xx into POWERPC_MMU_32B, > check the HID0[STEN] bit, figure out how to switch from HW TLB miss to > SW TLB miss on demand, block access to the TLBMISS register (and > others) when the feature is off, and so on; > > c) leave the feature enabled in QEMU and implement the software TLB > miss handlers in openbios. The UM provides sample code, so this is > easy; > > d) remove support for software TLB search for the 7450 family and > switch the cpus to the POWERPC_MMU_32B model. This is by far the > easiest solution, but could cause problems for any (which?) guest OS > code that actually uses the feature. All of the existing code for the > POWERPC_MMU_SOFT_74xx MMU model would probably be removed since it > would be dead code then; > Applied patch 1-3 to ppc-next. Thanks, C.