Project

General

Profile

Actions

Bug #15018

open

bhyve cpuid should heed runtime state

Added by Patrick Mooney about 2 months ago.

Status:
In Progress
Priority:
Normal
Category:
bhyve
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

With the integration of #14485, bhyve kernel VMM has two different means of calculating CPUID values for a guest. The "legacy" method is largely based on masking values from the host CPU. The newly-added "custom" method simply walks a set of tables provided by userspace, looking for a match.
The latter mechanism requires some extra logic to set CPUID bits which depend on runtime state:

- leaf 0x1, edx bit 9 - based on whether the LAPIC is enabled via the APICBASE MSR
- leaf 0x1, edx bit 27 - based on if OSXSAVE is set in %cr4
- leaf 0xD (ecx = 0),ebx - calculated xsave size, based on %xcr0 contents

No data to display

Actions

Also available in: Atom PDF