OS/2 and KVM don’t mix.

After I was able to run OS/2 2.11 on VMware with PCI drivers, I thought I’d try KVM.

KVM internal error. Suberror: 1 emulation failure EAX=00000720 EBX=00000050 ECX=fee10050 EDX=00400780 ESI=d02f004c EDI=ff3f0000 EBP=00000d88 ESP=00000d72 EIP=00006725 EFL=00013202 [-------] CPL=3 II=0 A20=1 SMM=0 HLT=0 ES =0047 00080000 00000f9f 0010f300 DPL=3 DS16 [-WA] CS =d517 1aa20000 0000672d 0000ff00 DPL=3 CS16 [CRA] SS =0017 00020000 00000fff 0000f300 DPL=3 DS16 [-WA] DS =bfcf 17f90000 0000033d 0000f300 DPL=3 DS16 [-WA] FS =0000 00000000 ffffffff 00000000 GS =bfff 17ff0000 00000fff 0000f300 DPL=3 DS16 [-WA] LDT=0028 7be57000 0000ffff 00008200 DPL=0 LDT TR =0010 ffe1f6e7 00000067 00008b00 DPL=0 TSS32-busy GDT=     7c7e5000 00001fff IDT=     ffe201e0 000003ff CR0=8001001b CR2=00080000 CR3=001b3000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Code=ca 76 0f 8b ca eb 0b 03 7e 22 8b ca 3b cb 76 02 8b cb 2b d1 <f3> ab 0b d2 75 ed 2b c0 c3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

OS/2 2.11 crashing on KVM


No go.  Also Qemu 2.1.2 on Linux didn’t fare much better.  Must be something about HPFS and raw disk images.  The funny thing is that even once a disk became corrupted, I quit Qemu, restore the disk, and start again, and it’s still behaving like it’s corrupt.  Qemu 0.15.X has been the most stable branch I’ve found to run OS/2, but it’s so obsolete now.

Qemu 2.0 officially released!

And you can download & build the source “here“.

Some of the changes include:

