Windows 98SE on Modern Hardware

@ruthan

have you tried installing windows98 natively? or do you have a UEFI-only system with no CSM?

@infuscomus

I never saw system without CSM, i have enable it on all my systems. This info is above… its natively working at least on Z170, only problem is really that you need PCI slot for sound card, or mess USB one… and that some PCI-E slot is consumed by some old Win98 only videocard => lots of cables… Win98 NIC consumes slot too. Only bummer is really no Dos sound after B75 / X79… otherwise Win98 would be fine, someone made it running on Ryzen too.

KVM in theory can safe one audio card slot… networking is virtualized for sure… and you can simply beside Win98, had 1 (Linux is mandatory) or more full blown modern OSes running in parallel.

I thing that typical setup would be something like:
Linux + WIn 98 or Win XP Switching (you dont need probably both in parallel) + Win 7/10 for proper Windows gaming => at least 2/3 videocards… more probably 3 - because there is not good Win98 / WinXP card for gaming… or Win XP/ Win7 (Geforce 980 TI is not good enough for lastest games).
Because Win98 needs only 1 core and 512 MB of mem, its cheap. Win XP 32bit - need lets say 2 cores(HT) + 4 GB of RAM…with 8+HT core (16 threads) machine and 32GB its all it quite possible… You course you can everytime just shutdown some machine to gain more power…

I need this now for other QEMU PowerMac experiments… but it could be hassle with other QEMU virtual OS too.

If there is some QEMU expert its possible to burn cd with it at least create some iso output file? I found some SW, which need to create boot cd to use, but can only burning option, no iso creating etc… so you need somehow simulate cd /dvd burning with virtual machine… and insert some blank virtual cd… or pass through whole cd drive and hope that it will work.

@zir_blazer I have question, how to select in Linux primary GPU? Between ATI (x800) and Nvidia - 750Ti? I have ATI in 1st slot, so its used for booting and detect by Linux… I make move it to second slot because of Win98. In XP+ Windows im able on Windows level force Nvidia as primary, but i need the same on Linux.
When i google it - see lots of Intel/Nvidia or Intel/AMD for notebooks prime/ optimus stuff, but nothing for ATI. I wonder is blacklisting the right way and when i blacklist ATI, would it be possible to use it after in KVM, or there is other way?

Ok, i have ready Win7 x64 EFI QEMU KVM virtual for pass-through testing. If it would work i will later change fans on my GPU to uncover PCI slot on my Z170 MB, im messing with machine, which is primary my Nas… and try Win98 PCI pass-through. I installed Windows EFI, because i Wendell video was something about that is better and its future.


Otherwise if you can Vmware, even Virtualbox user whole QEMU setup is virtualization medival times… low level technology could be great… but interface and user workflows sucks, classical Linuxian way. Mouse is lagging in compassion with VNC, because all video output is done through Spice or VNC… There is nothing like easy one installer for all guests driver and additions, you have to pick them one by one - and names of folder and components arent too much hinting you… do you have to constantly google some detail. USB3 drivers arent included on virtio cd, or are really well hidden.
You can make everything working (except mouse lags - so far i dont find solution, its not smooth like in Vmware and in Virtualbox), but its annoying.

When i checked virtiol cd - where are drivers for Win XP to Win server 2019, but nothing for Windows 98, so its probably working all with original Windows 98 drivers, but or simply authors dont care. I have to find details about networking and sound emulation… windows 98 arent disk heavy etc…


You blacklist the Driver with a Linux Kernel parameter so that the Linux Kernel does not initialize the GPU. You may also need to deal with X.org configuration files.
Choosing primary Video Card is harder because the most effective way is to disable loading a Video Card Option ROM, but most Motherboards does not allow you to do that. Check this guy: https://forums.servethehome.com/index.ph…-plugged.27599/



You CAN have local video output with QEMU drawing to a SDL window instead of needing a remote VNC/SPICE. With standalone QEMU (Using its parameters instead of libvirt ugly XML format), use -display sdl as a QEMU parameter. Note that this is useless if you’re doing passthrough, where it is actually better to not have a display and instead rely on evdev passthrough.

