Re: [PATCH v2] x86/vm86: Remove deprecated VM86 support
From: H. Peter Anvin
Date: Sat May 30 2026 - 03:09:12 EST
On May 29, 2026 10:49:49 PM PDT, Jari Ruusu <jariruusu@xxxxxxxxxxxxxx> wrote:
>Brian Gerst <brgerst@xxxxxxxxx> wrote:
>> Jari Ruusu <jariruusu@xxxxxxxxxxxxxx> wrote:
>> > My current setup uses virtualization:
>> >
>> > 64-bit x86 host + 64-bit Linux kernel/distro + Qemu/KVM
>> > --> boots 32-bit Linux kernel/distro ( X86_LEGACY_VM86=y )
>> > --> boots dosemu + FreeDOS
>> > --> runs DOS version of WordPerfect
>>
>> Can you run FreeDOS on Qemu/KVM directly,
>> without the 32-bit Linux guest in between?
>
>Currently it is not possible to install dosemu or FreeDOS to
>that 64-bit x86 host, at least not from Debian pre-compiled
>packages, because Debian dropped dosemu and FreeDOS from
>installable pre-compiled packages long time ago.
>
>More information about dosemu+FreeDOS emulated VM86 overhead.
>Compiling, assembling, and linking a DOS .exe file from source
>using Turbo-C. This is memory+CPU+disk intensive load:
>
>CONFIG_X86_LEGACY_VM86=y --> 3.1 seconds
>CONFIG_X86_LEGACY_VM86 not set --> 9.4 seconds
>
>Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>> On 5/28/26 22:20, Jari Ruusu wrote:
>> > With CONFIG_X86_LEGACY_VM86=y set in 32-bit Linux kernel,
>> > currently running linux-6.12.91, one memory+CPU intensive
>> > operation in DOS version of WordPerfect takes less than 0.5
>> > seconds. With CONFIG_X86_LEGACY_VM86 not set, same operation
>> > takes about 2 seconds.
>>
>> Just out of curiosity, what operation is that? How often do
>> you do that operation in a day or a month?
>
>That WordPerfect operation is "re-generate indexes" (page
>numbers and such) for 42 page document.
>
>I don't need to do that often at all. Best case: never.
>
>> Just like Brian asked, I'm confused why this needs the
>> 32-bit Linux distro in the mix.
>
>That is for historical reasons. Dosemu and FreeDOS were
>installed long time ago to some version of Debian on a VM, when
>dosemu and FreeDOS were still installable pre-compiled packages
>from Debian. That VM was then upgraded in-place from one version
>to next, all the way to current Debian-12 version as it is now.
>At the time of dosemu and FreeDOS install, it was believed
>(correctly or incorrectly, not sure) that dosemu host Linux
>kernel must have CONFIG_VM86=y as hard requirement, so 64-bit
>x86 host for dosemu was ruled out.
>
>> But, if I were you, I'd just keep the 32-bit distro image
>> around, off the Internet, and never update it. Just like the
>> version of DOS you have and WordPerfect. The 32-bit distro
>> doesn't need a mainline kernel. It just gets frozen in place
>> with a 2026 kernel, just like your 1994 version of WordPerfect
>> and DOS are frozen.
>
>That is my plan. I will keep updating that 32-bit VM as long as
>Debian provides updates for Debian version 12, and then leave
>it as it is.
>
>--
>Jari Ruusu 4096R/8132F189 12D6 4C3A DCDA 0AA4 27BD ACDF F073 3C80 8132 F189
>
>
Dosemu, perhaps, but Dosbox or KVM have no such constraints. Both are likely to perform better than dosemu on "modern" (< 20 years) old hardware.
Dosbox will be better for I/O-heavy applications as it uses the Linux filesystem, KVM for CPU-heavy or really pick applications as it would run a real DOS.