mbox series

[v2,0/6] Simplify initialization of PC machines

Message ID 20240224135851.100361-1-shentey@gmail.com
Headers show
Series Simplify initialization of PC machines | expand

Message

Bernhard Beschow Feb. 24, 2024, 1:58 p.m. UTC
The series aims to simplify the initialization process of all PC-based machines
by streamlining redundant code.

Since I haven't seen patches on the list so far for folding CMOS data
generation into pc.c, which frees all PC machines from performing this duty
explicitly, I've appended this cleanup as the last two patches.

Testing done:
* `make check`
* `make check-avocado`
* I'm sending this series from within a VM containing these changes.

v2:
* Rebase onto master, leaving only patches 1, 3, and 5
* Patch 2: Rename "bus" attribute to "pcibus" (Phil)
* Patch 4: Spotted while rebasing
* Patch 6: New patch possible after [1]

Best regards,
Bernhard

[1]
https://patchew.org/QEMU/20240221211626.48190-1-philmd@linaro.org/20240221211626
.48190-10-philmd@linaro.org/

Bernhard Beschow (6):
  hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
  hw/i386/pc: Rename "bus" attribute to "pcibus"
  hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables
  hw/i386/pc: Remove unneeded class attribute "kvmclock_enabled"
  hw/i386/pc: Populate RTC attribute directly
  hw/i386/pc: Inline pc_cmos_init() into pc_cmos_init_late() and remove
    it

 include/hw/i386/pc.h     |  5 +----
 include/hw/i386/x86.h    |  2 +-
 hw/i386/acpi-build.c     |  2 +-
 hw/i386/amd_iommu.c      |  2 +-
 hw/i386/intel_iommu.c    |  2 +-
 hw/i386/kvm/xen_evtchn.c |  2 +-
 hw/i386/microvm.c        |  2 +-
 hw/i386/pc.c             | 27 ++++----------------------
 hw/i386/pc_piix.c        | 42 +++++++++++++++++-----------------------
 hw/i386/pc_q35.c         | 25 ++++++++++--------------
 hw/i386/x86-iommu.c      |  2 +-
 hw/i386/x86.c            |  7 +++----
 12 files changed, 43 insertions(+), 77 deletions(-)

Comments

Bernhard Beschow Feb. 24, 2024, 2:15 p.m. UTC | #1
Am 24. Februar 2024 13:58:45 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>The series aims to simplify the initialization process of all PC-based machines
>
>by streamlining redundant code.
>
>
>
>Since I haven't seen patches on the list so far for folding CMOS data
>
>generation into pc.c, which frees all PC machines from performing this duty
>
>explicitly, I've appended this cleanup as the last two patches.
>
>
>
>Testing done:
>
>* `make check`
>

The `boot-order-test` actually fails. We'd have to ignore the last patch for now.

Best regards,
Bernhard

>* `make check-avocado`
>
>* I'm sending this series from within a VM containing these changes.
>
>
>
>v2:
>
>* Rebase onto master, leaving only patches 1, 3, and 5
>
>* Patch 2: Rename "bus" attribute to "pcibus" (Phil)
>
>* Patch 4: Spotted while rebasing
>
>* Patch 6: New patch possible after [1]
>
>
>
>Best regards,
>
>Bernhard
>
>
>
>[1]
>
>https://patchew.org/QEMU/20240221211626.48190-1-philmd@linaro.org/20240221211626
>
>.48190-10-philmd@linaro.org/
>
>
>
>Bernhard Beschow (6):
>
>  hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
>
>  hw/i386/pc: Rename "bus" attribute to "pcibus"
>
>  hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables
>
>  hw/i386/pc: Remove unneeded class attribute "kvmclock_enabled"
>
>  hw/i386/pc: Populate RTC attribute directly
>
>  hw/i386/pc: Inline pc_cmos_init() into pc_cmos_init_late() and remove
>
>    it
>
>
>
> include/hw/i386/pc.h     |  5 +----
>
> include/hw/i386/x86.h    |  2 +-
>
> hw/i386/acpi-build.c     |  2 +-
>
> hw/i386/amd_iommu.c      |  2 +-
>
> hw/i386/intel_iommu.c    |  2 +-
>
> hw/i386/kvm/xen_evtchn.c |  2 +-
>
> hw/i386/microvm.c        |  2 +-
>
> hw/i386/pc.c             | 27 ++++----------------------
>
> hw/i386/pc_piix.c        | 42 +++++++++++++++++-----------------------
>
> hw/i386/pc_q35.c         | 25 ++++++++++--------------
>
> hw/i386/x86-iommu.c      |  2 +-
>
> hw/i386/x86.c            |  7 +++----
>
> 12 files changed, 43 insertions(+), 77 deletions(-)
>
>
>
>-- >
>2.44.0
>
>
>
Philippe Mathieu-Daudé Feb. 26, 2024, 5:42 p.m. UTC | #2
On 24/2/24 14:58, Bernhard Beschow wrote:
> The series aims to simplify the initialization process of all PC-based machines
> by streamlining redundant code.

> Bernhard Beschow (6):
>    hw/i386/x86: Let ioapic_init_gsi() take parent as pointer
>    hw/i386/pc: Rename "bus" attribute to "pcibus"
>    hw/i386/pc_{piix,q35}: Eliminate local pci_bus/pci_host variables
>    hw/i386/pc: Remove unneeded class attribute "kvmclock_enabled"
>    hw/i386/pc: Populate RTC attribute directly

Patches 1-5 queued, thanks!