Convert PC machine-types to QOM classes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest33 patches 9 repliesIn review
- v3 RFC35 patches 0 repliesSuperseded
- v2 RFC39 patches 6 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 2 replies | Superseded |
Changes in v4 from the cover letter
* 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.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/33 | pc: Replace tabs with spaces on pc.hinclude/ | +6 | 0 replies | |
| 2/33 | vl.c: Use qdev_prop_register_global() for single globalsvl.c | +15 | 0 replies | |
| 3/33 | pc: Eliminate has_pci_info global variablehw/ hw/ | +2 | 0 replies | |
| 4/33 | piix: Add kvmclock_enabled, pci_enabled globalshw/ | +15 | 0 replies | |
| 5/33 | piix: Eliminate pc_init_pci()hw/ | +10 | 0 replies | |
| 6/33 | piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14hw/ | +8 | 0 replies | |
| 7/33 | piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13hw/ | +4 | 0 replies | |
| 8/33 | piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13hw/ | +8 | 0 replies | |
| 9/33 | piix: Move pc-0.11 drive version compat props to PC_COMPAT_0_11hw/ | +8 | 0 replies | |
| 10/33 | machine: Make compat_props a linked listhw/ hw/ hw/ +3 more | +50 | 0 replies | |
| 11/33 | pc: Register machine classes directly instead of using QEMUMachinehw/ hw/ hw/ +1 more | +448 | 0 replies | |
| 12/33 | pc: Eliminate pc_common_machine_options()hw/ hw/ include/ | +1 | 0 replies | |
| 13/33 | pc: Eliminate pc_default_machine_options()hw/ hw/ hw/ +1 more | +3 | 0 replies | |
| 14/33 | piix: Eliminate pc_i440fx_machine_options()hw/ | +29 | 0 replies | |
| 15/33 | q35: Eliminate pc_q35_machine_options()hw/ | +18 | 0 replies | |
| 16/33 | q35: Eliminate pc_q35_1_4_machine_options()hw/ | +1 | 0 replies | |
| 17/33 | pc: Eliminate all *_machine_options() functionshw/ hw/ include/ | +30 | 0 replies | |
| 18/33 | machine: Eliminate QEMUMachine.compat_propsinclude/ vl.c | +0 | 0 replies | |
| 19/33 | pc: Rename pc_machine variable to pcmshw/ hw/ | +10 | 0 replies | |
| 20/33 | pc: Pass PCMachineState argument to pc_cpus_init()hw/ hw/ hw/ +1 more | +10 | 0 replies | |
| 21/33 | machine: Add MachineClass.default_cpu_model fieldhw/ hw/ include/ +1 more | +11 | 0 replies | |
| 22/33 | pc: Move globals to PCMachineClasshw/ hw/ hw/ +1 more | +78 | 0 replies | |
| 23/33 | pc: Move option_rom_has_mr/rom_file_has_mr to MachineClasshw/ hw/ hw/ +2 more | +16 | 0 replies | |
| 24/33 | pc: Add PCMachineClass.compat_apic_id_mode fieldhw/ include/ | +8 | 0 replies | |
| 25/33 | target-i386: Move error handling to end of x86_cpu_parse_featurestr()target-i386/ | +6 | 0 replies | |
| 26/33 | target-i386: Renove underscores from feature namestarget-i386/ | +12 | 2 replies | |
| 27/33 | target-i386: Register X86CPU "feat-kvmclock" featuretarget-i386/ | +61 | 3 replies | |
| 28/33 | target-i386: set [+-]feature using QOM propertiestarget-i386/ | +65 | 0 replies | |
| 29/33 | pc: Use compat_props for CPUID compat bitshw/ hw/ include/ +2 more | +8 | 0 replies | |
| 30/33 | target-i386: Move some declarations to hw/i386/cpu.hinclude/ target-i386/ | +566 | 0 replies | |
| 31/33 | pc: Add default KVM features fields to PCMachineClasshw/ hw/ hw/ +3 more | +36 | 2 replies | |
| 32/33 | pc: Eliminate pc_compat_*() functionshw/ hw/ | +3 | 0 replies | |
| 33/33 | piix: Move pc_xen_hvm_init() closer to xenfv_machine_class_init()hw/ | +12 | 2 replies |
Reviews trailers per patch
2 of 33 patches have a Reviewed-by or Acked-by.
| Patch | Andreas Färber |
|---|---|
| 1/33 | |
| 2/33 | R-b |
| 3/33 | |
| 4/33 | |
| 5/33 | |
| 6/33 | |
| 7/33 | |
| 8/33 | |
| 9/33 | |
| 10/33 | |
| 11/33 | |
| 12/33 | R-b |
| 13/33 | |
| 14/33 | |
| 15/33 | |
| 16/33 | |
| 17/33 | |
| 18/33 | |
| 19/33 | |
| 20/33 | |
| 21/33 | |
| 22/33 | |
| 23/33 | |
| 24/33 | |
| 25/33 | |
| 26/33 | |
| 27/33 | |
| 28/33 | |
| 29/33 | |
| 30/33 | |
| 31/33 | |
| 32/33 | |
| 33/33 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v4 00/33] Convert PC machine-types to QOM classes
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
Signature · 1 line
1.9.3