* Initial support for KVM on AArch64 systems (some features such as migration are not yet implemented)
* Support for all 64-bit mode ARMV8 user-accessible instructions except for the optional CRC and crypto extensions
* Support for new 32-bit mode ARMv8 instructions in TCG
* Support for the allwinner-a10-based board “-M cubieboard”
* Support for POWER Altivec 2.07 and VSX instructions when running under TCG
* Support for boot order in pSeries emulation
* The Q35 x86 machine-type now supports CPU hotplug.
* On the PIIX x86 machine-type, PCI hotplug now supports devices behind a bridge (for bridges not added by hotplug; hot-plugged bridges can still use the PCI Standard Hot-Plug Controller)
* Support for the Hyper-V reference time counter via the “hv-time” suboption of “-cpu”. This can improve performance of Windows guests substantially for applications that do many floating-point or SIMD operations. (Requires KVM and Linux 3.14).
* ACPI tables generated by QEMU can now be used by OVMF (https://wiki.ubuntu.com/UEFI/OVMF) firmware. OVMF starting with SVN r15420 is needed. In particular hotplug, pvpanic device and other ACPI based features now work for OVMF
* PCI passthrough of devices with a ROM now work on Xen
* support for suspend-to-RAM in the XHCI USB controller
* GTK UI is now supported on Windows hosts
* New management interfaces for CPU and virtio-rng hotplug
* Improved reliability for live migration when using qcow2 images
* Live snapshot merging
* Experimental support in virtio-blk for M:N threading model: if you specify x-dataplane=on, you can also create I/O threads with “-object iothread” and point virtio-blk devices to the desired iothread with the “x-iothread” property. Properties of the running iothreads can be queried with the QMP command “query-iothreads”.
* Network block drivers (curl, iscsi, rbd, ssh, glusterfs) can be built as shared library modules with “–enable-modules” configure option.
* QEMU is now able to operate even if the underlying storage requires the buffer size to be a 4K multiple. This is the case for 4K-native disks (with cache=none or when accessed through iscsi:// URLs) and some raw devices
* QEMU can access NFSv3 shares directly from userspace using libnfs.
* Improvements to the TCG optimizer make it produce faster code
* Tracing QEMU via LTTng 2.x is now supported
* And lots more…

Qemu enters the 2.0 release candidate phase!

Lots of big changes headed for the 2.0 release.  From the change log:

 

Incompatible changes

  • All onboard buses now have distinct names, so that all of them can be reached with “-device bus=…”. As a result of this, some buses that used to have duplicates got renamed:
    • i2c-bus.0 to i2c-bus.1 for machines n800, n810;
    • virtio-mmio-bus.0 to virtio-mmio-bus.3 for vexpress-a15, vexpress-a9;
    • virtio-mmio-bus.0 to virtio-mmio-bus.31 for virt;
    • usb-bus.0 to usb-bus.1 for xilinx-zynq-a9, fulong2e;
    • ide.0 to ide.1 for isapc, mips, g3beige, mac99, prep;
This change requires care when doing migration from 1.x to 2.x QEMU; you need to specify bus=NEW explicitly on the destination for devices on the renamed bus.
  • Another bus rename is pci to pci.0 for pseries. This does not require as much care on migration; if you were specifying “bus=pci” explicitly, QEMU will not start unless you change that to “bus=pci.0″.
  • qemu-system-arm no longer defaults to the obsolete “integratorcp” if no machine is specified on the command line (this was a recurring source of confusion). Users with existing integratorcp images will need to add “-M integratorcp” to the command line if it is not already present.

Future incompatible changes

  • Three options are using different names on the command line and in configuration file. In particular:
    • The “acpi” configuration file section matches command-line option “acpitable”;
    • The “boot-opts” configuration file section matches command-line option “boot”;
    • The “smp-opts” configuration file section matches command-line option “smp”.
Starting with QEMU 2.1, -readconfig will standardize on the name fo the command line option.

ARM

  • Support for “-M virt”, a board type that only uses virtio devices
  • Support for “-cpu host” when running under KVM
  • Support for new 32-bit mode ARMv8 instructions in TCG
  • Support for all 64-bit mode ARMV8 user-accessible instructions except for the optional CRC and crypto extensions
  • Support for AArch64 disassembling (requires a C++ compiler to be installed on the host)
  • Initial support for KVM on AArch64 systems (some features such as migration are not yet implemented)
  • Support for the Canon PowerShot A1100 DIGIC board using “-M canon-a1100″
  • Support for the allwinner-a10-based board “-M cubieboard”
  • Support for flow control in the Cadence UART
  • “integratorcp” is no longer the default machine (see the ‘incompatible changes’ section above)

Power

  • Support for Altivec 2.07 and VSX instructions when running under TCG
  • Support for ISA 2.06 “load/store quadword instructions”, “divide extended instructions” and “floating-point test instructions” when running under TCG
  • PReP is not anymore (incorrectly) included in qemu-system-ppcemb
  • Improved support for “-nodefaults” on the pSeries machine. Display devices created with “-device VGA” will be handled correctly in the device tree.
  • Support for boot order in pSeries emulation

s390

  • Support for adapter interrupts in virtio-cc2

SPARC

  • Support for Sun CG3 framebuffer with the Sun4m machine. The CG3 framebuffer can be requested with “-vga cg3″.
  • Support for the CASA compare-and-swap instruction in TCG.

x86

  • On the Q35 machine, the HPET interrupt can now be attached to GSIs 16-23, like on real hardware.
  • The Q35 machine now supports CPU hotplug.
  • Two flash chips can be specified using the “-drive if=pflash” or “-pflash” options twice.
  • Memory layout has changed slightly; to improve performance, the PIIX4 machine (“-M pc”) now has 3GB of low memory instead of 3.5GB if the guest has more than 3.5GB of memory. Similarly, the Q35 machine (“-M q35″) now has 2GB instead of 2.75GB of low memory if the guest has more than 2.75GB of overall memory.
  • Support for migration of Intel MPX registers.
  • The Apple SMC device is now exposed in the ACPI tables.
  • On the PIIX machine, PCI hotplug now supports devices behind a bridge (only for bridges not added by hotplug; hot-plugged bridges can still use the PCI Standard Hot-Plug Controller).
  • Support for the Hyper-V reference time counter via the “hv-time” suboption of “-cpu”. This can improve performance of Windows guests substantially for applications that do many floating-point or SIMD operations. (Requires KVM and Linux 3.14).
  • The distributed qemupciserial.inf file now allows installing multiport PCI serial devices on Windows too.
  • ACPI tables generated by QEMU can now be used by OVMF firmware. OVMF starting with SVN r15420 is needed. In particular hotplug, pvpanic device and other ACPI based features now work for OVMF.

KVM

  • x2apic is now enabled by default when KVM is in use.

Xen

  • PCI passthrough of devices with a ROM now works.

Xtensa

  • added support for ML605 and KC705 FPGA boards.
  • Cache-related opcodes now correctly check privilege level/memory accessibility.

Device emulation

SCSI

  • the SCSI layer can offload the WRITE SAME command to the host storage. This is supported on XFS file systems, raw devices, and iSCSI targets.
  • SCSI disks can report a port WWN and port index, to make them look more like “real” SAS disks

USB

  • support for suspend-to-RAM in the XHCI controller
  • support for Microsoft descriptors, to make Windows use remote suspend by default.

GUI

  • Windows hosts support keyboard translation in the GTK+ interface
  • Support for SDL 2.0.

VNC

  • Setting the password via monitor command will not enable password auth as side effect any more. Use “qemu -vnc ${display},password” on the command line to enable password authentication.
  • Improved performance.

GTK+

  • Support for mouse wheel.
  • Support for enabling/disabling grab-on-hover from the command line using “-display gtk,grab-on-hover=on|off”.
  • QEMU for Windows now also supports GTK+ and uses it by default. Console windows (monitor, serial and parallel console) are not available with GTK+.

Monitor

  • New HMP command cpu-add for CPU hotplug
  • New QMP commands object-add and object-del for generic object hotplug (enables virtio-rng hotplug)
  • New HMP commands object_add and object_del for generic object hotplug
  • Improved command-line completion for device_add and device_del (as well as the new commands object_add and object_del)
  • dump-guest-memory can produce kdump compressed format.

Migration

  • Various fixes for migration with qcow2 images. Migration with qcow2 images is now reliable.
  • Reduction (or elimination) of guest stalls during migration
  • RDMA migration is now activated with the “rdma:HOST:PORT” syntax (used to be “x-rdma:HOST:PORT”)

Network

  • New backend “netmap” on BSD systems

Block devices in system emulation

  • Live snapshot merge (…-commit) can be used to merge the active layer of an image into one of the snapshots
  • Live and offline snapshot merge (“commit”) will resize the destination image if necessary.
  • The iSCSI and Gluster backends support snapshot merge.
  • “query-block-stats” provides statistics for all images in the chain of backing files
  • node-name, query-named-block-nodes: external snapshot, resize, change password (???)
  • Experimental support in virtio-blk for M:N threading model: if you specify x-dataplane=on, you can also create I/O threads with “-object iothread” and point virtio-blk devices to the desired iothread with the “x-iothread” property. Properties of the running iothreads can be queried with the QMP command “query-iothreads”.

Various

  • -name now supports a “debug-threads” suboption. With this option, QEMU will assign names to each threads in order to simplify debugging. Note that thread names do not constitute a stable API.
  • Improved coverage for “make check”.
  • Lots of bugfixes reported by Coverity (mostly for non-x86 guests).

Block devices and tools

  • Network block drivers (curl, iscsi, rbd, ssh, glusterfs) can be built as shared library modules with “–enable-modules” configure option.
  • When the destination of “qemu-img convert” is a raw device, qemu-img can ask the host storage to “discard” it instead of writing zeroes
  • “qemu-img convert” can be passed a “-S 0″ option to create a fully allocated image
  • “qemu-img convert” can use hints from the host storage to speed up the transfer
  • “qemu-img convert”, “qemu-img create”, “qemu-img amend” support multiple occurrences of the “-o” command line option.
  • The libcurl interface had bitrotted and has been fixed.
  • A new “quorum” driver for redundant storage is supported.
  • QEMU is able to operate even if the underlying storage requires the buffer size to be a 4K multiple. This is the case for 4K-native disks (with cache=none or when accessed through iscsi:// URLs) and some raw devices. When this happens, QEMU emulates unaligned accesses using read-modify-write cycles if necessary. On properly configured guests newer than ~2009 there should be no performance penalty.
  • qemu-io supports command editing via readline
  • Pseudo-protocols like blkdebug and blkverify can be nested arbitrarily
  • Improved error messages for many operations
  • QEMU can access NFSv3 shares directly from userspace using libnfs. The share must be configured to allow access from high-numbered ports

TCG

  • Improvements to the TCG optimizer make it produce faster code
  • QEMU can use getauxval to detect the host instruction set for PPC64, ARM, s390
  • QEMU supports generating MOVBE, ANDN, instructions in the x86 backend
  • Improved code generation on AArch64 and SPARC hosts
  • Support for AArch64 disassembling (requires a C++ compiler to be installed on the host)

Tracing

  • LTTng 2.x is now supported

User-mode emulation

  • Support for AArch64 user-mode emulation
  • Target specific minimum kernel versions, –enable-uname-release configure parameter will be removed in next release.
  • Support for timer system calls: timer_create, timer_settime, timer_gettime, timer_getoverrun and timer_delete.
  • Support for accept4 socketcall
  • Support for sendmmsg/recvmmesg system calls
  • Support for capset/capget system calls
  • Bug fixes

Known issues

  • On Win32, QEMU must be compiled with --disable-coroutine-pool to work around a suspected compiler bug.
  • The GTK+ terminal windows (monitor, serial console, parallel, …) are still unusable in TCG mode: they lose characters and can raise deadlocks.
  • QEMU for Windows does not support GTK+ terminal windows.
  • AArch64 disassembler support may cause linker errors when configuring with --cc= without matching --cxx= argument.

 

 

 

I’ll have to see if I can build a win64 version.  And OS X as well…

QEMU 1.7.1 Stable released

Hi everyone,

I am pleased to announce that the QEMU v1.7.1 stable release is now available at:

http://wiki.qemu.org/download/qemu-1.7.1.tar.bz2

v1.7.1 is now tagged in the official qemu.git repository, and the stable-1.7 branch has been updated accordingly:

http://git.qemu.org/?p=qemu.git;a=shortlog;h=refs/heads/stable-1.7

This release contains 62 build/bug fixes, including important fixes for crashes at certain guest system memory sizes, and unplugging of virtio devices.

Thank you to everyone involved!

Alpha Linux on Qemu

I got sent a quick heads up about a post on firstwork systems, where the author details the steps needed to install, and boot up the installer, and then get the rest of it running.

Very cool stuff!

I pulled down debian-5010-alpha-netinst.iso, and extracted /boot/vmlinuz & /boot/initrd.gz .. Decompressed vmlinuz, and booted away!  For anyone who want’s it, my minimal install is here.  All things considered, it works well!

$ ./qemu-system-alpha -hda alpha.disk -kernel vmlinux -append ‘console=ttyS0’ -initrd initrd.gz -L pc-bios/ -nographic -net nic -net user -drive file=debian-5010-alpha-netinst.iso,if=ide,media=cdrom
PCI: 00:00:0 class 0300 id 1013:00b8
PCI: region 0: 10000000
PCI: region 1: 12000000
PCI: 00:01:0 class 0200 id 8086:100e
PCI: region 0: 12020000
PCI: region 1: 0000c000
PCI: 00:02:0 class 0101 id 1095:0646
PCI: region 0: 0000c040
PCI: region 1: 0000c048
PCI: region 3: 0000c04c
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.26-2-alpha-generic (Debian 2.6.26-29) ([email protected]) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 Sun Mar 4 21:08:03 UTC 2012
[ 0.000000] Booting GENERIC on Tsunami variation Clipper using machine vector Clipper from SRM
[ 0.000000] Major Options: MAGIC_SYSRQ
[ 0.000000] Command line: console=ttyS0
[ 0.000000] memcluster 0, usage 1, start 0, end 11
[ 0.000000] memcluster 1, usage 0, start 11, end 16384
[ 0.000000] freeing pages 11:2048
[ 0.000000] freeing pages 2987:16384
[ 0.000000] reserving pages 2987:2988
[ 0.000000] Initial ramdisk at: 0xfffffc0007b28000 (5076756 bytes)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16272
[ 0.000000] Kernel command line: console=ttyS0
[ 0.000000] PID hash table entries: 512 (order: 9, 4096 bytes)
[ 0.000000] HWRPB cycle frequency bogus, and unable to estimate a proper value!
[ 0.000000] Using epoch = 2000
[ 0.000000] Turning on RTC interrupts.
[4194001.858529] Console: colour VGA+ 80×25
[4194001.860482] console [ttyS0] enabled
[4194001.865365] Dentry cache hash table entries: 16384 (order: 4, 131072 bytes)
[4194001.865365] Inode-cache hash table entries: 8192 (order: 3, 65536 bytes)
[4194001.871224] Memory: 117120k/131072k available (2162k kernel code, 13728k reserved, 3314k data, 304k init)
[4194001.899544] Security Framework initialized
[4194001.900521] Capability LSM initialized
[4194001.900521] Mount-cache hash table entries: 512
[4194001.905404] Initializing cgroup subsys ns
[4194001.907357] Initializing cgroup subsys cpuacct
[4194001.907357] Initializing cgroup subsys devices
[4194001.918099] net_namespace: 1208 bytes
[4194001.920052] NET: Registered protocol family 16
[4194001.926888] EISA bus registered
[4194001.928841] pci: enabling save/restore of SRM state
[4194001.939583] Linux Plug and Play Support v0.97 (c) Adam Belay
[4194001.953255] NET: Registered protocol family 2
[4194001.964974] IP route cache hash table entries: 1024 (order: 0, 8192 bytes)
[4194001.967904] TCP established hash table entries: 4096 (order: 3, 65536 bytes)
[4194001.967904] TCP bind hash table entries: 4096 (order: 2, 32768 bytes)
[4194001.968880] TCP: Hash tables configured (established 4096 bind 4096)
[4194001.968880] TCP reno registered
[4194001.972787] NET: Registered protocol family 1
[4194001.975716] checking if image is initramfs… it is
[4194003.320442] Freeing initrd memory: 4957k freed
[4194003.323372] VFS: Disk quotas dquot_6.5.1
[4194003.323372] Dquot-cache hash table entries: 1024 (order 0, 8192 bytes)
[4194003.325325] msgmni has been set to 238
[4194003.327278] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[4194003.327278] io scheduler noop registered
[4194003.327278] io scheduler anticipatory registered
[4194003.329231] io scheduler deadline registered
[4194003.329231] io scheduler cfq registered (default)
[4194003.330208] isapnp: Scanning for PnP cards…
[4194003.750129] isapnp: No Plug & Play device found
[4194003.767708] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
[4194003.769661] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[4194003.782356] brd: module loaded
[4194003.784309] serio: i8042 KBD port at 0x60,0x64 irq 1
[4194003.784309] serio: i8042 AUX port at 0x60,0x64 irq 12
[4194003.787239] mice: PS/2 mouse device common for all mice
[4194003.792122] TCP cubic registered
[4194003.792122] NET: Registered protocol family 17
[4194003.793098] registered taskstats version 1
[4194003.793098] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[4194003.795051] Freeing unused kernel memory: 304k freed
[4194003.889778] input: AT Translated Set 2 keyboard as /class/input/input0
[4194011.195438] Uniform Multi-Platform E-IDE driver
[4194011.195438] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[4194011.204227] CMD646: IDE controller (0x1095:0x0646 rev 0x07) at PCI slot 0000:00:02.0
[4194011.204227] CMD646: UltraDMA capable
[4194011.205204] CMD646: 100% native mode on irq 28
[4194011.205204] CMD646: IDE port disabled
[4194011.206180] PCI: Setting latency timer of device 0000:00:02.0 to 64
[4194011.206180] ide0: BM-DMA at 0x8040-0x8047
[4194011.596805] hda: QEMU HARDDISK, ATA DISK drive
[4194012.325320] hdb: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
[4194012.378055] hda: UDMA/33 mode selected
[4194012.378055] hdb: UDMA/33 mode selected
[4194012.379031] ide0 at 0x8050-0x8057,0x8062 on irq 28
[4194012.554812] hda: max request size: 512KiB
[4194012.556766] hda: 4194304 sectors (2147 MB) w/256KiB Cache, CHS=4161/255/63
[4194012.558719] hda: cache flushes supported
[4194012.559695] hda: unknown partition table
[4194012.663211] hdb: ATAPI 4X DVD-ROM drive, 512kB Cache
[4194012.665164] Uniform CD-ROM driver Revision: 3.20
Starting system log daemon: syslogd, klogd.

 

I was looking back at old posts

And I saw my old look at Mach+Lites.  And of course there was a qcow disk image associated with some ancient version of Qemu which I can’t run on Wine on OS X.  So I figured with a bit of fun I’d update the disk image to work with Qemu 1.7.0.

Luckily Qemu 0.15.1 works just fine for it’s qemu-img.  So a quick

qemu-img convert -f qcow -O vmdk mach.img mach.vmdk

and I had my image.  I’m not sure of what the NE2000 parameters that Mach can use to enable the network, but I do recall it was easier to just rebuild Qemu around them.  However this time, I switched to the Mach kernel that utilized Linux device drivers to get a working network.

I updated the hard disk file here.

Screen Shot 2013-12-27 at 12.16.18 AM

For the two or three people who care about BSD evolutionary dead ends.

64bit Windows QEMU builds

I stumbled across this page, which has installers & executables for Win64 based OS’es of Qemu!

Of course this is very exciting… considering I never could get a working build of Qemu for a Win64 platform, and more or less gave up.

From the brief guide on building, it looks like they use POSIX threading and cross build from Linux.  Naturally I’ve been trying to use native tools & Win32 threading as I saw mentioned over here.

Maybe one day I’ll be able to get it working in a semi-consistent manner and put back in my lame fixes disabling screen resizing in a window, and control alt delete shortcuts.

Qemu 1.7.0 released!

The main qemu page hasn’t been updated yet, but the download page has the source to the new version of Qemu.

I’ve gone ahead and built binaries for OS X, both a full version, and  a i386 minimal version.

As always testing is very minimal, all I’ve done is installed MS-DOS 6.22 & Doom 1.1, and tested the SoundBlaster 16 emulation.  And as with the pre-release versions, the adlib code is still broken.  And Ive done the ‘better’ fix in this code regarding that.

I haven’t run anything else, including fun things like the PowerPC & OS X emulation, MIPS with Windows NT, or even trying anything x64 based as I’m sure it is still broken from back in the Qemu 0.90 days.

Qemu & SunOS 4.1.4

SunOS 4.1.4 was the last version of the BSD based SunOS for the SPARC platform.  I had received an email earlier asking if Qemu could run SunOS.  Earlier it was ‘capable’ however there were issues with the serial ports.  And the framebuffer stuff that the SUN Proms recognized was never mainlined (please tell me I’m wrong?).

But then with a quick google search I came across this wikibook page with detailed instructions on how to install SunOS 4.1.4.

SunOS

SunOS on Qemu 1.7.0rc2

So I quickly built a sparc version of Qemu 1.7.0rc2, and followed the instructions.  I was amazed that now we are able to boot off the CD (still attached as a HD though) but label the main hard disk, and install SunOS.  I have to say it is very impressive.

Another hint I came across is the more correct way to boot the Sparc Station 20’s

-bios /usr/local/share/qemu/ss20_v2.25_rom -M SS-20 -smp 2,cores=4 -cpu “TI SuperSparc 60”

Sadly there is no graphical output, but the PROM won’t crash.  I think you can have 512MB of ram on the SS-20.