QEMU fork LEMU fixes HP-UX 9.x and quad-CPU 10.20 emulation

Antoni Sawicki's LEMU fork of QEMU patches idle CPU spin loops, 4-way SMP bugs, and X11 graphics glitches to run 1990s HP-UX 9.x and 10.20 workstations.

QEMU fork LEMU fixes HP-UX 9.x and quad-CPU 10.20 emulation
Antoni Sawicki / Virtually Fun

Developer Antoni Sawicki (known as Tenox) has released updated builds of his LEMU fork of QEMU alongside preconfigured HP-UX 9.05, 9.07, and 10.20 virtual machine bundles for macOS on Apple Silicon, Linux (x86_64 and aarch64), and 64-bit Windows. Announced via Virtually Fun, the update clears out major CPU, FPU, multiprocessing, and graphics bugs that previously kept Hewlett-Packard's 1990s Unix releases either crawling on a single core or failing to boot altogether.

Upstream QEMU introduced 32-bit PA-RISC emulation in version 2.12 back in 2018 (following initial work started in October 2017 by Helge Deller and Richard Henderson), though 64-bit PA-RISC 2.0 CPU and C3700 system emulation didn't arrive until QEMU 8.2.0 in December 2023. Even with that foundation, older HP-UX releases remained stubborn. Version 10.20 from 1996 ran slowly on a single processor, Sawicki's October 2025 setup for HP-UX 11.11 on QEMU 10.1 had to disable translation block chaining with -d nochain, and 1993's HP-UX 9.05 and 1994's 9.07 refused to boot at all.

That changed on October 31, when Deller merged upstream patches incorporating debugging from Keith Monahan and Kirill A. Korinsky, followed by a blr instruction fix on November 3. By trimming PA-RISC 1.1 fixed block TLB entries from 16 down to 8 to match real PA-7100LC silicon, enabling 15-bit protection IDs, and implementing local broadcast I/O space, upstream QEMU got 9.05 booting on an emulated HP 9000/715. Sawicki then took that baseline into LEMU to fix everything else that broke once the desktop loaded.

Four CPUs on a workstation that only had one

HP-UX 10.20 on an emulated HP B160L: ioscan shows 4 processors, sar shows all 4 CPUs at 100%
Virtually Fun

The biggest quality-of-life fix targets HP-UX's idle behavior, because the operating system never actually halts the processor when idle and just spins in a loop instead. LEMU detects that spin loop and puts the virtual CPU to sleep, dropping host utilization on HP-UX 9.05 from 93% of a core down to 2%, and taking a four-CPU HP-UX 10.20 setup from 400% down to 3% (your laptop fan can stand down now).

Execution is also roughly three times faster thanks to dropping the old -d nochain requirement. For HP-UX 9.05 and 9.07, LEMU models an HP 9000/715 workstation with a PA-7100LC processor, 128MB of RAM, 1280x1024 Artist graphics, NCR710 SCSI, i82596 LAN, and working VM snapshots. For 10.20, it emulates a 1996 HP Visualize B160L with 512MB of RAM, Tulip LAN, and four PA-7300LC processors mapped to separate host cores. Real B160L hardware only ever supported a single non-SMP processor, so four-way multiprocessing here is purely an emulator perk, made usable after Sawicki fixed a four-fold fork and exec slowdown and stopped 4-CPU FPU kernel panics.

Nested emulators and readable FrameMaker text

Macintosh Application Environment 3.0 running Mac OS 7.5.3 on HP-UX 9.05
Virtually Fun

Fast modern hosts broke HP's VUE 3.0 login screen in an entertaining way: the X server calibrated its timers so quickly that it divided by zero and never came up. LEMU paces that timer calibration so the desktop actually starts, and it cleans up a pile of Artist graphics and PEX 3D bugs that left FrameMaker text unreadable, streaked colors across the monster-smashing game Battalion, leaked cursor pixels to the left edge of the screen, or crashed QEMU outright.

Floating-point fixes for the fmpyadd instruction keep Netscape Communicator 4.04 from hanging at startup. With the graphical and FPU bugs out of the way, the portable images run period Unix software like SimCity, Maelstrom, Lotus Notes R4, CorelDRAW 3.5, and WordPerfect 6.0. Even better, Sawicki repaired a Signal 04 crash in Insignia SoftPC 3.1 so it boots MS-DOS with VGA graphics for QBasic Gorillas, alongside Apple's Macintosh Application Environment 3.0 running Mac OS 7.5.3 and Sun's Wabi 2.2 running Windows 3.11.

I'm curious how many of LEMU's patches for Artist graphics and idle detection will eventually fold back into mainline QEMU, since upstream PA-RISC users would benefit from not cooking a host core at idle. All three prebuilt HP-UX images and the HPPA machine documentation are free to download now.