Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hypervisor whpxvm.dll does not work #975

Closed
LegacyFreak opened this issue May 2, 2021 · 21 comments
Closed

Hypervisor whpxvm.dll does not work #975

LegacyFreak opened this issue May 2, 2021 · 21 comments

Comments

@LegacyFreak
Copy link

Hello,
it would be nice if hardware virtualisation would work with otvdm.
If I try this, I get the following errror when I start any application.
My configuration:

  • CPU: AMD Athlon 3000 with virtualisation enabled in BIOS
  • Windows 10 H121 with features
    • Plattform for Virtual Maschiens enabled
    • Windows Hypervisor Platform
  • Load64bitDll.dll, WinHvPlatform.dll and wow64hlp.dll (from 12.02.2020 and 13.02.2020) downloaded and copied in the otvdm directory. This was was recommend in another issue here.

Screenhot

Trace:
version: 2083
0ba0:CallTo16(func=120f:001a,ds=195f) ss:sp=195f:8694 ax=0000 bx=3cb4 cx=1f40 dx=0000 si=0000 di=195e bp=0000 es=11f7 fs=0053

@ArguaBILL
Copy link

I have an AMD Ryzen Threadripper 2970WX and, although I don't get the "Failed to load" message like you do, when I run a trace I receive a similarly short one-liner.

I have ensured that I can run Ubuntu in a Hyper-V virtual machine.

The binary I tired to run for this trace is the venerable Tetris for Windows from 1990 (even GVM can run it, and I've found it can't run many of the programs I use at all)

The second trace file is running the same Tetris binary again with the only thing different in my config file being that set it back to the default MAME 386 emulation core.

trace.txt
trace2.txt
.

@ArguaBILL
Copy link