VirtIO doesn’t include USB. QEMU can emulate a NEC XHCI USB Controller (-device nec-usb-xhci), works with standard Drivers. Note that it is a pain to use USB if you have multiple controllers, since you may not like QEMU using the first open port that it finds to plug something. You need to be very verbose to specify each Device onto a specific Controller. A complex setup looks like this:

-device nec-usb-xhci,id=xhci2
-device nec-usb-xhci,id=xhci3
-device usb-host,bus=xhci3.0,port=1,hostbus=2,hostport=1
-device usb-host,bus=xhci3.0,port=2,hostbus=2,hostport=2
-device usb-host,bus=xhci3.0,port=3,hostbus=2,hostport=3
-device usb-host,bus=xhci3.0,port=4,hostbus=2,hostport=4
-device usb-host,bus=xhci2.0,port=1,hostbus=2,hostport=5
-device usb-host,bus=xhci2.0,port=2,vendorid=0x2833,productid=0x0031

I managed to install Win 7 pass through iGPU, it has no exclamation mark, even after reboot, i connected monitor to it, but see only black screeen, when i switch to it… When i switch to it before is same picture as on my Nvidia, but when i start i got black screen… So its doing something.

I wonder if QXL virtual graphics installed and second real one too, which is primary, should i disable QXL? Linux still claims that is using Geforce as primary display adapter - at least Unigine Heaven benchmark giving me it in info and FPS are as for it should be, no intel HD slimmer. BTW i dunno if Linux only feature, but Anydesk remote desktop (i started using it as Teamviewer replacement for XP and Linu) is actually giving me even 3D stuff, where teamviewer usually not worked, that is nice.

[img]

Windows7-PassThrough.png

[/img]

I did just quick hack, added to Grub start boot line (intel_iommu=on ) and IOMMU enabling and in virt-manager i setup passthrough (this step is virt-manager gone very nicelly), before IOMMU parameter i got some error, that is not possible, what was expected.

I really have to solve space problem with primary Linux EXT4 only for virt manager, i found some info that in QEMU conf i should change user and group, but only go other permission error when i tried to execute machine with disk on NTFS partition. Solution should be some chown ( sudo chown root.kvm /dev/kvm;chmod 660 /dev/kvm
), but i got again with it error (chmod: changing permissions of ‘/dev/kvm’: Operation not permitted
) and i never was big friend of Linux permission porn.

I also ported my QEMu DOS machine to virtual manager, set SB16, but no sound so far, otherwise is working. Sound in Win7 machine is fine - i excepted some stuttering etc, but so far, its nice at least for normal desktop usage.

Other thing to solve and save time, how QEMu and snapshots is there some GUI manager to do that?



Ok, if i make such XML edit can i still use machine with virtman? I tried just to switch from QXL to Vmvga, but when i run machine, i had no picture… in Virtman windows just black screen but machine ran, i can tell based on sounds. I dunno why libvirt has not SDL option, its some design thing, or just flaw?

Should that iGPU which im trying to pass through black listed, if yes, how to do it?



So too complex for me now… I just hoped that blacklist ATI gpu would be enough and i wanted to know its kernel name. lspci -v Giving me that magic name in last name of the block:
Kernel modules: Something.

Are you sure that just blacklist it, is not enough?

Ok, i at least solved that permission problem with images on other parition, problem was: Error starting domain: Cannot access storage file '/media/XXX
Solution, i sure that is not cleanest one: sudo chmod -R a+x /media/ruthan/Win7-64

Because i now have enough space, im trying to install Win98 machine without pass through.

I really can find any good virt-manager documentation, that is problems… unraid is really much more user friendly. For example which difference is between simulated i440fx and Q35 chipsets from QEMu point of view? I tried to google it and not got any good info…

When you create new QEMu machine, there are really 2 bad work flow traps:
1) When you selecting OS iso, down is checkbox detect in automatically, which i dunno if is really working for Win98 probably not… when you uncheck it, you can select anything from Windows 1.0 to Windows 10… I tried to find target OS info in virt-manager xml file, but i failed.
BTW when i tried to edit files, i didnt get any changes, i find out that have to restart machine, or restart whole virt manager by commands bellow and you cant do it with sudo… as i would excepted, because im used to make some system changes with it:
systemctl stop libvirtd
systemctl start libvirtd

