Skip to content
Commit 80112c89 authored by Jim Mattson's avatar Jim Mattson Committed by Paolo Bonzini
Browse files

KVM: Synthesize G bit for all segments.



We have noticed that qemu-kvm hangs early in the BIOS when runnning nested
under some versions of VMware ESXi.

The problem we believe is because KVM assumes that the platform preserves
the 'G' but for any segment register. The SVM specification itemizes the
segment attribute bits that are observed by the CPU, but the (G)ranularity bit
is not one of the bits itemized, for any segment. Though current AMD CPUs keep
track of the (G)ranularity bit for all segment registers other than CS, the
specification does not require it. VMware's virtual CPU may not track the
(G)ranularity bit for any segment register.

Since kvm already synthesizes the (G)ranularity bit for the CS segment. It
should do so for all segments. The patch below does that, and helps get rid of
the hangs. Patch applies on top of Linus' tree.

Signed-off-by: default avatarJim Mattson <jmattson@vmware.com>
Signed-off-by: default avatarAlok N Kataria <akataria@vmware.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c2d2c21b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment