X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

This is for discussing general topics about how to use VirtualBox.
Post Reply
grahamperrin
Posts: 57
Joined: 27. Apr 2008, 15:19

X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by grahamperrin »

cpum#1: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest [ver=19 pass=final] (VERR_SSM_LOAD_CPUID_MISMATCH).

I see a 2016 topic X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest [ver=1 that involved an attempt to teleport. No such attempt here.

The state of the guest:
  1. was saved whilst hosting with an HP ZBook 17 G2 https://bsd-hardware.info/?computer=2ea77aa55d11 (four cores, eight threads usable as eight CPUs in a VirtualBox guest)
  2. can not be started with the same host OS (the same boot disk) on an HP EliteBook 8570p with fewer available threads.
I thought that I took care to not save any state whilst using eight of eight with the ZBook, maybe I was mistaken.

Do these lines, logged whilst using the ZBook, show me using all eight?

Code: Select all

00:00:01.196986 TM: GIP - CPU: iCpuSet=0x0 idCpu=0x0 idApic=0x0 iGipCpu=0x7 i64TSCDelta=0 enmState=3 u64CpuHz=2494278658(*) cErrors=0
00:00:01.196991 TM: GIP - CPU: iCpuSet=0x1 idCpu=0x1 idApic=0x1 iGipCpu=0x3 i64TSCDelta=0 enmState=3 u64CpuHz=2494278660(*) cErrors=0
00:00:01.196996 TM: GIP - CPU: iCpuSet=0x2 idCpu=0x2 idApic=0x2 iGipCpu=0x2 i64TSCDelta=0 enmState=3 u64CpuHz=2494278656(*) cErrors=0
00:00:01.197007 TM: GIP - CPU: iCpuSet=0x3 idCpu=0x3 idApic=0x3 iGipCpu=0x5 i64TSCDelta=0 enmState=3 u64CpuHz=2494278660(*) cErrors=0
00:00:01.197011 TM: GIP - CPU: iCpuSet=0x4 idCpu=0x4 idApic=0x4 iGipCpu=0x4 i64TSCDelta=0 enmState=3 u64CpuHz=2494278659(*) cErrors=0
00:00:01.197015 TM: GIP - CPU: iCpuSet=0x5 idCpu=0x5 idApic=0x5 iGipCpu=0x0 i64TSCDelta=0 enmState=3 u64CpuHz=2494278660(*) cErrors=0
00:00:01.197023 TM: GIP - CPU: iCpuSet=0x6 idCpu=0x6 idApic=0x6 iGipCpu=0x1 i64TSCDelta=0 enmState=3 u64CpuHz=2494275522(*) cErrors=0
00:00:01.197027 TM: GIP - CPU: iCpuSet=0x7 idCpu=0x7 idApic=0x7 iGipCpu=0x6 i64TSCDelta=0 enmState=3 u64CpuHz=2494278660(*) cErrors=0
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by fth0 »

Those log messages show information regarding the physical CPUs, not the virtual CPUs.

Generally speaking, a saved state is like pausing/freezing a running system and preserving it, to be continued later on the exact same virtual hardware. Changing the physical CPUs means changing the virtual CPUs also, and that is not expected to work. You'll have to discard the saved state before running the VM on the new host.
grahamperrin
Posts: 57
Joined: 27. Apr 2008, 15:19

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by grahamperrin »

Thanks, so that's eight CPUs logged?

(The mention of threading arose from https://forums.FreeBSD.org/threads/8877/post-526566 – it's true that with HT disabled in BIOS, the number of CPUs presented by htop dropped from 8 to 4 at the host level.)
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by fth0 »

On your host, the number of CPU sockets (s) times the number of CPU cores per socket (c) times the number of CPU threads per core (t) is 8. You could have one 8-core CPU without hyperthreading, or one quad-core CPU with hyperthreading, or two quad-core CPUs without hyperthreading, or two dual-core CPUs with hyperthreading, or ... ;)
grahamperrin
Posts: 57
Joined: 27. Apr 2008, 15:19

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by grahamperrin »

I'll put the question another way.

Is that eight of something logged?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by fth0 »

Unfortunately, not in one place, if I understand your question correctly. Please provide a (zipped) VBox.log file and try to rephrase what exactly you want to know, then I'll try and answer using evidence from this VBox.log file. It is possible that we are misunderstanding each other, because you (or me ;)) may have a misconception somewhere.
grahamperrin
Posts: 57
Joined: 27. Apr 2008, 15:19

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by grahamperrin »

fth0 wrote:… Please provide a (zipped) VBox.log
Link provided in a private message.

(I can't tell whether logs such as these contain sensitive information.)
… rephrase what exactly you want to know,
Re: the opening post, whether the eight lines (from the log) were indicative of me using eight CPUs.

Eight was the maximum available, in settings for the guest, whilst I used the ZBook. With the EliteBook there's a maximum of four.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by fth0 »

FreeBSD 13.0-RELEASE, ZFS, upgraded from 12.2-2021-08-06-22-24-42.log wrote:
00:00:01.190334   NumCPUs           <integer> = 0x0000000000000004 (4)
00:00:01.223818 CPUM: Logical host processors: 8 present, 8 max, 8 online, online mask: 00000000000000ff
00:00:01.223820 CPUM: Physical host cores: 8
00:00:01.223881 Features
00:00:01.223881   Mnemonic - Description                                  = guest (host)
00:00:01.223927   MOVBE - MOVBE instruction                               = 1 (1)
00:00:01.224055 Full Name:                       "Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz"
FreeBSD 13.0-RELEASE, ZFS, upgraded from 12.2-2021-08-13-05-55-48.log wrote:
00:00:09.605763   NumCPUs           <integer> = 0x0000000000000004 (4)
00:00:09.654093 CPUM: Logical host processors: 4 present, 4 max, 4 online, online mask: 000000000000000f
00:00:09.654096 CPUM: Physical host cores: 4
00:00:09.654216 Features
00:00:09.654217   Mnemonic - Description                                  = guest (host)
00:00:09.654295   MOVBE - MOVBE instruction                               = 0 (0)
00:00:09.654517 Full Name:                       "       Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz"
00:00:09.661127 VMSetError: cpum#1: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest [ver=19 pass=final]
00:00:09.661178 SSM: LoadExec failed for 'cpum' instance #1 (version 19, pass 0xffffffff): VERR_SSM_LOAD_CPUID_MISMATCH
The ZBook has an Intel(R) Core(TM) i7-4710MQ CPU which has 4 cores and 8 threads, and the EliteBook has an Intel(R) Core(TM) i7-3520M CPU which has 2 cores and 4 threads. In the log messages above, the Physical host cores are should be the CPU cores, while the Logical host processors are the CPU threads. The red values are wrong, they should be 4 and 2 respectively. I don't know if this error only occurs on FreeBSD hosts and/or on those CPU models. That's the reason why the CPU model name is the most reliable source IMHO. ;)

You've provided 4 vCPUs to the VM (NumCPUs), but that isn't important here. Those vCPUs have no direct relationship to the CPU cores and threads, BTW. For example, you could provide 32 vCPUs to the VM on the ZBook and the EliteBook, although that wouldn't be wise to do. If you ever wanted to see what your favorite task manager looks like with many CPU cores, that's your chance. ;)

What is important here is the fact that you've used a saved state, which means pausing/freezing the VM including the guest OS, to unpause/unfreeze it at a later time. The virtual hardware of a VM is mostly independent of the physical hardware of the host, that's why you can change the Host Audio Driver inside the VM configuration while the VM is in the saved state. But:

Although there is no direct relationship between the vCPUs and the CPU cores and threads, the vCPUs are being run on the host CPU, and the running guest OS knows about the capabilities of the host CPU (as far as VirtualBox allows it). By exchanging the host CPU (ZBook -> EliteBook), you've removed CPU capabilities that the running guest OS knows to be available, and from the POV of the guest OS, the pause/freeze never took place ... that's why VirtualBox doesn't allow you to restore the VM from the saved state.

As a solution, you can either shut down the guest OS on the ZBook before transferring it to the EliteBook, or you can Discard Saved State... on the EliteBook. Please let me know if you have further questions.
Last edited by fth0 on 15. Aug 2021, 16:02, edited 1 time in total.
grahamperrin
Posts: 57
Joined: 27. Apr 2008, 15:19

NumCPUs

Post by grahamperrin »

fth0 wrote:… 4 vCPUs to the VM (NumCPUs),
Perfect. That's what I was looking for. I see 4 in both log files.
… you could provide 32 vCPUs to the VM on the ZBook and the EliteBook, …
This might be the first time I realised that the slider can be dragged into the red.

If I recall correctly was eight at most in the green on the ZBook.

It's four at most in the green (eight at most in the red, I'll not do this) on the EliteBook 8570p:
Screenshot: guest: System: Processor: CPUs
Screenshot: guest: System: Processor: CPUs
2021-08-15 12.19 eight CPUs.png (86.42 KiB) Viewed 7661 times
grahamperrin
Posts: 57
Joined: 27. Apr 2008, 15:19

Reusing saved states following a move from one host to another

Post by grahamperrin »

fth0 wrote:… By exchanging the host CPU (ZBook -> EliteBook), you've removed CPU capabilities that the running guest OS knows to be available, and from the POV of the guest OS, the pause/freeze never took place ... that's why VirtualBox doesn't allow you to restore the VM from the saved state. …
Some states that were saved whilst using the ZBook were usable with the EliteBook. One such guest was Windows 10 20H2.

Just two guests that were saved whilst using the ZBook were unusable with the EliteBook. One was FreeBSD 13.0-RELEASE, the other was either 13.0-RELEASE or 13.0-STABLE.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: X86_CPUID_FEATURE_ECX_MOVBE is not supported by the host but has already exposed to the guest …

Post by fth0 »

grahamperrin wrote:This might be the first time I realised that the slider can be dragged into the red.
Well, I didn't say that you can do it from within the VirtualBox Manager. ;) Just for fun, take any VM you like (*), and try the following commands inside a shell, while the VM is not running (and not in a saved state):

Code: Select all

VBoxManage modifyvm "VM name" --cpus 32
VirtualBoxVM --startvm "VM name"
(*) If you are cautious, you could make and use a copy of an existing VM, or take a snapshot beforehand and return to it afterwards.

grahamperrin wrote:Some states that were saved whilst using the ZBook were usable with the EliteBook.
There may be several explanations for that: Perhaps VirtualBox only allows some CPU capabilities to be seen by some guest OSes, or it may depend on the guest OS activating a CPU capability, or ...

Edit:
The MOVBE CPU capability seems to be OS-agnostic, so I do not understand yet why restoring from a saved state would work for other VMs when moved between exactly these two devices, and the saved state was created by the same VirtualBox version.
Post Reply