Showing posts from September, 2018

Ubuntu 18.10 beta announced

The beta release of Ubuntu 18.10 "Cosmic Cuttlefish" is now available. The release notes are currently a little sparse but the update is good news for our *buntu audience. As we previously reported, Ubuntu 18 is the first release to support the POWER9 and should "just work." You can download the server image, which you should be able to convert to a workstation installation.

Fedora 29 Beta announcement

The official Linux distro here at Floodgap-Talospace is Fedora, and we use 28 on our own system. Fedora has now made an announcement for the F29 beta, scheduled for final release by the end of October. Among other improvements in F29 are expanded modular repositories and GNOME 3.30, along with other updated core libraries.

Oddly, the images available for download do not, as of this writing, include any build for ppc64le. However, a ppc64le release is planned for the Server flavour, You can download beta Server images for ppc64le, which you can then turn around and convert into Workstation.

Chromium on POWER9 ready to land

As reported on the Chromium development mailing list, patches are ready to land to make Chromium production-ready on the Talos II and other POWER9 systems. The last remaining blocker in libvpx was worked around by disabling VSX-AltiVec support, presumably temporarily (the patches TenFourFox uses for AltiVec VP8 and VP9 are maintained independently and are not part of libvpx). This includes a functional JavaScript JIT using V8.

Chromium is an important dependency for many tools, such as QtWebEngine, so this port definitely improves the T2's viability and compatibility as a workstation. However, I'll say as a personal note, and with full disclosure as a long-time member of the Mozilla community, moves like Chrome 69's forced integration with Google web services (even cookies won't be cleared unless you log out) continue to make me unwilling to support this project myself even though I'm glad it exists. At least there are alternatives like Ungoogled Chromium, at least for right now.

Firefox doesn't have a JIT, but it also doesn't have Google or its general untrustworthiness and it otherwise works fine, and my goal is to get ppc64le supported in SpiderMonkey eventually. Meanwhile, if you really do prefer Chromium, you now have a fully-working port and this hard work should be commended.

Nested virtualization coming to POWER9

On the KVMPPC mailing list, Paul Mackerras posted for comments a new set of updates to KVM-HV allowing POWER9 systems in radix MMU mode to finally nest virtualization (i.e., run a virtualized POWER9 guest within another virtualized POWER9 guest through KVM-HV). This is not only a big boon to shops that run Power ISA virtual machines in terms of enhanced security and portability, but also offers the potential for improved debugging and development.

As you will no doubt recall from our previous series on turning your Talos into a Power Mac, the Kernel-based Virtual Machine functionality on Power ISA and PowerPC comes in two flavours: KVM-PR, which emulates supervisor instructions in software and thus is slower but more flexible and can be nested, and KVM-HV, which uses hardware hypervisor support in later Power ISA chips and is faster, but cannot emulate most earlier CPUs and previously could not be nested (though a KVM-PR guest can run within a KVM-HV guest, and additional KVM-PR guests within that).

With these patches, nested KVM-HV guests are now possible, and can run at nearly full speed. Let's define the base hypervisor to be at level 0 ("L0"). L0 can use the hardware virtualization support to run a guest at level 1 ("L1"). An L1 guest, however, currently cannot do the same thing, so it can't spawn any additional nested VMs under its own control. The trick with these patches is to add hypercalls to allow an L1 guest to ask the L0 hypervisor to create another guest on its behalf, but set up address translation that the L1 guest can manipulate. The new guest is actually another L1 guest, but it looks like an L2 guest because L0 will in effect translate the fake L2's addressing requests through the L1 guest that requested it using a combination of instruction emulation and paravirtualization. The emulated L2 guest should be able to then turn around and request a new VM itself, and the L0 hypervisor will make another L1 guest that the faux L2 guest can control that acts like an L3 guest, and thus turtles all the way down.

Because it is still inherently KVM-HV, however, it inherits all of its basic limitations such as only supporting the current processor generation and the one immediately preceding it. In addition, the current nested guest implementation relies on radix MMU mode, the default MMU mode of the POWER9 (KVM-PR requires hashed page table MMU mode), meaning it does not support earlier Power ISA generations that only support hashed page tables. The patches are out for comments on the mailing list and hopefully will be incorporated into the Linux kernel tree in the very near future.

