Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-21 Thread Benjamin Herrenschmidt
On Tue, 2016-06-21 at 19:33 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-06-21 at 09:21 +0100, Mark Cave-Ayland wrote: > > A quick check with "info mtree" shows that this area of memory is > > PCI > > configuration space. There was a patch added to uninorth in order > > to > > suppress some

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-21 Thread Benjamin Herrenschmidt
On Tue, 2016-06-21 at 09:21 +0100, Mark Cave-Ayland wrote: > A quick check with "info mtree" shows that this area of memory is PCI > configuration space. There was a patch added to uninorth in order to > suppress some PCI warnings on Darwin boot found by going over the source > to the Darwin

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-21 Thread Mark Cave-Ayland
On 20/06/16 10:32, Benjamin Herrenschmidt wrote: > On Mon, 2016-06-20 at 18:02 +1000, Benjamin Herrenschmidt wrote: >> On Mon, 2016-06-20 at 17:08 +1000, Benjamin Herrenschmidt wrote: >>> >>> That fixed, it dies elsewhere in something related to page faults, >>> still digging. >>> >> Next

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Alexander Graf
On 06/20/2016 11:32 AM, Benjamin Herrenschmidt wrote: On Mon, 2016-06-20 at 18:02 +1000, Benjamin Herrenschmidt wrote: On Mon, 2016-06-20 at 17:08 +1000, Benjamin Herrenschmidt wrote: That fixed, it dies elsewhere in something related to page faults, still digging. Next problem: Darwin

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Benjamin Herrenschmidt
On Mon, 2016-06-20 at 18:02 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2016-06-20 at 17:08 +1000, Benjamin Herrenschmidt wrote: > >   > > That fixed, it dies elsewhere in something related to page faults, > > still digging. > >   > Next problem: Darwin kernel assumes DSISR is 0 on a 0x380

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Benjamin Herrenschmidt
On Mon, 2016-06-20 at 08:17 +0200, Cédric Le Goater wrote: >  > The current patch does not need fixing. I will send the OpenBIOS > patch  > shortly after I have looked at the FPU exception. > > Linux ppc behaves the same on a 970. So we will need to fix the > 'rfi's there also.  What do you mean

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Cédric Le Goater
On 06/20/2016 09:47 AM, Thomas Huth wrote: > On 20.06.2016 08:17, Cédric Le Goater wrote: >> On 06/20/2016 04:19 AM, David Gibson wrote: >>> On Mon, Jun 20, 2016 at 07:12:38AM +1000, Benjamin Herrenschmidt wrote: On Sun, 2016-06-19 at 19:23 +0200, Cédric Le Goater wrote: >> You can run a

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Benjamin Herrenschmidt
On Mon, 2016-06-20 at 09:47 +0200, Thomas Huth wrote: > > Linux ppc behaves the same on a 970. So we will need to fix the 'rfi's > > there also.  > > Really? Wow, that surprises me. That OpenBIOS code likely never ran on a > real 970 hardware, so that's not too much surprising that the "rfi" >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Benjamin Herrenschmidt
On Mon, 2016-06-20 at 08:10 +0200, Cédric Le Goater wrote: > That is how I feel also. So, why don't we just remove the op code in the  > instruction sets from the 32bit CPUs instead of leaving it and testing  > for PPC_SEGMENT_64B ? or is there some reasons we want to keep it around ?  Ah no

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Benjamin Herrenschmidt
On Mon, 2016-06-20 at 17:08 +1000, Benjamin Herrenschmidt wrote: >  > That fixed, it dies elsewhere in something related to page faults, > still digging. >  Next problem: Darwin kernel assumes DSISR is 0 on a 0x380 exception ! qemu was leaving it to whatever value it had before. Kaboom. Now it

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Thomas Huth
On 20.06.2016 08:17, Cédric Le Goater wrote: > On 06/20/2016 04:19 AM, David Gibson wrote: >> On Mon, Jun 20, 2016 at 07:12:38AM +1000, Benjamin Herrenschmidt wrote: >>> On Sun, 2016-06-19 at 19:23 +0200, Cédric Le Goater wrote: > You can run a 32-bit OS or firmware on ppc64, but it needs to

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Alexander Graf
On 20.06.16 09:08, Benjamin Herrenschmidt wrote: > On Mon, 2016-06-20 at 08:35 +1000, Benjamin Herrenschmidt wrote: >> , >> Ok so Darwin uses some of the HSPRG etc... that we don't emulate on >> the 970 so I suspect it never worked. I've added them but something >> else breaks, I'll dig, I have

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Benjamin Herrenschmidt
On Mon, 2016-06-20 at 08:35 +1000, Benjamin Herrenschmidt wrote: > , > Ok so Darwin uses some of the HSPRG etc... that we don't emulate on > the 970 so I suspect it never worked. I've added them but something > else breaks, I'll dig, I have the kernel source so it shouldn't be > too hard > ;-)

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Cédric Le Goater
On 06/20/2016 04:19 AM, David Gibson wrote: > On Mon, Jun 20, 2016 at 07:12:38AM +1000, Benjamin Herrenschmidt wrote: >> On Sun, 2016-06-19 at 19:23 +0200, Cédric Le Goater wrote: You can run a 32-bit OS or firmware on ppc64, but it needs to know that it's running on a 64-bit chip and do

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-20 Thread Cédric Le Goater
On 06/19/2016 11:12 PM, Benjamin Herrenschmidt wrote: > On Sun, 2016-06-19 at 19:23 +0200, Cédric Le Goater wrote: >>> You can run a 32-bit OS or firmware on ppc64, but it needs to know that >>> it's running on a 64-bit chip and do a few things differently. >> >> yes sure but qemu would still

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread David Gibson
On Mon, Jun 20, 2016 at 07:12:38AM +1000, Benjamin Herrenschmidt wrote: > On Sun, 2016-06-19 at 19:23 +0200, Cédric Le Goater wrote: > > > You can run a 32-bit OS or firmware on ppc64, but it needs to know that > > > it's running on a 64-bit chip and do a few things differently. > > > > yes sure

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Benjamin Herrenschmidt
On Mon, 2016-06-20 at 08:15 +1000, Benjamin Herrenschmidt wrote: > On Sun, 2016-06-19 at 19:21 +0200, Cédric Le Goater wrote: > > But, I could not boot  ./darwinppc-602.cdr with on a 970. That > > might > > be another issue. > > Right, the issue is that the kernel in Darwin 6.0.2 doesn't support

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Benjamin Herrenschmidt
On Sun, 2016-06-19 at 19:21 +0200, Cédric Le Goater wrote: > But, I could not boot  ./darwinppc-602.cdr with on a 970. That might > be another issue. Right, the issue is that the kernel in Darwin 6.0.2 doesn't support the 970 :-) I think the first MacOS X to support 970 was some special build of

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Benjamin Herrenschmidt
On Sun, 2016-06-19 at 19:23 +0200, Cédric Le Goater wrote: > > You can run a 32-bit OS or firmware on ppc64, but it needs to know that > > it's running on a 64-bit chip and do a few things differently. > > yes sure but qemu would still allow rfi under 64bit CPUs, that is what  > I was concerned

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Cédric Le Goater
On 06/19/2016 04:08 PM, Benjamin Herrenschmidt wrote: > On Sun, 2016-06-19 at 14:49 +0200, Cédric Le Goater wrote: >>> So my test is correct in the context of what we emulate today. >> >> OK. so this is an openbios issue when run under a ppc64. shouldn't we >> be using an openbios-ppc64 in that

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Cédric Le Goater
On 06/19/2016 03:00 PM, Alexander Graf wrote: > > >> Am 19.06.2016 um 14:49 schrieb Cédric Le Goater : >> >>> On 06/19/2016 01:35 AM, Benjamin Herrenschmidt wrote: On Fri, 2016-06-17 at 16:32 +0200, Cédric Le Goater wrote: The instruction set PPC_POWER_BR contains nearly

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Benjamin Herrenschmidt
On Sun, 2016-06-19 at 14:49 +0200, Cédric Le Goater wrote: > > So my test is correct in the context of what we emulate today. > > OK. so this is an openbios issue when run under a ppc64. shouldn't we  > be using an openbios-ppc64 in that case ?   > > > We could be more strict with the rfi

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Alexander Graf
> Am 19.06.2016 um 14:49 schrieb Cédric Le Goater : > >> On 06/19/2016 01:35 AM, Benjamin Herrenschmidt wrote: >>> On Fri, 2016-06-17 at 16:32 +0200, Cédric Le Goater wrote: >>> The instruction set PPC_POWER_BR contains nearly all the deleted >>> instructions from isa2. rfi is

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-19 Thread Cédric Le Goater
On 06/19/2016 01:35 AM, Benjamin Herrenschmidt wrote: > On Fri, 2016-06-17 at 16:32 +0200, Cédric Le Goater wrote: >> The instruction set PPC_POWER_BR contains nearly all the deleted >> instructions from isa2. rfi is not part of it and should. Also, only >> the cpus "PowerPC 601*" make a use of

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-18 Thread Benjamin Herrenschmidt
On Fri, 2016-06-17 at 16:32 +0200, Cédric Le Goater wrote: > The instruction set PPC_POWER_BR contains nearly all the deleted  > instructions from isa2. rfi is not part of it and should. Also, only  > the cpus "PowerPC 601*" make a use of it in their insns_flags. Are you sure those arent the old

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-18 Thread Benjamin Herrenschmidt
On Fri, 2016-06-17 at 13:02 +0200, Thomas Huth wrote: > According to the PPC970FX user manual that I have: > > "The 970FX does not provide support for the following optional or >  obsolete instructions (or instruction forms). >  Attempted use of these will result in an illegal instruction type >  

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-18 Thread Benjamin Herrenschmidt
<1465795496-15071-2-git-send-email-...@kaod.org> <20160616010702.gi28...@voom.fritz.box> <20160617022731.ga19...@voom.fritz.box> <57639095.5010...@kaod.org> <576392b1.6030...@kaod.org>

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Cédric Le Goater
On 06/17/2016 01:02 PM, Thomas Huth wrote: > On 17.06.2016 12:41, Cédric Le Goater wrote: >> On 06/17/2016 09:10 AM, Thomas Huth wrote: >>> On 17.06.2016 08:03, Cédric Le Goater wrote: On 06/17/2016 07:54 AM, Cédric Le Goater wrote: > On 06/17/2016 04:27 AM, David Gibson wrote: >> On

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Alexander Graf
On 17.06.16 13:02, Thomas Huth wrote: > On 17.06.2016 12:41, Cédric Le Goater wrote: >> On 06/17/2016 09:10 AM, Thomas Huth wrote: >>> On 17.06.2016 08:03, Cédric Le Goater wrote: On 06/17/2016 07:54 AM, Cédric Le Goater wrote: > On 06/17/2016 04:27 AM, David Gibson wrote: >> On

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Thomas Huth
On 17.06.2016 12:41, Cédric Le Goater wrote: > On 06/17/2016 09:10 AM, Thomas Huth wrote: >> On 17.06.2016 08:03, Cédric Le Goater wrote: >>> On 06/17/2016 07:54 AM, Cédric Le Goater wrote: On 06/17/2016 04:27 AM, David Gibson wrote: > On Thu, Jun 16, 2016 at 11:07:02AM +1000, David

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Cédric Le Goater
On 06/17/2016 09:10 AM, Thomas Huth wrote: > On 17.06.2016 08:03, Cédric Le Goater wrote: >> On 06/17/2016 07:54 AM, Cédric Le Goater wrote: >>> On 06/17/2016 04:27 AM, David Gibson wrote: On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: > On Mon, Jun 13, 2016 at 07:24:47AM

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Cédric Le Goater
On 06/17/2016 09:10 AM, Thomas Huth wrote: > On 17.06.2016 08:03, Cédric Le Goater wrote: >> On 06/17/2016 07:54 AM, Cédric Le Goater wrote: >>> On 06/17/2016 04:27 AM, David Gibson wrote: On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: > On Mon, Jun 13, 2016 at 07:24:47AM

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Thomas Huth
On 17.06.2016 08:03, Cédric Le Goater wrote: > On 06/17/2016 07:54 AM, Cédric Le Goater wrote: >> On 06/17/2016 04:27 AM, David Gibson wrote: >>> On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: > From:

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Cédric Le Goater
On 06/17/2016 08:28 AM, David Gibson wrote: > On Fri, Jun 17, 2016 at 08:03:29AM +0200, Cédric Le Goater wrote: >> On 06/17/2016 07:54 AM, Cédric Le Goater wrote: >>> On 06/17/2016 04:27 AM, David Gibson wrote: On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: > On Mon, Jun

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread David Gibson
On Fri, Jun 17, 2016 at 08:03:29AM +0200, Cédric Le Goater wrote: > On 06/17/2016 07:54 AM, Cédric Le Goater wrote: > > On 06/17/2016 04:27 AM, David Gibson wrote: > >> On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: > >>> On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-17 Thread Cédric Le Goater
On 06/17/2016 07:54 AM, Cédric Le Goater wrote: > On 06/17/2016 04:27 AM, David Gibson wrote: >> On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: >>> On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: From: Benjamin Herrenschmidt

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-16 Thread Cédric Le Goater
On 06/17/2016 04:27 AM, David Gibson wrote: > On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: >> On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: >>> From: Benjamin Herrenschmidt >>> >>> This reworks emulation of the various "rfi" variants.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-16 Thread David Gibson
On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: > On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: > > From: Benjamin Herrenschmidt > > > > This reworks emulation of the various "rfi" variants. I removed > > some masking bits that I