diff options
author | Robert Hoo <robert.hu@linux.intel.com> | 2018-10-15 12:47:25 +0800 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-10-30 21:14:43 -0300 |
commit | d86f963694df27f11b3681ffd225c9362de1b634 (patch) | |
tree | bc3657bbc56f2f732a116d463e0c0d107af4d2b7 /target/i386/kvm.c | |
parent | 07585923485952bf4cb7da563c9f91fecc85d09c (diff) | |
download | qemu-d86f963694df27f11b3681ffd225c9362de1b634.zip qemu-d86f963694df27f11b3681ffd225c9362de1b634.tar.gz qemu-d86f963694df27f11b3681ffd225c9362de1b634.tar.bz2 |
x86: define a new MSR based feature word -- FEATURE_WORDS_ARCH_CAPABILITIES
Note RSBA is specially treated -- no matter host support it or not, qemu
pretends it is supported.
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Message-Id: <1539578845-37944-4-git-send-email-robert.hu@linux.intel.com>
[ehabkost: removed automatic enabling of RSBA]
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target/i386/kvm.c')
-rw-r--r-- | target/i386/kvm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 161fc38..796a049 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1975,6 +1975,17 @@ static int kvm_put_msrs(X86CPU *cpu, int level) } #endif + /* If host supports feature MSR, write down. */ + if (kvm_feature_msrs) { + int i; + for (i = 0; i < kvm_feature_msrs->nmsrs; i++) + if (kvm_feature_msrs->indices[i] == MSR_IA32_ARCH_CAPABILITIES) { + kvm_msr_entry_add(cpu, MSR_IA32_ARCH_CAPABILITIES, + env->features[FEAT_ARCH_CAPABILITIES]); + break; + } + } + /* * The following MSRs have side effects on the guest or are too heavy * for normal writeback. Limit them to reset or full state updates. |