pc_piix: Reuse pc_compat_1_2() for pc-0.1[0123]
PATCH 1/1 pc_piix: Reuse pc_compat_1_2() for pc-0.1[0123]
pc-0.13 and older were missing some compat code that was present on newer machine-types:
* x86_cpu_compat_disable_kvm_features(FEAT_1_ECX, CPUID_EXT_X2APIC); (pc-i440fx-1.7 and older)
(added by commit ef02ef5f4536dba090b12360a6c862ef0e57e3bc)
* x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE); (pc-i440fx-1.4 and older)
(added by commit 4458c23672904fa131e69897007eeb7c953be7e5
* x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ); (pc-i440fx-1.4 and older)
(added by commit 56383703c060777fd01aaf8d63d5f46d660e9fb9)
Instead of duplicating the code from the previous pc_compat_*() functions, we can now reuse pc_compat_1_2() and fix those issues.
--- hw/i386/pc_piix.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
hw/i386/pc_piix.c +2 -11
@@ -386,19 +386,10 @@ static void pc_init_pci_1_2(MachineState *machine)pc_init_pci (machine); } -/* PC init function for pc-0.10 to pc-0.13, and reused by xenfv */ +/* PC init function for pc-0.10 to pc-0.13 */ static void pc_init_pci_no_kvmclock (MachineState *machine) { - has_pci_info = false; - has_acpi_build = false; - smbios_defaults = false; - gigabyte_align = false; - smbios_legacy_mode = true; - has_reserved_memory = false; - option_rom_has_mr = true; - rom_file_has_mr = false; -x86_cpu_compat_disable_kvm_features (FEAT_KVM ,KVM_FEATURE_PV_EOI ); -enable_compat_apic_id_mode (); +pc_compat_1_2 (machine);pc_init1 (machine,1 ,0 ); }
Signature · 1 line
1.9.3
Michael S. Tsirkin
AppliedQuoted 13 lines · Eduardo Habkost
pc-0.13 and older were missing some compat code that was present on newer machine-types:
*
x86_cpu_compat_disable_kvm_features(FEAT_1_ECX, CPUID_EXT_X2APIC); (pc-i440fx-1.7 and older)
(added by commitef02ef5f4536dba090b12360a6c862ef0e57e3bc)
*x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE); (pc-i440fx-1.4 and older)
(added by commit4458c23672904fa131e69897007eeb7c953be7e5
*x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ); (pc-i440fx-1.4 and older)
(added by commit56383703c060777fd01aaf8d63d5f46d660e9fb9)
Quoted 4 lines
Instead of duplicating the code from the previous pc_compat_*() functions, we can now reuse
pc_compat_1_2()and fix those issues.Signed-off-by Eduardo Habkost <[email protected]>
Applied, thanks.
Quoted 32 lines
--- hw/i386/pc_piix.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)hw/i386/pc_piix.c +2
-11@@ -386,19 +386,10 @@ static void pc_init_pci_1_2(MachineState *machine)pc_init_pci (machine); } -/* PC init function for pc-0.10 to pc-0.13, and reused by xenfv */ +/* PC init function for pc-0.10 to pc-0.13 */ static void pc_init_pci_no_kvmclock (MachineState *machine) { - has_pci_info = false; - has_acpi_build = false; - smbios_defaults = false; - gigabyte_align = false; - smbios_legacy_mode = true; - has_reserved_memory = false; - option_rom_has_mr = true; - rom_file_has_mr = false; -x86_cpu_compat_disable_kvm_features (FEAT_KVM ,KVM_FEATURE_PV_EOI ); -enable_compat_apic_id_mode (); +pc_compat_1_2 (machine);pc_init1 (machine,1 ,0 ); }Signature · 1 line
1.9.3