[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support |
Date: |
Tue, 23 Oct 2018 08:55:37 -0400 |
On Tue, Oct 23, 2018 at 11:00:18AM +0200, Samuel Ortiz wrote:
> > I wonder whether the code can be refactored slightly differently:
> > instead of common code calling out to platform specific one,
> > have platform code call out to generic one.
> > That would avoid indicectiin
should have been indirection
> > but I'm not sure at what cost
> > in complexity.
> I may be misunderstanding your point, so forgive me if that's the case.
> But the code refactoring actually lead to both of the code paths you're
> describing. The generic code calls into platform specific hooks for
> potentially calling custom ACPI tables, but the platform code also uses
> the now shared generic code.
Right. So if instead of both we could have only platform calling generic
code, we could drop some of the hooks.
What I'm saying is that if I look at patches 1-17 which are supposed to
be just refactorings, somehow at the surface instead of reducing lines
of code they add 100 LOC.
And the whole patchset adds about 1000 LOC, by comparison e.g. pc_q35.c
is just 400 LOC since q35 and pc share a bunch of code. I wonder why
can't more code be shared with e.g. ARM which also has a virt machine
type. In other words, assuming we are doing PV, can't it be more
portable.
Again all that's still because all I read is the diffstats, it's without
reading the patches, sorry about that.
--
MST
- Re: [Qemu-devel] [PATCH 18/26] hw: acpi: Initial hardware-reduced support, (continued)
- [Qemu-devel] [PATCH 20/26] hw: acpi: reduced: Generic Event Device support, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 21/26] hw: acpi: reduced: Add memory hotplug support, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 24/26] hw: acpi: reduced: Add SRAT table, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 23/26] hw: acpi: reduced: Add reboot support, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 25/26] hw: acpi: reduced: Add NFIT support, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 22/26] hw: acpi: reduced: Add shutdown support, Samuel Ortiz, 2018/10/22
- [Qemu-devel] [PATCH 26/26] hw: acpi: reduced: Add PCI hotplug support, Samuel Ortiz, 2018/10/22
- Re: [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support, Michael S. Tsirkin, 2018/10/22
- Re: [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support, Peter Maydell, 2018/10/23
- Re: [Qemu-devel] [PATCH 00/27] ACPI hardware-reduced support, Paolo Bonzini, 2018/10/23