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

Bernhard Beschow posted 6 patches 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240224135851.100361-1-shentey@gmail.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Jason Wang <jasowang@redhat.com>, David Woodhouse <dwmw2@infradead.org>, Paul Durrant <paul@xen.org>, Sergio Lopez <slp@redhat.com>
There is a newer version of this series
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(-)
[PATCH v2 0/6] Simplify initialization of PC machines
Posted by Bernhard Beschow 9 months ago
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(-)

-- 
2.44.0

Re: [PATCH v2 0/6] Simplify initialization of PC machines
Posted by Philippe Mathieu-Daudé 9 months ago
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!
Re: [PATCH v2 0/6] Simplify initialization of PC machines
Posted by Bernhard Beschow 9 months ago

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
>
>
>