aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-02-19 11:58:11 -0300
committerAndreas Färber <afaerber@suse.de>2014-03-13 19:01:49 +0100
commit8fb4f821e93a75431973bf3a11bacd924e43816c (patch)
tree7a61acb696993890c50bab707a985805d9c462a6 /target-i386
parent5fcca9ff3b7bd6567bc1a9488f2481f163de46ba (diff)
target-i386: Introduce x86_cpu_compat_disable_kvm_features()
Instead of the feature-specific disable_kvm_pv_eoi() function, create a more general function that can be used to disable other feature bits in machine-type compat code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/cpu.c4
-rw-r--r--target-i386/cpu.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 17fe45e84e..5f960acad8 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -371,9 +371,9 @@ static uint32_t kvm_default_features[FEATURE_WORDS] = {
(1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT),
};
-void disable_kvm_pv_eoi(void)
+void x86_cpu_compat_disable_kvm_features(FeatureWord w, uint32_t features)
{
- kvm_default_features[FEAT_KVM] &= ~(1UL << KVM_FEATURE_PV_EOI);
+ kvm_default_features[w] &= ~features;
}
void host_cpuid(uint32_t function, uint32_t count,
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 4b8c85b942..2403321fa1 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -1262,11 +1262,11 @@ void do_smm_enter(X86CPU *cpu);
void cpu_report_tpr_access(CPUX86State *env, TPRAccess access);
-void disable_kvm_pv_eoi(void);
-
void x86_cpu_compat_set_features(const char *cpu_model, FeatureWord w,
uint32_t feat_add, uint32_t feat_remove);
+void x86_cpu_compat_disable_kvm_features(FeatureWord w, uint32_t features);
+
/* Return name of 32-bit register, from a R_* constant */
const char *get_register_name_32(unsigned int reg);