2) Second is at the end of Wizzard (which is really short - install iso and target disk image / disk, mem + number of cpus, nothing else), here is another checkbox for edit machine settings after wizzard, where you can set lots of stuff as type of network card, sound card etc…

I wonder how cpu - topology settings is working… first time i set it to Pentium 3 and installation took lots of time, im installing it with default what is for my machine Skylake-Client-IBRS - i dunno what client-IBRS really means and its much faster. I suspect that if you select something else that kvm is no more active and that it means that all is emulated and much slower. I just thought that set Pentium 3 would be better for compatibility and that maximally i would be able to use new CPU istruction set, which is not really used for compilation of Win98 stuff anyway.

Regardless, when i installed it with P3 setting, i wasnt able to reach anything else that safe mode… otherwise i got just black screen with blinking cursor freeze and even that safemode took few minutes to make something from first blue screen… I just checked device manager, there werent really all devices, NIC or sound card was missing, Cirrus videocard was present.

I really have to learn how to use sdl or any other "real" not vnc/spice output, because it really mess with Win98 setup, which im used to.

virt-manager also is not able to remove USB 2 controller which is pointless for Win98 machine… and there is some Table input device, i dunno if for VNC or why, when i creating machine i can only add USB mouse, but after machine start, i magically got new mouse component in my machine, which before wasnt available… its a mess.

Now im trying Skylake install i will let you know.

Edit machine setting through info icon is so logical, Linux and UI design…

Regarding of Win7 passthrough i red that i could be EFI machine problem:
https://www.reddit.com/r/VFIO/comments/b…_graphics_to_a/

I will also finally add some addon videocard card to pass through but i have only PCI slot, so newest what i have in PCI is TNT2 M64 is probably no much Windows 7 fun… and i would have to install probably other machine now with XP to test.

Ok finaly added addon videocard to my NAS-backup, i find out that free slots is actually PCi-E and PCI are covered by other card and fan. So far can continue…

2020-02-29 01.42.33.jpg



I hope that you will appriete cable management… and pico PSU 200W will not explode… because this machine should really nas with some gaming possibilities, if there is emergency.

I managed to get Qemu Dos machine working with normal graphical output, its same as on Windows just run almost same commands from terminal, only in repository is quite old version 2.11, i will not change it, because its tested for KVM… Sound is working, FM is good, but FX sucks… otherwise same problems as with Windows version. So for pass through you would probably also need some Dos friend sound card.
I wonder how to make *.sh scripting to run qemu batch same as windows, i when i copy working command to from terminal to sh file, im just getting only some text echo.

If you’re doing passthrough, ideally, you may want to disable any other Video Card, including QXL, since that way it is easy to known if passthrough is working (The Firmware and Windows have two different priorities about which Video Card they use by default). At times there can be some weird VGA resources in the VM if there are multiple Video Cards, so having only one is the easiest way to ensure that it works from the moment that the VM posts up to Windows.
IGP Passthrough is a bit harder than passing a discrete Video Card. Actually, you may be better out trying Intel GVT-g for GPU Virtualization of the Intel integrated GPU if you have a supported Intel Processor (Which you have).
I know NOTHING about virt-manager and libvirt idiosyncrasies since I use QEMU via command line. libvirt was intended to provide a unified XML format so that VM configuration files could be ported from one Hypervisor to another one.
Audio issues were a pain in the butt to debug since there were a multitude of parameters (-audiodev) and backends (ALSA, pulseaudio, and some more). People that tinkered with them had some luck getting things running.


Have you actually tried to read my guide? Literally, there are four years of experience dumped there. You see, this is NOT a walk in the park. You may be able to duct tape things and get them working following random guides, but you don’t know the logic or reasoning behind things, which is WHY my guide is so long. While the guide is outdated (The last time I tested following it to completion was 4 years ago) and may not work exactly as described due to Arch Linux rolling release nature, it should still teach you some Linux basics and how to tackle some issues.
Jump to the “QEMU INVOCATION” part of my guide. And if you want to know what is the difference between 440FX and Q35, jump to “SYSTEM TOPOLOGY”.

@zir_blazer

Thanks for info.
I tried Geforce 6600LE passthrough, i got info when im able to see card in virtual my IOMMU, kernel and all other low level porn, so im doign this part right. But i virtual machine i got Code 12 error on it.

