KVM Unable to set page frame base address

Discuss MS-DOS, Windows 1, 2 and 3.
Post Reply
Shintaro1969
User avatar
Posts: 99
Joined: Sat Jan 01, 2022 10:23 am

KVM Unable to set page frame base address

Post by Shintaro1969 »

Hi,

I have a strange KVM/QEMU problem with DOS 6.2.

When I try to load emm386.exe I get "WARNING: Unable to set page frame base address--EMS unavailable." I can load it with the NOEMS, but that defeats the purpose as I want EMS.
I have never had this problem in VirtualBox.

There is this article https://jeffpar.github.io/kbarchive/kb/075/Q75592/

Any ideas?

Cheers,
Craig


KVM config:
RAM: 4mb
CPU: 486
Disk: 800Mb




Code: Select all

<domain type="kvm">
  <name>win3.1</name>
  <uuid>1d2eb7c0-5b3c-4128-8f3c-4f2de5fdc632</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/3.1"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">4096</memory>
  <currentMemory unit="KiB">4096</currentMemory>
  <vcpu placement="static">1</vcpu>
  <os>
    <type arch="x86_64" machine="pc-i440fx-7.1">hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
    </hyperv>
    <vmport state="off"/>
  </features>
  <cpu mode="custom" match="exact" check="partial">
    <model fallback="allow">486</model>
  </cpu>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" discard="unmap"/>
      <source file="/var/lib/libvirt/images/win3.1.qcow2"/>
      <target dev="hda" bus="ide"/>
      <boot order="2"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <target dev="hdb" bus="ide"/>
      <readonly/>
      <boot order="3"/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>
    <disk type="file" device="floppy">
      <driver name="qemu" type="raw"/>
      <target dev="fda" bus="fdc"/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="ich9-ehci1">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x7"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci1">
      <master startport="0"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0" multifunction="on"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci2">
      <master startport="2"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x1"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci3">
      <master startport="4"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x2"/>
    </controller>
    <controller type="pci" index="0" model="pci-root"/>
    <controller type="fdc" index="0"/>
    <controller type="ide" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/>
    </controller>
    <interface type="bridge">
      <mac address="52:54:00:a2:20:33"/>
      <source bridge="virbr0"/>
      <model type="pcnet"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>
    <sound model="ich6">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
    </video>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
    </memballoon>
  </devices>
</domain>



CONFIG.SYS

device=c:\dos\himem.sys
device=c:\dos\emm386.exe verbose
DOS=HIGH
Files=30




AUTOEXEC.BAT

c:\dos\smartdrv.exe /X
@echo off
PROMPT $P$G
PATH c:\DOS
set TEMP=c:\temp
“Wyrd bið ful āræd. Fate is inexorable.”

Fanta Shokata
User avatar
Posts: 323
Joined: Sat Oct 10, 2020 12:48 pm
Location: Tricity, Poland

Re: KVM Unable to set page frame base address

Post by Fanta Shokata »

Try replacing EMM386 verbose switch with ram in your CONFIG.SYS file.
We stand with Ukraine

Shintaro1969
User avatar
Posts: 99
Joined: Sat Jan 01, 2022 10:23 am

Re: KVM Unable to set page frame base address

Post by Shintaro1969 »

Fanta Shokata wrote:
Wed Sep 14, 2022 12:22 pm
Try replacing EMM386 verbose switch with ram in your CONFIG.SYS file.
Nah, still does the same thing. Thanks anyway.
“Wyrd bið ful āræd. Fate is inexorable.”

Fanta Shokata
User avatar
Posts: 323
Joined: Sat Oct 10, 2020 12:48 pm
Location: Tricity, Poland

Re: KVM Unable to set page frame base address

Post by Fanta Shokata »

Then try using PCem/86box instead of KVM/QEMU.
We stand with Ukraine

Shintaro1969
User avatar
Posts: 99
Joined: Sat Jan 01, 2022 10:23 am

Re: KVM Unable to set page frame base address

Post by Shintaro1969 »

Fanta Shokata wrote:
Wed Sep 14, 2022 12:48 pm
Then try using PCem/86box instead of KVM/QEMU.
I like 86Box, but the networking doesn't work on a Linux host. Not unless there has been another patch.

Looks like VirtualBox does everything that I want. Actually, I think VMware will do it, but I don't have the money for the Workstation and I prefer to use a legit version of VMware. VMPlayer only runs a single VM at a time.
“Wyrd bið ful āræd. Fate is inexorable.”

Meow
Posts: 480
Joined: Mon Feb 03, 2020 5:28 am
Location: Earth

Re: KVM Unable to set page frame base address

Post by Meow »

Generally hypervisors are pretty terrible at running pre-win95 OSes, so KVM would be no exception.
As for 86Box, you should check your network settings on the OS/router. I run Ubuntu 22.04 as my host and networking worked out of the box for me.

Shintaro1969
User avatar
Posts: 99
Joined: Sat Jan 01, 2022 10:23 am

Re: KVM Unable to set page frame base address

Post by Shintaro1969 »