More news on the "Tiny Talos"

Raptor is revealing more details on what we'll christen the Tiny Talos. In posts on Phoronix, engineer Timothy Pearson indicated that the unit will take "low-end Sforza" parts (likely capped at four or possibly eight cores, assuming SMT-4), putting it at the low-end under the T2 Lite. Interestingly, integrated sound is available as well as presumably integrated video.

Whatever it is, the full reveal is scheduled for October. We'll be watching.

Alpine Linux updated to 3.8.1

Alpine Linux has been updated to version 3.8.1, including bugfixes and security updates (though note this information on a RCE this release supposedly fixes). The ppc64le versions available for download don't seem to have support for POWER9 or Talos systems yet (only POWER8 systems so far), but hopefully this will change in the near future.

More POWER in Firefox 62

The fixes for compilation and better performance on ppc64le yours truly contributed to Firefox are now in the release channel with Firefox 62. These were bug 1464751, bug 1464754 and bug 1465274, which was a spin-off from bug 1434589.

Unfortunately, the Fedora pre-built Firefox 62 seems to have a crippling crash bug in it when typing addresses into the location bar. Your distro's package may vary. However, building from source doesn't seem to be affected, implying some build configuration issue on their end. Note that there are build system changes in 62 which require some additional workarounds in your .mozconfig and this might have been what bit them. Here's what I use for making a debug build:

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++

mk_add_options MOZ_MAKE_FLAGS="-j24"
ac_add_options --enable-application=browser
ac_add_options --enable-optimize="-Og -mcpu=power9"
ac_add_options --enable-debug
ac_add_options --disable-jemalloc
ac_add_options --disable-release
ac_add_options --enable-linker=bfd

Adjust the -j24 to the number of threads you want (I like keeping some resources free, so I reserve eight threads from the 32 on this system). The linker defaults to gold, which doesn't work right on ppc64le; this configuration forces it to GNU ld ("bfd"). This config also forces the use of gcc instead of clang; you change to your tastes.

Making a release build seems to have some problems on POWER9 still, so that's disabled, along with jemalloc. I also have a binary of gn (from Chromium) used to regenerate some configurations, which I'm happy to provide upon request. If you have such a binary, then add export GN=/path/to/gn to let the build system use it.

Save this as .mozconfig in the root of the Mercurial tree you cloned or tarball you expanded, and then ./mach build to build.

For an optimized build, such as the one this blog post is being typed in, the config is nearly the same:

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++

mk_add_options MOZ_MAKE_FLAGS="-j24"
ac_add_options --enable-application=browser
ac_add_options --enable-optimize="-O3 -mcpu=power9"
ac_add_options --disable-jemalloc
ac_add_options --disable-release
ac_add_options --enable-linker=bfd

Unfortunately, setting MOZ_PGO (for profile-guided optimization) and MOZ_LTO (for link-time optimization), although they complete, seem to generate defective executables. That will be a project to work on later. The RUSTC_OPT_LEVEL is probably unnecessary here but doesn't hurt.

My internal builds also use a port of TenFourFox's basic adblock to reduce the amount of JavaScript it needs to run, since Firefox does not yet have a JIT for ppc64le. That's something I'm working on as well, inspired by the big-endian 32-bit PowerPC JIT in TenFourFox, but this JIT will be 64-bit and little-endian so that we can get wasm up and running. I'll be posting progress reports here as the work moves along. This is rather different than the folks working on the ppc64le Chromium port, which uses the existing Power ISA support in V8 and is trying to get the rest of the browser up. For philosophical reasons I won't be working on that project (I think Google's dissemination of Blink is not ultimately benign, a topic for another day), but I support more browser choice on our new platform, and I hope they are successful too.

Talos shines at OSS North America

Raptor was at the Linux Foundation's Open Source Summit North America, and at least one attendee was very impressed with the Talos II. Theirs run Debian (we run Fedora here), but we can still be friends. The unit on display was the dual-socket T2 with two 4-way CPUs for 32 threads, the same as the one your humble author is typing on.