I now found some better tutorial:
https://heiko-sieger.info/running-window…ga-passthrough/

Its not using virt-manager, but just vanilla QEMU, i now finally have some QEMU starting script and understand all its variables… im learning lots of new stuff, but its classical too many variable problem. After i will make something working with QEMu scripts, i could maybe try to derive virt-manager configuration for it… but there is lots options missing and maybe it could be side loaded through XML file, maybe not… in such situation is Qemu script cleaner…

I know that there would some hassle with iGPU, but really lots of things, with Unraid you just clicked through few buttons. Geforce 6600 is not idea too, too old… i will try make it to work… but maybe i will try other gpu, even if it would not look nice to get first success after that it would be much easier so far… even if all testing commands (https://heiko-sieger.info/running-window…k_Configuration ) reports success, i never got get picture (not even Windows boot logo, nothing)… but i finished base qemu script few hours ago and i had not time to mess with magic parameters, there is quite few of them depends on used card…

I got also some info that iGPU need be done through gvt-d, i only know it highlevel from Phoronix, so its again whole other chapter to learn.
Main question is if it working with other GPU and it should be blacklisted, or intel driver should be loaded for host Linux as primary driver etc… from quick reading im not sure about. Im needing something what will work beside other main dedicated GPU used for Linux, at least now for testing.
I dont get it where is diference between gvt-d and "standard" pass through its some special OS driver, its device changed from Intel HD graphics to some special gvd-t one?
I red that its possible to use with virt-manager, at least with some xml edit…

Some info branch is also connected with Proxmox, could it be run on Mint? I got info that is fine on Debian and you know Mint-<Ubuntu-<Debian… It seems like some middle way between KVM with QEMU scripts and virt-manager and Unraid. If someone want to start from nothing it could be the way.

Yeah its exactly what you writing… im getting there, could you give short info what is gvt-d and where is difference? Sound would be next step… What about USB sound card passthrough isnt it just quick and clean solution?

Your guide its still to scary… but im getting there, i started with virt-lib… now i have complex Qemu script thing tutorial (, but written for Mint for example network bridge settings was done through network manager not some scary scripts), so its much more friendly for me… if it will fail, i will try to check yours… i have lots materials to study… In general, i dont what to know this stuff, i dont have too much happiness from it… even if will learn it, i will forget it quickly… but its good starting point for for next… im building some my personal guides, just for me, how to make it quickly done next time…

440Fx vs Q35, i read some we are working on it 2012 pdf presentation… but true is that its not like in real world, there are lots of 440fx hacks which are not really possible with that HW and you can do it with such virtual machine and EFI complicated things even more. Im still getting some info about that i could maybe solve my problems with using 440 machine, its even default in libvirt.

What would help me is info about virtio - are there virtual disk devices and network cards much better than other normal emulated stuff? Is somewhere some real benchmark of bare metal and IDE /SATA / Virtuo controllers etc?

BTW there is even VFIO Discord server to make things more modern:
https://discordapp.com/channels/24418792…190447147286529

Ok i did some something, so far no picture, i even tested more monitors and output… I will post Qemu scripts later.

But what about kernel parameters? What is exactly $vt_handoff - its really neede, i red that is something with ALT+CRTL+FX console thing and and ALT+CRTL+F7 switch between text and video mode, but im not really sure if need it.
There is also video=efifb:off , some tutorial saying to try nomodeset , i never fully undestood these.
There is also update-initramfs -u is needed for these kernel flags, its just for vfio-pci

Otherwise i also checked with qemu monitor, info pci command that vga pass through devices are there… so problem is really some Linux magic how to get something to screen… im not getting any error when i try script. Have tried q35, pc(it should be alias for 440)… EFI, Bios etc, still nothing.

I find out that there are zillions of Qemu machine types, some of them has Ubuntu codes in their names? Is ok to use, just q35 and pc as machine types?


Supported machines are:
pc-i440fx-zesty Ubuntu 17.04 PC (i440FX + PIIX, 1996)
pc-i440fx-yakkety Ubuntu 16.10 PC (i440FX + PIIX, 1996)
pc-i440fx-xenial Ubuntu 16.04 PC (i440FX + PIIX, 1996)
pc-i440fx-wily Ubuntu 15.04 PC (i440FX + PIIX, 1996)
pc-i440fx-trusty Ubuntu 14.04 PC (i440FX + PIIX, 1996)
ubuntu Ubuntu 18.04 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-bionic)
pc-i440fx-bionic Ubuntu 18.04 PC (i440FX + PIIX, 1996) (default)
pc-i440fx-bionic-hpb Ubuntu 18.04 PC (i440FX + PIIX, +host-phys-bits=true, 1996)
pc-i440fx-artful Ubuntu 17.10 PC (i440FX + PIIX, 1996)
pc-i440fx-2.9 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.8 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.7 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.6 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.5 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.4 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.3 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.2 Standard PC (i440FX + PIIX, 1996)
pc Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-2.11)
pc-i440fx-2.11 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.10 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.1 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.0 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.7 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.6 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.5 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.4 Standard PC (i440FX + PIIX, 1996)
pc-1.3 Standard PC (i440FX + PIIX, 1996)
pc-1.2 Standard PC (i440FX + PIIX, 1996)
pc-1.1 Standard PC (i440FX + PIIX, 1996)
pc-1.0 Standard PC (i440FX + PIIX, 1996)
pc-0.15 Standard PC (i440FX + PIIX, 1996)
pc-0.14 Standard PC (i440FX + PIIX, 1996)
pc-0.13 Standard PC (i440FX + PIIX, 1996)
pc-0.12 Standard PC (i440FX + PIIX, 1996)
pc-0.11 Standard PC (i440FX + PIIX, 1996)
pc-0.10 Standard PC (i440FX + PIIX, 1996)
pc-q35-zesty Ubuntu 17.04 PC (Q35 + ICH9, 2009)
pc-q35-yakkety Ubuntu 16.10 PC (Q35 + ICH9, 2009)
pc-q35-xenial Ubuntu 16.04 PC (Q35 + ICH9, 2009)
pc-q35-bionic Ubuntu 18.04 PC (Q35 + ICH9, 2009)
pc-q35-bionic-hpb Ubuntu 18.04 PC (Q35 + ICH9, +host-phys-bits=true, 2009)
pc-q35-artful Ubuntu 17.10 PC (Q35 + ICH9, 2009)
pc-q35-2.9 Standard PC (Q35 + ICH9, 2009)
pc-q35-2.8 Standard PC (Q35 + ICH9, 2009)
pc-q35-2.7 Standard PC (Q35 + ICH9, 2009)
pc-q35-2.6 Standard PC (Q35 + ICH9, 2009)
pc-q35-2.5 Standard PC (Q35 + ICH9, 2009)
pc-q35-2.4 Standard PC (Q35 + ICH9, 2009)
q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-2.11)
pc-q35-2.11 Standard PC (Q35 + ICH9, 2009)
pc-q35-2.10 Standard PC (Q35 + ICH9, 2009)
isapc ISA-only PC
none empty machine
xenfv Xen Fully-virtualized PC
xenpv Xen Para-virtualized PC

