Page MenuHomeFreeBSD

vmm/amd64: Bhyve should keep guest CPUID updated when using explicit CPUID settings
Needs ReviewPublic

Authored by rosenfeld_grumpf.hope-2000.org on Thu, Jan 22, 4:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 22, 10:34 PM
Unknown Object (File)
Thu, Jan 22, 7:17 PM
Unknown Object (File)
Thu, Jan 22, 6:50 PM
Unknown Object (File)
Thu, Jan 22, 6:26 PM
Unknown Object (File)
Thu, Jan 22, 6:24 PM
Unknown Object (File)
Thu, Jan 22, 6:06 PM
Subscribers

Details

Reviewers
markj
chuck
emaste
Group Reviewers
bhyve
Summary

This is a port of the following bhyve improvement from illumos:

16647 bhyve should keep guest CPUID updated when using explicit CPUID settings
https://www.illumos.org/issues/16647

Some bits of information returned by the CPUID instruction depend on the
values system software previously set in the CPU's control registers.
These include

  • Leaf 1 ecx: bit 27 changes depending on whether XSAVE support is enabled in cr4
  • Leaf 1 edx: bit 9 changes depending on whether the APIC is enabled in MSR 0x1B
  • Leaf D subleaf 0/subleaf 1 ebx: values change depending on the bits set in xcr0

bhyve should ensure that VMs with explicitly-provided CPUID values
account for the guest's current CR/MSR values before returning the
explicitly-set values for these leaves. (The legacy CPUID handler,
legacy_emulate_cpuid, already handles this for VMs where explicit
CPUID settings aren't in use.)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70062
Build 66945: arc lint + arc unit