Qemu Pegasos II board - ready for a next release
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 105 from 2019/11/1
    On Powermacs I use linuxppc to run qemu.
    For latest 5.2 release I had to resolve many new dependencies to let it compile, anyway it works but it's too slow in sam460ex and powerpc emulation.
    With pegasos2 board "should" be finally possible to virtualize cpu via KVM and run at full speed.

    NB:
    Both powermacs and pegasos2 share the same cpu (book3s) so virtualizations is possible, sadly with sam460ex the emulated cpu belongs to a different family (book3e) and thus it had to be emulated with a huge slowdown.
  • »07.01.21 - 12:02
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > do you mean there will be no QEMU emulator dropdowns in speed
    > even if it will use the host's CPU? I mean, it still will be slower than
    > native IMHO. [...] EDIT: I read that KVM can run a guest OS at 95-98%
    > of the host’s native performance

    Running a guest OS in QEMU KVM-PR mode makes the user mode instructions run directly on the host CPU and the supervisor/privileged mode instructions run emulated. Thus, the overall performance depends on the distribution of the executed instructions, i.e. the less supervisor/privileged instructions the better the performance.

    > QEMU should be run from something, so it will mean MacOS
    > probably necessary too.

    I'm not sure that current/future QEMU versions can run on 11½ years old MacOS.

    > it probably lucks audio driver and RadeonR92xx driver (with all compositing
    > things working) [...]? Or there already some audio/video drivers support being done?

    Audio: QEMU can emulate Ensoniq AudioPCI ES1370 chipset (deployed on Sound Blaster PCI128 card), which OS4 has drivers for. So if QEMU can't emulate the Pegasos II onboard audio, you can always insert a virtual SB128 sound card into the virtual Pegasos II.
    Graphics: Correct, no Radeon or compositing etc. yet. However, I think it should be possible to insert a virtual SM501/SM502 graphics card into the virtual Pegasos II (as had to be done for running MorphOS on QEMU PowerMac3,1/mac99 emulation before the Rage 128 Pro emulation emerged).
  • »07.01.21 - 20:49
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ernsteiswuerfel
    Posts: 556 from 2015/6/18
    From: Funeralopolis
    Qemu may gain Pegasos II support, whereas the kernel may loose Pegasos II support (klick). :-o
    Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | A600GS
  • »10.01.21 - 18:24
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 105 from 2019/11/1
    Another reason to go on pegasos2 integration in qemu.
    Virtual board will never broke and will improve speed, compatibility and features over years.
    Better than a good old wine :-)
  • »10.01.21 - 21:12
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > the kernel may loose Pegasos II support

    THE kernel? Ah, fortunately just the Linux kernel, not the MorphOS/PPC kernel (Quark) ;-)

    > klick

    I read this a little differently:

    "Some of these look like they are no longer actively maintained or used, but I'm not doing anything about those unless the maintainers would like me to: [...]
    * powerpc/chrp (32-bit rs6000, pegasos2): last updated in 2009
    "

    As I read it, this means that support will stay in for the time being unless the maintainer (who?) wants it removed. The supporters are already starting to line up :-)
    Overall, I don't think that the future (non-)ability to run a then-current Linux on QEMU-emulated/virtualized Pegasos II has a relevance. Why emulate/virtualize a Pegasos II in QEMU to run Linux on it when QEMU is already running on Linux on the host?
  • »10.01.21 - 23:45
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    >> the kernel may loose Pegasos II support

    > Another reason to go on pegasos2 integration in qemu.

    This I don't get. Why should an inability to run new Linux versions on a system be "another reason" to have that system emulated?
  • »11.01.21 - 00:06
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 105 from 2019/11/1
    Time always consumes and try to kickoff all things what are considered obsolete.
    I understand but really dont' like it.
    The stop of drop of new linux kernels for pegasos2 is an example in that direction and IMHO a sort of mistake.
    It can be rebalanced in some way by adding pegasos2 in qemu, letting it still survive in a next future.
  • »11.01.21 - 08:18
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ernsteiswuerfel
    Posts: 556 from 2015/6/18
    From: Funeralopolis
    Quote:

    Andreas_Wolf schrieb:
    THE kernel? Ah, fortunately just the Linux kernel, not the MorphOS/PPC kernel (Quark) ;-)

    True. ;-)

    Quote:

    As I read it, this means that support will stay in for the time being unless the maintainer (who?) wants it removed. The supporters are already starting to line up :-)

    True. But no one lined up for the AOne or the Peg2 yet, only for some of the ARM boards and for the Alpha.

    My guess is that this 'deprecation request' will be made again in some time, annually (?) perhaps. PPC Maintainer btw is Michael Ellerman. Most probably all CCed people in the 1st post are arch maintainers. Recently PowerPC 601 support got thrown out, which I don't miss - but some people will probably miss the AOne or Peg2. ;-)

    Quote:

    Overall, I don't think that the future (non-)ability to run a then-current Linux on QEMU-emulated/virtualized Pegasos II has a relevance. Why emulate/virtualize a Pegasos II in QEMU to run Linux on it when QEMU is already running on Linux on the host?

    A good use of such QEMU-emulated machines is for bisecting/working on bugs on specific archs. Not every maintainer of some software has ppc/ppc64/arm/aarch64/mips/etc. hardware lying around to test his stuff on, but he can use QEMU.

    This has been quite handy for some Linux bugs I reported on ppc/ppc64. The devs often use ppc64 workstations in Little Endian mode and may not be able to reproduce many bugs which happen on my PowerMac G4. Most certainly not when it's about (Linux) kernel bugs.

    The question is how much longer the Peg2 'hardware' will stay in QEMU when there is no Linux kernel for the Peg2 to boot? I dunno. Are there existing conventions for that case?
    Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | A600GS
  • »11.01.21 - 08:33
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    >> The supporters are already starting to line up :-)

    > no one lined up for the AOne or the Peg2 yet [...]. [...]
    > some people will probably miss the AOne or Peg2. ;-)

    Maybe you should have clicked my link to encounter one of them. Here's another supporter.

    > A good use of such QEMU-emulated machines is for bisecting/working
    > on bugs on specific archs. Not every maintainer of some software has
    > ppc [...] hardware lying around to test his stuff on, but he can use QEMU.

    I doubt Pegasos II emulation is needed for this purpose as QEMU already emulates well other Linux-supported PPC32 hardware, among them also other G4-based hardware (like PowerMac3,1/mac99). Zoltan Balaton has been making no secret of his motivation to create a Pegasos II emulation, and it's not Linux-related. Furthermore, bug hunting of Linux software doesn't require QEMU system emulation as QEMU user-mode emulation is to be preferred for this.
    Bottom line: I'm still not convinced regarding the correlation between QEMU's Pegasos II emulation and the (non-)ability of the Pegasos II (emulation) to run Linux.

    > The question is how much longer the Peg2 'hardware' will stay in
    > QEMU when there is no Linux kernel for the Peg2 to boot? I dunno.
    > Are there existing conventions for that case?

    I'm not aware of Linux capability being a prerequisite for a machine to be allowed in QEMU. Zoltan always recommends the most recent MorphOS ISO image for testing the emulation anyway :-)
  • »11.01.21 - 22:38
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ernsteiswuerfel
    Posts: 556 from 2015/6/18
    From: Funeralopolis
    Quote:

    Andreas_Wolf schrieb:
    [...] Furthermore, bug hunting of Linux software doesn't require QEMU system emulation as QEMU user-mode emulation is to be preferred for this.

    [...]
    Bottom line: I'm still not convinced regarding the correlation between QEMU's Pegasos II emulation and the (non-)ability of the Pegasos II (emulation) to run Linux.

    Not regular software bugs yes, but Linux kernel bugs.

    Didn't want to convince you. ;-) Anyway, meanwhile several devs stood up for the Peg2 so it is safe to stay for the time being.

    Quote:

    I'm not aware of Linux capability being a prerequisite for a machine to be allowed in QEMU. Zoltan always recommends the most recent MorphOS ISO image for testing the emulation anyway :-)

    Ah, didn't knew that. Nice! :-D
    Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | A600GS
  • »13.01.21 - 14:37
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    >> QEMU already emulates well other Linux-supported PPC32 hardware,
    >> among them also other G4-based hardware (like PowerMac3,1/mac99).
    >> [...] Furthermore, bug hunting of Linux software doesn't require QEMU
    >> system emulation as QEMU user-mode emulation is to be preferred for this.

    > Not regular software bugs yes, but Linux kernel bugs.

    As said, that's what long-existing PowerMac3,1/mac99 emulation or other PPC32 system emulations are perfectly fine for.

    > meanwhile several devs stood up for the Peg2
    > so it is safe to stay for the time being.

    Yes, Arnd Bergmann's summary for "powerpc/chrp (32-bit rs6000, pegasos2)" and others:

    "a couple of users replied, but no architecture maintainer added any information, so I won't take any action."
    https://www.lkml.org/lkml/2021/1/13/746
  • »13.01.21 - 20:59
    Profile