Meow wrote:
Wed Sep 14, 2022 1:02 pm
Generally hypervisors are pretty terrible at running pre-win95 OSes, so KVM would be no exception.
As for 86Box, you should check your network settings on the OS/router. I run Ubuntu 22.04 as my host and networking worked out of the box for me.
Last time I looked ICMP wasn't working. Someone made a patch, but it didn't work.
I give it another try.
“Wyrd bið ful āræd. Fate is inexorable.”

AlphaBeta
User avatar
Donator
Posts: 2439
Joined: Sun Aug 12, 2012 4:33 pm
Location: Czechia

Re: KVM Unable to set page frame base address

Post by AlphaBeta »

As far as I know, QEMU initializes the memory in a way that EMM386 doesn't like.
AlphaBeta, stop brainwashing me immediately!

Image

Shintaro1969
User avatar
Posts: 99
Joined: Sat Jan 01, 2022 10:23 am

Re: KVM Unable to set page frame base address

Post by Shintaro1969 »

AlphaBeta wrote:
Wed Sep 14, 2022 7:06 pm
As far as I know, QEMU initializes the memory in a way that EMM386 doesn't like.
Kind of annoying.
It looks like VMWare is the only solution that will virtualize DOS to Win 10 and do a good job speed wise.
“Wyrd bið ful āræd. Fate is inexorable.”

vbdasc
Posts: 350
Joined: Fri Apr 30, 2010 6:14 pm

Re: KVM Unable to set page frame base address

Post by vbdasc »

Did you try one of the m1, m2... m9 command line parameters of EMM386? (as described in the knowledge base article). My advice is to try all nine, separately, of course.

If it doesn't help, try running some diagnostic program like Quarterdeck's Manifest to determine the availability of unused address space in your UMA, and post the results here. Also, you could try Quarterdeck's QEMM386 instead of EMM386. It provides EMS too, and is generally more intelligent.

As another possibility, you could try updating the BIOS of your QEMU/KVM guest.

https://fabianlee.org/2018/09/13/ubuntu ... s-for-kvm/

Darkstar
User avatar
Donator
Posts: 1212
Joined: Fri May 14, 2010 1:29 pm
Location: Southern Germany

Re: KVM Unable to set page frame base address

Post by Darkstar »

Try an isa-only machine for qemu-kvm (i.e. run qemu with "-M isapc").

I suspect it's due to PAM (ROM shadowing) on QEmu
I upload stuff to archive.org from time to time. See here for everything that doesn't fit BA

Shintaro1969
User avatar
Posts: 99
Joined: Sat Jan 01, 2022 10:23 am

Re: KVM Unable to set page frame base address

Post by Shintaro1969 »

vbdasc wrote:
Thu Sep 15, 2022 10:14 am
Did you try one of the m1, m2... m9 command line parameters of EMM386? (as described in the knowledge base article). My advice is to try all nine, separately, of course.

If it doesn't help, try running some diagnostic program like Quarterdeck's Manifest to determine the availability of unused address space in your UMA, and post the results here. Also, you could try Quarterdeck's QEMM386 instead of EMM386. It provides EMS too, and is generally more intelligent.

As another possibility, you could try updating the BIOS of your QEMU/KVM guest.

https://fabianlee.org/2018/09/13/ubuntu ... s-for-kvm/
I'll give QEMM a go.
The alternate bios OVMF are for UEFI compatible software as far as I am aware.

Cheers mate.
“Wyrd bið ful āræd. Fate is inexorable.”

Battler
User avatar
Donator
Posts: 2117
Joined: Sat Aug 19, 2006 8:13 am
Location: Slovenia, Central Europe.
Contact:

Re: KVM Unable to set page frame base address

Post by Battler »

Shintaro1969 wrote:
Wed Sep 14, 2022 12:56 pm
Fanta Shokata wrote:
Wed Sep 14, 2022 12:48 pm
Then try using PCem/86box instead of KVM/QEMU.
I like 86Box, but the networking doesn't work on a Linux host. Not unless there has been another patch.

Looks like VirtualBox does everything that I want. Actually, I think VMware will do it, but I don't have the money for the Workstation and I prefer to use a legit version of VMware. VMPlayer only runs a single VM at a time.
What version of 86Box are you using? The network has been fixed last month and has been tested to work on all three supported OS'es (Windows, Linux, and Macos). So you should get the latet 86Box build from our Jenkins (ci.86box.net) and try that.

Now, as to the page frame problem - it's a long-known problem. QEMU incorrectly fills unassigned memory space with 0x00 instead of 0xFF, which causes EMM386 to mistakenly think the page frame segment (C800) is already used. I reported this bug on QEMU's bug tracker back in 2013 or 2014 already, and got back a WONTFIX because apparently fixing it (ie. making unassigned memory space behave exactly as does on real hardware) would "break KVM", which another user years later explained to me as "will destroy KVM performance".
Main developer of the 86Box emulator.
Join the 86Box Discord server, a nice community for true enthusiasts and 86Box supports!

The anime channel is on the Ring of Lightning Discord server.

Check out our SoftHistory Forum for quality discussion about older software.

Post Reply