Received: from eggs.gnu.org ([208.118.235.92]:54885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szaar-0002ul-3v for qemu-devel@nongnu.org; Thu, 09 Aug 2012 17:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Szaap-0004O2-Gp for qemu-devel@nongnu.org; Thu, 09 Aug 2012 17:48:37 -0400 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <50242F63.1060706@freescale.com> Date: Thu, 9 Aug 2012 23:48:29 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <3BACCD75-C790-4504-8A57-08EACCD6479D@suse.de> References: <1340492856-21126-1-git-send-email-agraf@suse.de> <1340492856-21126-57-git-send-email-agraf@suse.de> <61CF2032-367D-4F3A-A845-BB92B35C334B@suse.de> <5022EAE0.7040103@freescale.com> <50242286.4070302@freescale.com> <60425312-68E6-4052-8B0C-256A6D59B444@suse.de> <50242466.4020508@freescale.com> <5024278E.5020404@freescale.com> <50242B76.90000@freescale.com> <50242F63.1060706@freescale.com> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 56/72] PPC: e500: Use new MPIC dt format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Scott Wood Cc: qemu-ppc Mailing List , qemu-devel qemu-devel On 09.08.2012, at 23:45, Scott Wood wrote: > On 08/09/2012 04:36 PM, Alexander Graf wrote: >>=20 >> On 09.08.2012, at 23:28, Scott Wood wrote: >>=20 >>> On 08/09/2012 04:19 PM, Alexander Graf wrote: >>>>=20 >>>> On 09.08.2012, at 23:11, Scott Wood wrote: >>>>> ...so that we can run new kernels on old QEMUs, not just the other = way >>>>> around. >>>>=20 >>>> Why would we bother? >>>=20 >>> Why not? It's much easier than the other way around -- it's just an >>> extra string in the device tree. It's up to someone who cares to = put >>> relevant workarounds in the kernel. >>>=20 >>> Compare it to real hardware, where we expect new kernels to run on = old >>> hardware but not the other way around, and where we expect to be = able to >>> identify the specific hardware we're running on (there are version >>> registers in the MPIC for identifying real hardware version, but not >>> QEMU implementation version). >>>=20 >>> If we had this, we could have avoided needing to postpone fsl,mpic, >>> because I think the Linux patch using large vectors hasn't been = released >>> yet, so we could have added a check for qemu,1.2-fsl-mpic and known = that >>> it didn't include large vectors. I guess it's still not too late... >>=20 >> I'm not sure I like the idea. Usually, in the real hardware world, >> erratas happen on the board level, right? >=20 > More often on a chip revision level. >=20 >> So we could have a >> compatible "qemu,1.2-e500" in the board compatible. But having one >> for every device sounds a bit too much to me. >=20 > But not every device is necessarily emulated. >=20 >> Also, not implementing large vectors essentially mean we don't >> emulate an fsl,mpic well. That's fine, let's just not tell the guest >> we do. I don't think we should teach Linux about broken emulation. >> I'd rather see the emulation fixed. >=20 > My point is even after we add large vector support, we probably aren't > 100% emulating an FSL MPIC. >=20 >>> It would also be useful for overriding SVR checks in drivers (for = errata >>> and such), which can get particularly awkward if you mix some = emulated >>> devices with some directly assigned devices (no one SVR will be = right >>> for all of them, even if all the emulated devices faithfully emulate = one >>> SoC's behavior). >>=20 >> Hmm. Yes. Maybe it'd be good to just never check SVR but instead = always rely on dt properties? >=20 > That assumes we know about the problem when the device tree is created > (we like to maintain compatibility with old trees), and that we = maintain > the information accurately in all trees (which means u-boot fixups, = and > compatibility is even more of an issue there, because some people = don't > like upgrading u-boot in the field). The only practical way to do = that > would be to put the SVR in each device tree node, which seems like > overkill. At least the QEMU compatibles only affect QEMU and target > code that specifically wants to improve its QEMU compatibility, rather > than wait for QEMU to improve. Ah, you mean we should indicate "This is the QEMU emulated version of = device x". I think I slowly see what you're getting at. In this case, = the fix really is to get QEMU work properly, but I like the idea of = exposing to the guest that a device is emulated by QEMU, and emulated by = version X. Alex