Now all the PC machine-types are declared using only a class_init + TypeInfo pair, and nothing else. In order to do that, all the code that was in the old pc_compat_*() functions are represented using PCMachineClass fields.
Git tree: https://github.com/ehabkost/qemu-hacks/tree/pc-machine-class.v4 Changes v3 -> v4: * Include CPU feature properties, so compat_props may be used for CPUID compat bits. * Move KVM defaults to PCMachineClass. * Use GList for compat_props instead of reusing GlobalProperty.next (we need to do that to allow the same GlobalProperty to be used on multiple subclasses). * Finally eliminate all pc_compat_*() functions, and don't require a different init function for each PC machine-type version. Eduardo Habkost (32): pc: Replace tabs with spaces on pc.h vl.c: Use qdev_prop_register_global() for single globals pc: Eliminate has_pci_info global variable piix: Add kvmclock_enabled, pci_enabled globals piix: Eliminate pc_init_pci() piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14 piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13 piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13 piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11 machine: Make compat_props a linked list pc: Register machine classes directly instead of using QEMUMachine pc: Eliminate pc_common_machine_options() pc: Eliminate pc_default_machine_options() piix: Eliminate pc_i440fx_machine_options() q35: Eliminate pc_q35_machine_options() q35: Eliminate pc_q35_1_4_machine_options() pc: Eliminate all *_machine_options() functions machine: Eliminate QEMUMachine.compat_props pc: Rename pc_machine variable to pcms pc: Pass PCMachineState argument to pc_cpus_init() machine: Add MachineClass.default_cpu_model field pc: Move globals to PCMachineClass pc: Move option_rom_has_mr/rom_file_has_mr to MachineClass pc: Add PCMachineClass.compat_apic_id_mode field target-i386: Move error handling to end of x86_cpu_parse_featurestr() target-i386: Renove underscores from feature names target-i386: Register X86CPU "feat-kvmclock" feature pc: Use compat_props for CPUID compat bits target-i386: Move some declarations to hw/i386/cpu.h pc: Add default KVM features fields to PCMachineClass pc: Eliminate pc_compat_*() functions piix: Move pc_xen_hvm_init() closer to xenfv_machine_class_init() Igor Mammedov (1): target-i386: set [+-]feature using QOM properties hw/core/loader.c | 12 +- hw/core/machine.c | 26 ++ hw/core/qdev-properties.c | 9 - hw/i386/pc.c | 86 ++--- hw/i386/pc_piix.c | 764 ++++++++++++++++++++++--------------------- hw/i386/pc_q35.c | 271 +++++++-------- include/hw/boards.h | 25 +- include/hw/i386/cpu.h | 564 ++++++++++++++++++++++++++++++++ include/hw/i386/pc.h | 51 +-- include/hw/qdev-properties.h | 1 - target-i386/cpu.c | 300 ++++++++--------- target-i386/cpu.h | 565 +------------------------------- vl.c | 47 +-- 13 files changed, 1378 insertions(+), 1343 deletions(-) create mode 100644 include/hw/i386/cpu.h -- 1.9.3