diff options
author | Wanpeng Li <wanpengli@tencent.com> | 2018-02-09 06:15:25 -0800 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-03-12 15:57:39 -0300 |
commit | be7773268d98176489483a315d3e2323cb0615b9 (patch) | |
tree | 04b4bf0a8a714996bac98ac8ec5af7f52edce048 /target/i386/cpu.c | |
parent | b16a54da0696efc5d91b6c3597a37a317abb5de7 (diff) | |
download | qemu-be7773268d98176489483a315d3e2323cb0615b9.zip qemu-be7773268d98176489483a315d3e2323cb0615b9.tar.gz qemu-be7773268d98176489483a315d3e2323cb0615b9.tar.bz2 |
target-i386: add KVM_HINTS_DEDICATED performance hint
Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit
to determine if they run on dedicated vCPUs, allowing optimizations such
as usage of qspinlocks.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1518185725-69559-1-git-send-email-wanpengli@tencent.com>
[ehabkost: Renamed property to kvm-hint-dedicated]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target/i386/cpu.c')
-rw-r--r-- | target/i386/cpu.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 2c04645..5ea1931 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -359,6 +359,20 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { .cpuid_eax = KVM_CPUID_FEATURES, .cpuid_reg = R_EAX, .tcg_features = TCG_KVM_FEATURES, }, + [FEAT_KVM_HINTS] = { + .feat_names = { + "kvm-hint-dedicated", NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + }, + .cpuid_eax = KVM_CPUID_FEATURES, .cpuid_reg = R_EDX, + .tcg_features = TCG_KVM_FEATURES, + }, [FEAT_HYPERV_EAX] = { .feat_names = { NULL /* hv_msr_vp_runtime_access */, NULL /* hv_msr_time_refcount_access */, |