bhyve should expose lfence-serialize state
On recent AMD CPUs, the ability for
lfence instructions to be serializing is controlled by bit 1 in
MSR_AMD_DE_CFG. This has security ramifications for things like retpolines, so it would be valuable for bhyve to expose the status of this bit if it is found to be present (and active) on the host CPU. This way, guests can make informed decisions about how they use
Updated by Patrick Mooney 8 days ago
It should be noted that KVM does this today. It sets the bit visible to the guest based on how it is set in the host. The guest will receive a
#GP if it tries to modify that bit (since the host will not be toggling the state after boot-up), or any others for that matter.