mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
pc: reduce duplication, fix PIIX descriptions
We have a lot of code duplication between machine types, this increases with each new machine type and each new field. This has already introduced a minor bug: description for pc-1.3 says "Standard PC" while description for pc-1.4 is "Standard PC (i440FX + PIIX, 1996)" which makes you think 1.3 is somehow more standard, or newer, while in fact it's a revision of the same PC. This patch addresses this issue by using macros, along the lines used by PC_COMPAT_X_X - only for non-property options. The approach can extend to non-PC machine types. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
c165473269
commit
a0dba644c1
3 changed files with 56 additions and 63 deletions
|
@ -325,4 +325,12 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
|
|||
.value = stringify(0),\
|
||||
}
|
||||
|
||||
#define PC_COMMON_MACHINE_OPTIONS \
|
||||
.default_boot_order = "cad"
|
||||
|
||||
#define PC_DEFAULT_MACHINE_OPTIONS \
|
||||
PC_COMMON_MACHINE_OPTIONS, \
|
||||
.hot_add_cpu = pc_hot_add_cpu, \
|
||||
.max_cpus = 255
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue