This series adds support for VMX feature flags so that the user can
enable and disable at will the flags. In the final version I will
also add VMX features to named CPU models, which will complete VMX
live migration support. That's somewhat tedious and I didn't want
to do that before getting a general review.
There are a few complications, which are tackled across the series:
- KVM ioctls fail for some invalid MSR settings, namely when some
controls are reported as available but the corresponding CPUID
bits have been disabled. For backwards compatibility with
e.g. "-cpu host,-rdrand", these VMX features are silently
dropped (patch 2)
- some VMX MSRs have features in the high 32 bits (patch 3)
- some VMX MSRs have values in the high 32 bits, but only
actually have 32 features; this is handled in patch 6 by
mangling the result of KVM_GET_MSRS
- KVM has a couple bugs that can be worked around relatively
easily (patch 6 and 7)
Please review!
Paolo
Paolo Bonzini (7):
target/i386: handle filtered_features in a new function
mark_unavailable_features
target/i386: introduce generic feature dependency mechanism
target/i386: expand feature words to 64 bits
target/i386: add VMX definitions
vmxcap: correct the name of the variables
target/i386: add VMX features
target/i386: work around KVM_GET_MSRS bug for secondary execution
controls
include/sysemu/kvm.h | 2 +-
scripts/kvm/vmxcap | 14 +-
target/i386/cpu.c | 433 ++++++++++++++++++++++++++++++++++++++++-----------
target/i386/cpu.h | 138 +++++++++++++++-
target/i386/kvm.c | 173 +++++++++++++++++++-
5 files changed, 656 insertions(+), 104 deletions(-)
--
1.8.3.1