qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/7] target/i386: support VMX features in "-cpu"
@ 2019-07-02 15:01 Paolo Bonzini
  2019-07-02 15:01 ` [Qemu-devel] [PATCH 1/7] target/i386: handle filtered_features in a new function mark_unavailable_features Paolo Bonzini
                   ` (8 more replies)
  0 siblings, 9 replies; 29+ messages in thread
From: Paolo Bonzini @ 2019-07-02 15:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Liran Alon, Eduardo Habkost

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



^ permalink raw reply	[flat|nested] 29+ messages in thread
* [Qemu-devel] [PATCH v2 0/7] target/i386: support VMX features in "-cpu"
@ 2019-09-17 10:34 Paolo Bonzini
  2019-09-17 10:34 ` [Qemu-devel] [PATCH 2/7] target/i386: introduce generic feature dependency mechanism Paolo Bonzini
  0 siblings, 1 reply; 29+ messages in thread
From: Paolo Bonzini @ 2019-09-17 10:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: liran.alon, ehabkost

This series adds support for VMX feature flags so that the user can
enable and disable at will the flags.  A separate series will
also add VMX features to named CPU models, which will complete VMX
live migration support.  That's orthogonal and somewhat tedious.

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)

Paolo

v1->v2: do not consult check_cpuid/enforce_cpuid in mark_unavailable_features
	introduce struct FeatureMask


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    | 443 ++++++++++++++++++++++++++++++++++++++++-----------
 target/i386/cpu.h    | 136 +++++++++++++++-
 target/i386/kvm.c    | 173 +++++++++++++++++++-
 5 files changed, 665 insertions(+), 103 deletions(-)

-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2019-09-17 10:52 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 15:01 [Qemu-devel] [RFC PATCH 0/7] target/i386: support VMX features in "-cpu" Paolo Bonzini
2019-07-02 15:01 ` [Qemu-devel] [PATCH 1/7] target/i386: handle filtered_features in a new function mark_unavailable_features Paolo Bonzini
2019-07-05 20:37   ` Eduardo Habkost
2019-07-05 21:32     ` Paolo Bonzini
2019-07-05 21:44       ` Eduardo Habkost
2019-07-05 22:07         ` Paolo Bonzini
2019-07-05 22:16           ` Eduardo Habkost
2019-07-02 15:01 ` [Qemu-devel] [PATCH 2/7] target/i386: introduce generic feature dependency mechanism Paolo Bonzini
2019-07-05 20:52   ` Eduardo Habkost
2019-07-05 21:12     ` Paolo Bonzini
2019-07-05 21:41       ` Eduardo Habkost
2019-07-05 22:07         ` Paolo Bonzini
2019-07-08 21:45           ` Eduardo Habkost
2019-07-02 15:01 ` [Qemu-devel] [PATCH 3/7] target/i386: expand feature words to 64 bits Paolo Bonzini
2019-07-02 15:01 ` [Qemu-devel] [PATCH 4/7] target/i386: add VMX definitions Paolo Bonzini
2019-07-02 15:01 ` [Qemu-devel] [PATCH 5/7] vmxcap: correct the name of the variables Paolo Bonzini
2019-07-02 15:01 ` [Qemu-devel] [PATCH 6/7] target/i386: add VMX features Paolo Bonzini
2019-07-05 21:22   ` Eduardo Habkost
2019-07-05 22:12     ` Paolo Bonzini
2019-07-05 22:33       ` Eduardo Habkost
2019-07-05 22:42         ` Paolo Bonzini
2019-07-05 22:48           ` Eduardo Habkost
2019-07-02 15:01 ` [Qemu-devel] [PATCH 7/7] target/i386: work around KVM_GET_MSRS bug for secondary execution controls Paolo Bonzini
2019-07-02 20:46 ` [Qemu-devel] [RFC PATCH 0/7] target/i386: support VMX features in "-cpu" no-reply
2019-07-02 21:13 ` no-reply
2019-07-02 21:38   ` [Qemu-devel] No symbols in LeakSanitizer output (was Re: [RFC PATCH 0/7] target/i386: support VMX features in "-cpu") Eduardo Habkost
2019-07-02 23:05     ` Peter Maydell
2019-07-05 10:19     ` Paolo Bonzini
2019-09-17 10:34 [Qemu-devel] [PATCH v2 0/7] target/i386: support VMX features in "-cpu" Paolo Bonzini
2019-09-17 10:34 ` [Qemu-devel] [PATCH 2/7] target/i386: introduce generic feature dependency mechanism Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).