Opened 5 years ago
Last modified 2 years ago
#19595 reopened defect
memtest86 8.3 freezes
Reported by: | Artem S. Tashkinov | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.8 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | Linux |
Description
https://www.memtest86.com/download.htm
doesn't work in VirtualBox 6.1.8 - it freezes on start on
Retrieving CPU MSR data...
I've tried playing with various VBox settings - nothing helps.
Attachments (2)
Change History (14)
by , 5 years ago
Attachment: | VirtualBox_MemTest86+.png added |
---|
comment:1 by , 5 years ago
comment:2 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please attach a full VBox.log and reopen
comment:3 by , 4 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
by , 4 years ago
comment:4 by , 4 years ago
The disk image was made by running:
VBoxManage convertfromraw memtest86-usb.img memtest86.vmdk --format VMDK
Changing various system VM settings including OS, CPU options, CPUs number, IOAPIC doesn't help.
comment:5 by , 4 years ago
Now I'm running VBox 6.1.12 and using MemTest86 8.4 free edition: https://www.memtest86.com/downloads/memtest86-usb.zip
comment:7 by , 4 years ago
memtest is executing an rdmsr instruction for an MSR which is not existing for the selected CPU profile. This raises a #GP(0) exception which is not expected sending memtest into an error loop. They seem to assume that certain MSRs exist based on maybe CPUID values (they don't seem to expect that memtest can be run in a VM which has a stripped down CPU model).
Trunk contains a Ryzen 1800X profile which adds this MSR and with that memtest works, you could try it from here. Whether we include the profile into the next 6.1 maintenance release is being discussed but memtest should probably handling non existing MSRs properly in the first place. :)
comment:8 by , 4 years ago
Great many thanks for a solution but I'm curious how to use the said profile - to be honest it's the first time I've heard about CPU profiles. Is this a new feature? Am I missing something? ;-)
comment:9 by , 4 years ago
A reply from a MemTest86 developer:
MSR are part of all modern CPUs. What this means is that Virtual box fails to correct emulate whatever real CPU it is they are trying to emulate. Doesn't make sense to emulate just some of the CPUs instructions/ registers (in my opinion this is asking for random expected crashes). i.e. their CPU profile is wrong.
https://forums.passmark.com/memtest86/48686-msr-reading-bug-in-memtest86-for-virtual-machines
comment:10 by , 4 years ago
CPU profiles are used to present a more precise model of the host CPU to the guest, see the database we have in trunk here. By default the profile matching the host CPU the closest is selected (for 6.1 where the Ryzen profile does not exist VBox selects a "AMD FX-8150 Eight-Core" CPU iirc).
The response of the memtest86 developer does not take into account that we don't emulate the CPU (what qemu without kvm or bochs are doing) but virtualize the real one so that the host and guest can share it. What this means is that we can't just pass through all available MSRs of the host CPU to the guest or it might mess up some internal state leading to host crashes. VirtualBox also can't emulate all existing MSRs for all possible CPUs because modern CPUs have thousands of those many of which are poorly documented or not documented at all by the vendor. Thatswhy VBox exposes only MSRs which are safe because they are emulated and pretends the other MSRs don't exist and throws a #GP(0) instead of ignoring reads or writes to them which can lead to weird mishbehavior inside the guest as well. This is a common technique in virtualization not only for MSRs but also when exposing features through cpuid, features which are not supported are stripped from what is presented to the guest.
comment:11 by , 4 years ago
Memtest86 developers have added a workaround specifically for VirtualBox which I guess will be available in a new version. This ticket might be closed if VirtualBox developers don't intend to resolve it.
comment:12 by , 2 years ago
This bug report can be closed as upstream has added a workaround specifically for VBox.
The last lines in a log are:
i.e. nothing interesting.