[PATCH 0/9] Simplify initialization of PC machines

Bernhard Beschow posted 9 patches 5 months, 2 weeks ago
Failed in applying to current master (apply log)
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Sergio Lopez <slp@redhat.com>
There is a newer version of this series
hw/i386/fw_cfg.h      |  3 ++-
include/hw/i386/pc.h  |  5 ----
include/hw/i386/x86.h |  5 ++--
hw/i386/acpi-common.c |  3 ++-
hw/i386/fw_cfg.c      | 12 +++++++++-
hw/i386/microvm.c     |  2 +-
hw/i386/pc.c          | 25 +++++---------------
hw/i386/pc_piix.c     | 55 ++++++++++++++-----------------------------
hw/i386/pc_q35.c      | 38 ++++++++++--------------------
hw/i386/pc_sysfw.c    | 17 ++++---------
hw/i386/x86.c         |  7 +++---
11 files changed, 62 insertions(+), 110 deletions(-)
[PATCH 0/9] Simplify initialization of PC machines
Posted by Bernhard Beschow 5 months, 2 weeks ago
The series aims to simplify the initialization process of all PC-based machines.

It consists of streamlining redundant code, as well as consolidating the setup
of system flash and generation of smbios data which are currently fairly
distributed.

These changes are expected to make the code easier to understand and maintain.

Best regards,
Bernhard

Bernhard Beschow (9):
  hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
  hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc
    machines
  hw/i386/x86: Turn apic_xrupt_override into class attribute
  hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn()
  hw/i386/pc: Defer smbios_set_defaults() to machine_done
  hw/i386/pc: Confine system flash handling to pc_sysfw
  hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it
  hw/i386/pc: Populate RTC attribute directly
  hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables

 hw/i386/fw_cfg.h      |  3 ++-
 include/hw/i386/pc.h  |  5 ----
 include/hw/i386/x86.h |  5 ++--
 hw/i386/acpi-common.c |  3 ++-
 hw/i386/fw_cfg.c      | 12 +++++++++-
 hw/i386/microvm.c     |  2 +-
 hw/i386/pc.c          | 25 +++++---------------
 hw/i386/pc_piix.c     | 55 ++++++++++++++-----------------------------
 hw/i386/pc_q35.c      | 38 ++++++++++--------------------
 hw/i386/pc_sysfw.c    | 17 ++++---------
 hw/i386/x86.c         |  7 +++---
 11 files changed, 62 insertions(+), 110 deletions(-)

-- 
2.43.0

Re: [PATCH 0/9] Simplify initialization of PC machines
Posted by Philippe Mathieu-Daudé 5 months ago
On 8/2/24 23:03, Bernhard Beschow wrote:
> The series aims to simplify the initialization process of all PC-based machines.
> 
> It consists of streamlining redundant code, as well as consolidating the setup
> of system flash and generation of smbios data which are currently fairly
> distributed.
> 
> These changes are expected to make the code easier to understand and maintain.
> 
> Best regards,
> Bernhard
> 
> Bernhard Beschow (9):
>    hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
>    hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc
>      machines
>    hw/i386/x86: Turn apic_xrupt_override into class attribute
>    hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn()
>    hw/i386/pc: Defer smbios_set_defaults() to machine_done
>    hw/i386/pc: Confine system flash handling to pc_sysfw
>    hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it
>    hw/i386/pc: Populate RTC attribute directly
>    hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables

Patches 2-7 queued so far.
Re: [PATCH 0/9] Simplify initialization of PC machines
Posted by Bernhard Beschow 5 months, 2 weeks ago

Am 8. Februar 2024 22:03:40 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>The series aims to simplify the initialization process of all PC-based machines.
>
>
>
>It consists of streamlining redundant code, as well as consolidating the setup
>
>of system flash and generation of smbios data which are currently fairly
>
>distributed.
>
>
>
>These changes are expected to make the code easier to understand and maintain.
>
>
>
>Best regards,
>
>Bernhard
>
>
>
>Bernhard Beschow (9):
>
>  hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
>
>  hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc
>
>    machines
>
>  hw/i386/x86: Turn apic_xrupt_override into class attribute
>
>  hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn()
>
>  hw/i386/pc: Defer smbios_set_defaults() to machine_done
>
>  hw/i386/pc: Confine system flash handling to pc_sysfw
>
>  hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it
>
>  hw/i386/pc: Populate RTC attribute directly
>
>  hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables
>

Ping. Only patch 4 reviewed so far.