There are my QEMU scripts without some headers and footers, to export some system variable for pulse audio and process naming adn check is machine is not already running.

iGPU EFI:


cp /usr/share/OVMF/OVMF_VARS.fd /tmp/my_vars.fd

qemu-system-x86_64 <br />-name $vmname,process=$vmname <br />-machine type=q35,igd-passthru=on,accel=kvm <br />-cpu host <br />-smp 3,sockets=1,cores=3,threads=1 <br />-m 8G <br />-balloon none <br />-rtc clock=host,base=localtime <br />-vga none <br />-nographic <br />-serial none <br />-parallel none <br />-soundhw hda <br />-usb <br />-device usb-host,vendorid=0x093a,productid=0x2521 <br />-device usb-host,vendorid=0x060b,productid=0x2312 <br />-device vfio-pci,host=00:02.0 <br />-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd <br />-drive if=pflash,format=raw,file=/tmp/my_vars.fd <br />-drive file=/media/Win7_64/VirtualMachines/Win7-Pro-SP1-x64_EN_DVD.iso,index=1,media=cdrom <br />-drive file=/media/Win7_64/VirtualMachines/virtio-win-0.1.171.iso,index=2,media=cdrom <br />-drive id=disk0,if=virtio,cache=none,format=vmdk,file=/media/Win7_64/VirtualMachines/Win7-64-EFI.vmdk <br />-boot order=dc <br />-netdev type=tap,id=net0,ifname=vmtap0,vhost=on <br />-device virtio-net-pci,netdev=net0,mac=00:16:3e:00:06:06


