From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlh0W-0002SB-AE for qemu-devel@nongnu.org; Tue, 04 Nov 2014 11:31:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlh0N-0001gh-6Z for qemu-devel@nongnu.org; Tue, 04 Nov 2014 11:31:00 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52140 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlh0M-0001gK-RM for qemu-devel@nongnu.org; Tue, 04 Nov 2014 11:30:51 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 4 Nov 2014 17:30:43 +0100 Message-Id: <1415118647-16359-2-git-send-email-afaerber@suse.de> In-Reply-To: <1415118647-16359-1-git-send-email-afaerber@suse.de> References: <1415118647-16359-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL v2 1/5] target-i386: Rename KVM auto-feature-enable compat function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , Anthony Liguori , Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Richard Henderson From: Eduardo Habkost The x86_cpu_compat_disable_kvm_features() name was a bit confusing, as it won't forcibly disable the feature for all CPU models (i.e. add it to kvm_default_unset_features), but it will instead turn off the KVM auto-enabling of the feature (i.e. remove it from kvm_default_features), meaning the feature may still be enabled by default in some CPU models). Signed-off-by: Eduardo Habkost Signed-off-by: Andreas F=C3=A4rber --- hw/i386/pc_piix.c | 6 +++--- hw/i386/pc_q35.c | 2 +- target-i386/cpu.c | 2 +- target-i386/cpu.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 537bcf2..87601ee 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -340,7 +340,7 @@ static void pc_compat_1_7(MachineState *machine) gigabyte_align =3D false; option_rom_has_mr =3D true; legacy_acpi_table_size =3D 6414; - x86_cpu_compat_disable_kvm_features(FEAT_1_ECX, CPUID_EXT_X2APIC); + x86_cpu_compat_kvm_no_autoenable(FEAT_1_ECX, CPUID_EXT_X2APIC); } =20 static void pc_compat_1_6(MachineState *machine) @@ -372,7 +372,7 @@ static void pc_compat_1_3(MachineState *machine) static void pc_compat_1_2(MachineState *machine) { pc_compat_1_3(machine); - x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI); + x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI); } =20 static void pc_init_pci_2_1(MachineState *machine) @@ -443,7 +443,7 @@ static void pc_init_isa(MachineState *machine) if (!machine->cpu_model) { machine->cpu_model =3D "486"; } - x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI); + x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, KVM_FEATURE_PV_EOI); enable_compat_apic_id_mode(); pc_init1(machine, 0, 1); } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 296bdec..2044b62 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -301,7 +301,7 @@ static void pc_compat_1_7(MachineState *machine) smbios_defaults =3D false; gigabyte_align =3D false; option_rom_has_mr =3D true; - x86_cpu_compat_disable_kvm_features(FEAT_1_ECX, CPUID_EXT_X2APIC); + x86_cpu_compat_kvm_no_autoenable(FEAT_1_ECX, CPUID_EXT_X2APIC); } =20 static void pc_compat_1_6(MachineState *machine) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index e4ccee1..1b25965 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -462,7 +462,7 @@ static uint32_t kvm_default_unset_features[FEATURE_WO= RDS] =3D { [FEAT_1_ECX] =3D CPUID_EXT_MONITOR, }; =20 -void x86_cpu_compat_disable_kvm_features(FeatureWord w, uint32_t feature= s) +void x86_cpu_compat_kvm_no_autoenable(FeatureWord w, uint32_t features) { kvm_default_features[w] &=3D ~features; } diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 9f01831..a3fc6d8 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -1365,7 +1365,7 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAcc= ess access); void x86_cpu_compat_set_features(const char *cpu_model, FeatureWord w, uint32_t feat_add, uint32_t feat_remove= ); =20 -void x86_cpu_compat_disable_kvm_features(FeatureWord w, uint32_t feature= s); +void x86_cpu_compat_kvm_no_autoenable(FeatureWord w, uint32_t features); =20 =20 /* Return name of 32-bit register, from a R_* constant */ --=20 1.8.4.5