>
>
> hw/i386/fw_cfg.h      |  3 ++-
>
> include/hw/i386/pc.h  |  5 ----
>
> include/hw/i386/x86.h |  5 ++--
>
> hw/i386/acpi-common.c |  3 ++-
>
> hw/i386/fw_cfg.c      | 12 +++++++++-
>
> hw/i386/microvm.c     |  2 +-
>
> hw/i386/pc.c          | 25 +++++---------------
>
> hw/i386/pc_piix.c     | 55 ++++++++++++++-----------------------------
>
> hw/i386/pc_q35.c      | 38 ++++++++++--------------------
>
> hw/i386/pc_sysfw.c    | 17 ++++---------
>
> hw/i386/x86.c         |  7 +++---
>
> 11 files changed, 62 insertions(+), 110 deletions(-)
>
>
>
>-- >
>2.43.0
>
>
>
Re: [PATCH 0/9] Simplify initialization of PC machines
Posted by Michael S. Tsirkin 5 months ago
On Thu, Feb 08, 2024 at 11:03:40PM +0100, Bernhard Beschow wrote:
> The series aims to simplify the initialization process of all PC-based machines.
> 
> It consists of streamlining redundant code, as well as consolidating the setup
> of system flash and generation of smbios data which are currently fairly
> distributed.
> 
> These changes are expected to make the code easier to understand and maintain.
> 
> Best regards,
> Bernhard


This looks good to me overall.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

I see Philippe started queueing these, fine by me.

> Bernhard Beschow (9):
>   hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
>   hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc
>     machines
>   hw/i386/x86: Turn apic_xrupt_override into class attribute
>   hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn()
>   hw/i386/pc: Defer smbios_set_defaults() to machine_done
>   hw/i386/pc: Confine system flash handling to pc_sysfw
>   hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it
>   hw/i386/pc: Populate RTC attribute directly
>   hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables
> 
>  hw/i386/fw_cfg.h      |  3 ++-
>  include/hw/i386/pc.h  |  5 ----
>  include/hw/i386/x86.h |  5 ++--
>  hw/i386/acpi-common.c |  3 ++-
>  hw/i386/fw_cfg.c      | 12 +++++++++-
>  hw/i386/microvm.c     |  2 +-
>  hw/i386/pc.c          | 25 +++++---------------
>  hw/i386/pc_piix.c     | 55 ++++++++++++++-----------------------------
>  hw/i386/pc_q35.c      | 38 ++++++++++--------------------
>  hw/i386/pc_sysfw.c    | 17 ++++---------
>  hw/i386/x86.c         |  7 +++---
>  11 files changed, 62 insertions(+), 110 deletions(-)
> 
> -- 
> 2.43.0
>
Re: [PATCH 0/9] Simplify initialization of PC machines
Posted by Bernhard Beschow 5 months ago

Am 22. Februar 2024 15:25:01 UTC schrieb "Michael S. Tsirkin" <mst@redhat.com>:
>On Thu, Feb 08, 2024 at 11:03:40PM +0100, Bernhard Beschow wrote:
>> The series aims to simplify the initialization process of all PC-based machines.
>> 
>> It consists of streamlining redundant code, as well as consolidating the setup
>> of system flash and generation of smbios data which are currently fairly
>> distributed.
>> 
>> These changes are expected to make the code easier to understand and maintain.
>> 
>> Best regards,
>> Bernhard
>
>
>This looks good to me overall.
>
>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
>
>I see Philippe started queueing these, fine by me.

Thanks so far to all involved! I've just sent v2: https://lore.kernel.org/qemu-devel/20240224135851.100361-1-shentey@gmail.com/

Best regars,
Bernhard

>
>> Bernhard Beschow (9):
>>   hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
>>   hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc
>>     machines
>>   hw/i386/x86: Turn apic_xrupt_override into class attribute
>>   hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn()
>>   hw/i386/pc: Defer smbios_set_defaults() to machine_done
>>   hw/i386/pc: Confine system flash handling to pc_sysfw
>>   hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it
>>   hw/i386/pc: Populate RTC attribute directly
>>   hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables
>> 
>>  hw/i386/fw_cfg.h      |  3 ++-
>>  include/hw/i386/pc.h  |  5 ----
>>  include/hw/i386/x86.h |  5 ++--
>>  hw/i386/acpi-common.c |  3 ++-
>>  hw/i386/fw_cfg.c      | 12 +++++++++-
>>  hw/i386/microvm.c     |  2 +-
>>  hw/i386/pc.c          | 25 +++++---------------
>>  hw/i386/pc_piix.c     | 55 ++++++++++++++-----------------------------
>>  hw/i386/pc_q35.c      | 38 ++++++++++--------------------
>>  hw/i386/pc_sysfw.c    | 17 ++++---------
>>  hw/i386/x86.c         |  7 +++---
>>  11 files changed, 62 insertions(+), 110 deletions(-)
>> 
>> -- 
>> 2.43.0
>> 
>