iGPU Bios (legacy):

qemu-system-x86_64 <br />-name $vmname,process=$vmname <br />-machine type=q35,igd-passthru=on,accel=kvm <br />-cpu host <br />-smp 3,sockets=1,cores=3,threads=1 <br />-m 8G <br />-balloon none <br />-rtc clock=host,base=localtime <br />-vga none <br />-nographic <br />-serial none <br />-parallel none <br />-usb <br />-device usb-host,vendorid=0x093a,productid=0x2521 <br />-device usb-host,vendorid=0x060b,productid=0x2312 <br />-device vfio-pci,host=00:02.0 <br />-drive file=/media/Win7_64/VirtualMachines/Win7-Pro-SP1-x64_EN_DVD.iso,index=1,media=cdrom <br />-drive file=/media/Win7_64/VirtualMachines/virtio-win-0.1.171.iso,index=2,media=cdrom <br />-drive id=disk0,if=virtio,cache=none,format=vmdk,file=/media/Win7_64/VirtualMachines/Win7-64-EFI.vmdk <br />-boot order=dc <br />-netdev type=tap,id=net0,ifname=vmtap0,vhost=on <br />-device virtio-net-pci,netdev=net0,mac=00:16:3e:00:06:06


Nvidia 6600LE Bios (i tried EFI too but is thing that videocard has support of it… and legacy would be better for this one)
qemu-system-x86_64 <br />-name $vmname,process=$vmname <br />-machine type=q35,accel=kvm <br />-cpu host,kvm=off <br />-smp 3,sockets=1,cores=3,threads=1 <br />-m 8G <br />-balloon none <br />-rtc clock=host,base=localtime <br />-vga none <br />-nographic <br />-serial none <br />-parallel none <br />-usb <br />-device usb-host,vendorid=0x093a,productid=0x2521 <br />-device usb-host,vendorid=0x060b,productid=0x2312 <br />-device vfio-pci,host=08:00.0 <br />-drive file=/media/Win7_64/VirtualMachines/Win7-Pro-SP1-x64_EN_DVD.iso,index=1,media=cdrom <br />-drive file=/media/Win7_64/VirtualMachines/virtio-win-0.1.171.iso,index=2,media=cdrom <br />-drive id=disk0,if=virtio,cache=none,format=vmdk,file=/media/Win7_64/VirtualMachines/Win7-64-EFI.vmdk <br />-boot order=dc <br />-netdev type=tap,id=net0,ifname=vmtap0,vhost=on <br />-device virtio-net-pci,netdev=net0,mac=00:16:3e:00:06:06