Oh yeah, just an aside, this Threadripper build of mine is a completely different computer from the one I sent the previous Musinum trace from (I'm currently using that as my daily driver specifically because of this Hyper-V issue that seems to exist with AMD Zen* processors)

@LegacyFreak
Copy link
Author

Hallo,
yes maybe this problem only occurs on AMD CPUs. I just tried it again with the last version oft otvdm and the last WinHvPlatform32.zip package. No Application works with the hypervisor. I always get the short trace mentioned above. The Messagebox doesn't appear anymore but otvdm.exe hangs in this situation.

@LegacyFreak
Copy link
Author

My last test was done on Windows 11 Home with "Plattform for Virtual Maschines" and "Windows Hypervisor Platform" enabled.

@ArguaBILL
Copy link

My last test was done on Windows 11 Home with "Plattform for Virtual Maschines" and "Windows Hypervisor Platform" enabled.

you made sure to also have Hyper-V itself enabled right

@otya128
Copy link
Owner

otya128 commented Nov 18, 2021

Does it have the following structure?

  • otvdm.exe
    • dll
      • krnl386.exe16
      • whpxvm.dll
      • wow64hlp.dll
      • Load64bitDLL.dll
      • WinHvPlatfom.dll

@LegacyFreak
Copy link
Author

Hello,
I think you mean the structure of files and foldes in the otvdm directory, right?
Yes, I tried it now with this. Same problem. Every testet app hangs an does not start. No error meessage at all.
This is the trace output:

version: 2174
12c0:CallTo16(func=13cf:00de,ds=18e7) ss:sp=18e7:e8b0 ax=0000 bx=8000 cx=0800 dx=0000 si=0000 di=18e6 bp=0000 es=11f7 fs=0053

@ArguaBILL
Copy link

I am positive they are all in their correct place.

@dcharlespyle
Copy link

Still have the same issue on Windows 11 Pro.
image
Everything related to Hyper-V is installed and working. Even can use QEMU with acceleration.

I've tried moving the files around to different places. So far, I have been unable to get acceleration, and get the same errors.
Elevation generates all sorts of other errors about file permissions and so forth.

@otya128
Copy link
Owner

otya128 commented Nov 19, 2021

image

I enabled Hyper-V Hypervisor and Windows Hypervisor Platform, restarted, placed the version 1.1 dll in the dll folder, and changed the ini file, but it works fine.
More detailed version information and CPU information are required.

@dcharlespyle
Copy link

Running Windows 11 Pro build 22000.318 with Windows Feature Experience Pack 1000.22000.318.0.

image

Processor is an Intel Core i7-4770 with all features enabled except Intel IPT, which the UEFI BIOS will not allow to enable, though present in this processor. All virtualization is enabled and working. Core Isolation is enabled and working.

image

And I have tested it both with Core Isolation enabled and disabled. Same result. However, QEMU works perfectly fine with it, either way, even using WHPX.

All virtualization is enabled:

image
image

BCD information and configuration for Windows Boot Loader:
image

Hypervisor settings:

image

Hypervisor is detected:
image

Version of winevdm used is current stable release 0.8.0a (but it says "version: 2156" when run in a command prompt). I have tried both the package recommended in another issue thread and a newer one posted in yet another. I have also tried the dll files in multiple locations in the otvdm folders, and even moved the whxpvm.dll file around with them in another round of trials with no success.

I had similar failure with multiple Windows 10 Pro preview builds as well as Windows 11 Pro builds from preview to retail. Even did fresh installs to see whether it would make a difference. It didn't. The only difference seems to be in which line of code throws the error.

Previous:

image
image

Current:

image

I also have tried elevation of privileges in folders and on apps with the different configurations, but that just generates a series of other errors about needing elevation and about not being able to find files required, and so forth.

But, as stated before, QEMU works perfectly with WHPX, generating no errors about not finding a hypervisor. Running...
qemu-system-x86_64.exe -smp 2 -m 4096 -cdrom ubuntu-20.04-desktop-amd64.iso -display sdl -machine q35 -accel whpx -net nic -net user,hostfwd-tcp::1022-:22

...gives me: "Windows Hypervisor Platform accelerator is operational" in a command prompt, and QEMU just works and runs the OS on the Live CD ISO accelerated. I've been trying for months to get this working as it seems to work for others. I'm not sure why ntvdm cannot find the hypervisor whereas QEMU seems to have no issue with doing so. Memory pointer handling, perhaps? I have no further ideas at the moment...

I think the ntvdm program is wonderful! I'm glad that I can at least use 16-bit programs on 64-bit Windows without having to install a whole OS in a VM. I just wish that the whpxvm.dll file would work on my system because of having to wait for images to load in one of the programs I use. The other 16-bit programs work fine and load quickly enough without WHPX. But, if I could get WHPX to work on this system with ntvdm, it would be even better. Thanks for the efforts you have put into this!

@ArguaBILL
Copy link

Oh, so this is even an issue on an older Intel processor?
Also, IPT doesn't seem like anything relevant to this and seems to be something meant for enterprise security clearance, so I wouldn't worry about it at all.

@dcharlespyle
Copy link

IPT is the minimum for systems without a hardware TPM 2.0 module. Thus, I had to bypass the TPM requirement to install the retain version of Windows 11. Of interest is that I did not have to bypass the CPU requirement. It installed fine and updates just fine even on that processor. Runs fine, too. Windows installation didn't even call attention to the fact that it was not a Gen 7 or Gen 8 processor.

But this issue with ntvdm not wanting to run WHPX on this processor has been a longstanding issue in both Windows 10 Pro preview builds and Windows 11 Pro. Other people seem to be getting it to work just fine but not me on this system. It cannot seem to find the hypervisor partition whereas QEMU finds it just fine on this same system with this same processor.

@otya128
Copy link
Owner

otya128 commented Nov 20, 2021

Windows Hypervisor Platform seems to be enabled, so the most likely situation is that Load64bitDll.dll is out of date and wow64hlp.dll is not loaded properly.
However, if there is no problem, it can not be reproduced here, so it is very difficult to solve ...

.\dll\wow64hlp.dll	7680 bytes	(2021/01/09T17:35:46+09:00)
.\dll\WinHvPlatform.dll	11264 bytes	(2021/11/14T08:20:59+09:00)
.\dll\Load64bitDll.dll	15360 bytes	(2021/11/14T09:30:22+09:00)

@LegacyFreak
Copy link
Author

Hello,
I am using the Home Edition of Windows 11. The feature "Hyper-V" seems not to be included. Only "Windows-Hypervisor-Platform" and "Platform for virtual computers". What features are exactly required for otvdm to work with the hypervisor whpxvm.dll ?

Features

@otya128
Copy link
Owner

otya128 commented Nov 21, 2021

Home Edition does not have Hyper-V settings, so it should work if you enable Windows Hypervisor Platform and then reboot.

@LegacyFreak
Copy link
Author

I didn some further testing. With an old Notebook with an Intel Celeron N2840 CPU my otvdm configuration works with hypervisor whpxvm.dll. So my problem described at the beginning of this issue seems definitly related to my AMD CPU on my desktop computer.

@dcharlespyle
Copy link

dcharlespyle commented Dec 14, 2021 via email

@ArguaBILL
Copy link

ArguaBILL commented Jan 7, 2022

try using this new build of the whpxvm.dll file, it got hypervisor-accelerated otvdm working on my threadripper:

whpxvm.zip
Compiled from the latest master with the change indicated in this comment.

Originally posted by @JamesDubbeleu in #1085 (comment)

@JamesDubbeleu
Copy link

The change in the earlier zip file has been added to the master branch, test that instead

@LegacyFreak
Copy link
Author

Hallo,
I tried build 2230 and hypervisor acceleration now works on my AMD Athlon 3000G. Thanks for the great job.
Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants