Page 1 of 1

XSAVE instruction not being passed through to Guests

Posted: 6. Oct 2020, 20:44
by GMN
I am using a Windows-10 Host and up to date VirtualBox release. My HOST reports that it supports the XSAVE instruction, yet when I create a Guest, it does not show XSAVE support.
I am not entirely sure that this is Windows-10 specific, but the issue has only appeared on Windows-10 hosts thus far.

Is this a bug in the Windows-10 host? What would be the reason for a host not passing a CPU feature through to it's guests?

Re: XSAVE instruction not being passed through to Guests

Posted: 6. Oct 2020, 23:39
by fth0
Please provide a zipped VBox.log file.

Re: XSAVE instruction not being passed through to Guests

Posted: 7. Oct 2020, 21:15
by GMN
See zip file

Re: XSAVE instruction not being passed through to Guests

Posted: 7. Oct 2020, 22:16
by fth0
GMN wrote:Is this a bug in the Windows-10 host?
VBox.log wrote:
00:00:04.105633 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
00:00:04.184004 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
[...]
00:00:05.670890   Mnemonic - Description                                  = guest (host)
00:00:05.670976   XSAVE - XSAVE instruction                               = 0 (1)
00:00:05.670984   HVP - Hypervisor Present (we're a guest)                = 0 (1)
You didn't mention that you're running VirtualBox as a guest under Hyper-V. ;)

Apparently, VirtualBox really doesn't provide XSAVE to the 2nd level guest in this case.
VBox.log wrote:
00:00:03.889145 Host RAM: 8049MB (7.8GB) total, 4283MB (4.1GB) available
00:00:04.104955   RamSize           <integer> = 0x000000010fa00000 (4 557 111 296, 4 346 MB, 4.2 GB)
Additionally, you've provided memory to the guest that you didn't have available.

Re: XSAVE instruction not being passed through to Guests

Posted: 7. Oct 2020, 23:27
by GMN
I am not running Hyper-V. Don't even know how to do that.

Good catch on the memory amount, but that's not relevant to the XSAVE issue.

Re: XSAVE instruction not being passed through to Guests

Posted: 8. Oct 2020, 00:28
by scottgus1
GMN wrote:I am not running Hyper-V.
A lot of folks don't know they are. To check Virtualbox-only operation, turn off Hyper-V. See HMR3Init: Attempting fall back to NEM (Hyper-V is active)

FWIW Guests on one of my Windows hosts running 6.1.12 without Hyper-V enabled has XSAVE enabled in the guest.

Re: XSAVE instruction not being passed through to Guests

Posted: 8. Oct 2020, 00:33
by GMN
I verified that the Windows Hyper-V feature is not installed on my system. I find no services that pertain to Hyper-V.
I also upgraded to 6.1.14 and created a new guest. The same issue persists. The Host shows XSAVE but the Guest does not.

Re: XSAVE instruction not being passed through to Guests

Posted: 8. Oct 2020, 00:36
by scottgus1
If you're running Home you may not see Hyper-V but it is there. There's lots of Windows services, even in Home, that use Hyper-V if they can.

If you search the guest log for the words:

Attempting fall back to NEM

and you find them, Hyper-V is enabled. The log does not lie.

See my link and the tutorials it discusses. Per your posted log, you have Hyper-V enabled.

Re: XSAVE instruction not being passed through to Guests

Posted: 8. Oct 2020, 00:46
by GMN
I am humbled! Doing the bcdedit command and rebooting made all the difference.
Apparently this laptop must have had Hyper-V enabled at one time. I bought it used.
Outstanding find, problem solved. Thanks

Re: XSAVE instruction not being passed through to Guests

Posted: 9. Oct 2020, 20:05
by scottgus1
Great! Glad you're up and running.