From most of them i removed sound ( -soundhw hda </i> ), but its not source of problems "’&quot; is ekvivalent of “^” with windows batch just enable multiline commands.
I would like to use comments (#) inside of this Qemu long command, to add some description, but i dunno how to it in *.sh, maybe is not possible.

Used ids are:

Nvidia 6600:
08:00.0 //IOMM group
10de:0142 // id
pci:v000010DEd00000142sv00000000sd000002F2bc03sc00i00
alias pci:v000010DEd00000142sv00000000sd000002F2bc03sc00i00 vfio-pci

Intel GPU:
00:02.0 // Group ( lspci -nn | grep 00:02.)
8086:1912 //Id its named Display adapter is not classic VGA, so lspci | grep VGA will not work
pci:v00008086d00001912sv00001458sd0000D000bc03sc80i00
alias pci:v00008086d00001912sv00001458sd0000D000bc03sc80i00 vfio-pci

All devices are in its IOMM group alone, so there si need to fiddle with it…

Mouse and keyboard:
- now i have problem that keyboard is not returning, after stop of KVM machine, probably because of cheap us USB hub, i have to check cabling and ad some markers (with is work in progres i have lots of cables and make them marked really helps)

Mouse:
Bus 001 Device 005: ID 093a:2521 Pixart Imaging, Inc. Optical Mouse

Keyboard:
Bus 001 Device 007: ID 060b:2312 Solid Year

When i run qemu monitor usb device info (info usb). Im getting better use devices names, these are strange


Black list (sudo pluma /etc/modprobe.d/blacklist.conf ), nothing is now black listed:

# This file lists those modules which we don’t want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.

# evbug is a debug tool that should be loaded explicitly
blacklist evbug

# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd

# replaced by e100
blacklist eepro100

# replaced by tulip
blacklist de4x5

# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394

# snd_intel8x0m can interfere with snd_intel8x0, doesn’t seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m

# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2

# Causes trackpads to stop working on Lenovo 11e 2nd gen (Ubuntu: #1802135)
# and Lenovo x240 to hang on boot (Ubuntu: #1802689)
blacklist i2c_i801

# replaced by p54pci
blacklist prism54

# replaced by b43 and ssb.
blacklist bcm43xx

# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps

# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi

# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp

# ugly and loud noise, getting on everyone’s nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr

# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac
#by RuThaN
#blacklist snd_hda_intel
#blacklist snd_hda_codec_hdmi
#blacklist i915


Grub.cfg (/boot/grub/grub.cfg) entry:

menuentry ‘Linux Mint 19.3 MATE’ --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-simple-f604491d-e061-d343-cdbd-9c6083e3505d’ {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root f604491d-e061-d343-cdbd-9c6083e3505d
else
search --no-floppy --fs-uuid --set=root f604491d-e061-d343-cdbd-9c6083e3505d
fi
linux /boot/vmlinuz-5.3.0-40-generic root=UUID=f604491d-e061-d343-cdbd-9c6083e3505d ro quiet splash $vt_handoff intel_iommu=on nomodeset
initrd /boot/initrd.img-5.3.0-40-generic
}


Vfio config - /etc/modprobe.d/vfio.conf - empty

Modprobe local /etc/modprobe.d/local.conf

alias pci:v000010DEd00000142sv00000000sd000002F2bc03sc00i00 vfio-pci
alias pci:v00008086d00001912sv00001458sd0000D000bc03sc80i00 vfio-pci
options vfio-pci ids=10de:0142,8086:1912
options vfio-pci disable_vga=1


KVM conf sudo pluma /etc/modprobe.d/kvm.conf:
options kvm ignore_msrs=1

initram modules /etc/initramfs-tools/modules: // for update you need to run update-initramfs , added to end of line these:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
vhost-net


I also tried to add x-vga=on, but im getting this:
(qemu) qemu-system-x86_64: -device vfio-pci,host=08:00.0,x-vga=on: vfio error: 0000:08:00.0: failed getting region info for VGA region index 8: Invalid argument
device does not support requested feature x-vga

Because im tired of pass through i test Win98 with virtualized graphics.

Good news:
Sound is working out of box with vanilla Win98SE cd and its better than i heard in other Win98 emulations as Vmware were you usually get some stuteriing at leas for welcome sound… With QEMu this one is clean and what is new music background them.
Bad there are probably still some problems, in console is spamming this message:
sb16: warning: command 0xf,1 is not truly understood yet

There are Qemu emulated sound hardware options(-soundhw parameter, in theory Nice there is even GUS):
sb16 // Creative Sound Blaster 16
es1370 // ENSONIQ AudioPCI ES1370
ac97 //Intel 82801AA AC97 Audio
adlib //Yamaha YM3812 (OPL2)
gus //Gravis Ultrasound GF1
cs4231a CS4231A
hda // Intel HD Audio
pcspk //PC speaker


Bad if sound quality would be such quality im good with it… So in theory you can save one PCI soundcard slot. There are also other options ES1370 and AC97 to emulate, so it could only better.

Bad news:
- mouse is not working, i have found old QEMu bug which should be fixed but as with lots of Linux bugs i was probably half fixed, or its broken again:
https://bugs.launchpad.net/qemu/+bug/521994
- there DOS double arrow key press detection is still there at least for Scandisk part of installation
- network card which i trying to emulate is not here, even find new hardware is not working.
- plug and play bios device - had problem (code 24), when i remove it and let it detect again is the same

Starting script:

qemu-system-x86_64 -m 512 <br />-machine type=pc-i440fx-bionic <br />-smp 1,sockets=1,cores=1,threads=1 <br />-vga cirrus <br />-rtc clock=host,base=localtime <br />-parallel none <br />-balloon none <br />-mem-prealloc <br />-serial none <br />-parallel none <br />-L . <br />-soundhw sb16,adlib,pcspk <br />-boot order=cd <br />-no-acpi <br />-hda ./Win98-System.vmdk <br />-cdrom ./Win98SE-ENG.iso <br />-k en-us <br />-net nic,model=rtl8139 -net user


In progress:
- USB mouse
- networking // to safe network card slot in physical machine

Just one funny thing:
You can kill Win98 installation just by have 2 same disk images there are probably same ids (i was lazy to search qemu command to create new one so i just copied on vmdk) - mounted as C and D, at the end of scandisk it freeze.

Old Qemu in Mint / ubuntu
My newest distro sill has Qemu 2.11 which is 2 years old, i wanted to keep it, because passthrough is tested with it etc… but i will try to make disk image sideload newer version, is really too old and it shame… with all that we keep thing up to date Linux bla, bla… i know what rolling distros are, but still.

Rockstar ate my hamster … and keyboard:
Other i removed USB switch, but when i passthrough keyboard (no Win98 one) to virtual its not comming back, mouse does… Its annoying.

Wow… i just did it… I got Nvidia 6600 pass through working!

Solution was that x-vga thing. I when i tried to add it to qemu:

I was getting error:
qemu-system-x86_64: -device vfio-pci,host=08:00.0,x-vga=on: vfio error: 0000:08:00.0: failed getting region info for VGA region index 8: Invalid argument
device does not support requested feature x-vga


I had to remove this line from /etc/modprobe.d/local.conf :
options vfio-pci disable_vga=1

x-vga options is add to qemu like this:
-device vfio-pci,host=00:02.0,x-vga=on </i>

Because its linux and i had too after that do this:
sudo update-initramfs -u
+reboot.

So my setup was probably right for gpu with is supporting EFI (has EFI bios), but because i have old card i have go legacy… and regarding of Discord iGPU also only working in legacy mode… if you later comeback to it, because with Unraid iGPU worked too, but i can live without it. Todays iGPU arent so bad and it would get only better. Im very worse iGPU on my GPD Win 2 - Windows haldheld and its still quite good.

Otherwise i tried with Win 98 qemu machine networking, it seems that only this nic is can be detected (by Add Hardware wizzard) by Win98, is ne2k_isa - old 10 Mb/s slimmer, anything else nothing.

Im getting some IP address but i dunno if its really working, device manager is fine… It tried telnet to my other machine (telnet 10.0.0.15 3389 - just hit remote desktop listerner), just to try something outside of machine, but nothing, but that telnet is some strange thing… after command some gui starting…
Im using networking for poor SLIRP -net nic,model=ne2k_isa -net user
I know how to set proper one, but only on Windows with TAP driver: -net nic,model=rtl8139 -net tap,ifname=TAP
i dont really know how its play with linux bridge which i created for virtio networking: -device virtio-net-pci,netdev=net0,mac=00:16:3e:00:06:06

Networking and Linux is deadly combo for me, i tried to read some linux tutorials about it, but they are scary, so if there is some networking guy (and 99% Linux guys are), they could help me. Worst problem is solved, we have some passthrough…

I also would need lots of backuping… its possible how to to Mint Caja add right click pack with 7zip option? To do quick backup of disk images? I hate do to it in terminal.
Update: I found that is already in-build under Right-click compress folder.

So far with 3 cores of Core i5 6500T low power(35W) cpu , i would be able to recognize difference between this machine and physical one, at least for normal desktop experience… We will see with games, is we would be plague with sound stuttering which some guides trying to solve.

I just played Quake 3 on it, its nice…

ItsWorking.png



After i made screen i installed Nvidia drivers for Geforce its working too.

At least proper shutdown of Win7 machine is even giving me keyboard back, maybe that quit command is not idea, but when i searched qemu command i found only ahci shutdonw - not working during step and quit for hard shutdown…