From: Igor Mammedov <imammedo@redhat.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 00/23] ACPI reorganization for hardware-reduced support
Date: Thu, 8 Nov 2018 15:12:34 +0100 [thread overview]
Message-ID: <20181108151234.48f37815@redhat.com> (raw)
In-Reply-To: <20181105021028.GA6380@caravaggio>
On Mon, 5 Nov 2018 03:10:28 +0100
Samuel Ortiz <sameo@linux.intel.com> wrote:
> Hi Igor,
>
> On Fri, Nov 02, 2018 at 01:29:25PM +0100, Igor Mammedov wrote:
> > On Thu, 1 Nov 2018 11:22:40 +0100
> > Samuel Ortiz <sameo@linux.intel.com> wrote:
[...]
> > > some ACPI code reorganization with the following goals:
> > >
> > > * Share as much as possible of the current ACPI build APIs between
> > > legacy and hardware-reduced ACPI.
> > > * Share the ACPI build code across machine types and architectures and
> > > remove the typical PC machine type dependency.
> > > Eventually we hope to see arm/virt also re-use much of that code.
> > it probably should be other way around, generalize and reuse as much of
> > arm/virt acpi code,
> Our hardware-reduced implementation does that indeed, and the next
> patchset following this one will add the actual hardware-reduced ACPI
> API implementation together with the arm/virt switch to it (which will
> mostly be code removal from virt-acpi-build.c).
That's where I disagree with patch ordering, i.e. you are adding impl. without
user and than do sudden switch from old API (dropping old one in the process)
to the new one some time in the future.
For example 04/23 add new impl. of build_rsdp() with xsdt support without
actual user, which is duplicate of arm/virt code modulo checksum fix
and than later in 05/23 drops old arm impl. in favor of the new one.
As you saw it causes confusion during review even within one series
and it's much worse in cases where similar changes happen across
several series. In addition bisection would point into wrong patch
05/23 (where code started to be used but not where it was introduced).
> > instead of adding new duplicated code without
> > an actual user and then swapping/dropping old arm version in favor of the
> > new one.
> This patch set is not adding any code duplication, I hope.
> It's really preparing the current ACPI code in order to precisely NOT add
> code duplication when building a machine type agnostic hardware reduced
> ACPI API.
> I initally added our hardware-reduced ACPI API to that patch serie but
> decided to remove it. Here is what it looks like:
> https://github.com/intel/nemu/blob/topic/virt-x86/hw/acpi/reduced.c
>
> It's consuming the factorization work that this serie provides, and the
> arm/virt machine type will use a fairly large part of that API.
the point is existing arm/virt machine or any other machine should use
new API right away if applicable instead of some point in the future,
otherwise we are doing something wrong, change might not belong to series.
It's hard to find reasoning for merging new API/verify correctness
without immediate user.
> > It's hard to review when it done in this order and easy to miss
> > issues that would be easier to spot if you reused arm versions (where
> > applicable) as starting point for generalization.
[...]
> > 3. Since you are touching/moving around existing fixed tables
> > that are using legacy 'struct' based approach to construct
> > them, it's a good as opportunity to switch to a newer approach
> > and use build_append_int_noprefix() API to construct tables.
> > Use build_amd_iommu() as example. And it's doubly true if/when
> > you are adding new fixed tables (i.e. only build_append_int_noprefix()
> > based ones are acceptable).
> I'd be happy to do that, but I'd appreciate if that could be done as a
> follow up patch set, in order to decouple the code movement/export from
> the actual reimplementation.
Well, it fine to keep old style if one fixes code but in all other cases
it's good opportunity to replace legacy approach with the preferred one.
So unless it's a fix, the new code (including generalization) should
use preferred approach (there are exceptions but this series is not the case).
Considering this series is re-factoring to make ACPI code more reusable,
we should do it properly instead of cutting corners.
I apply this rule myself 'ex: build_fadt()' and others if re-factoring
is related the series topic.
> > 4. for patches during #2 and #3 stages, 'make V=1 check'
> > should pass without any warnings, that will speed up review
> > process.
> >
> > 5. add i386/virt board and related hardware reduced ACPI code
> > that's specific to it.
> That is definitely going to be our last steps, but I think this would
> make a very large patch set to review at once.
Agreed, as far as new API is used by already existing code. If API isn't
used then it should be moved out of this series to the one that would
actually use it.
[...]
prev parent reply other threads:[~2018-11-08 14:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 10:22 [Qemu-devel] [PATCH v4 00/23] ACPI reorganization for hardware-reduced support Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 01/23] hw: i386: Decouple the ACPI build from the PC machine type Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 02/23] hw: acpi: Export ACPI build alignment API Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 03/23] hw: acpi: Export the RSDP build API Samuel Ortiz
2018-11-01 17:50 ` Philippe Mathieu-Daudé
2018-11-02 9:20 ` Shannon Zhao
2018-11-02 9:56 ` Philippe Mathieu-Daudé
2018-11-06 10:17 ` Paolo Bonzini
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 04/23] hw: acpi: Implement XSDT support for RSDP Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 05/23] hw: arm: Switch to the AML build RSDP building routine Samuel Ortiz
2018-11-02 9:35 ` Shannon Zhao
2018-11-02 10:05 ` Shannon Zhao
2018-11-02 10:23 ` Igor Mammedov
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 06/23] hw: acpi: Generalize AML build routines Samuel Ortiz
2018-11-02 9:41 ` [Qemu-devel] [Qemu-arm] " Shannon Zhao
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 07/23] hw: acpi: Factorize _OSC AML across architectures Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 08/23] hw: i386: Move PCI host definitions to pci_host.h Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 09/23] hw: acpi: Export the PCI host and holes getters Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 10/23] hw: acpi: Export and generalize the PCI host AML API Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 11/23] hw: acpi: Export the MCFG getter Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 12/23] hw: acpi: Do not create hotplug method when handler is not defined Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 13/23] hw: i386: Make the hotpluggable memory size property more generic Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 14/23] hw: i386: Export the i386 ACPI SRAT build method Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 15/23] hw: acpi: Fix memory hotplug AML generation error Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 16/23] hw: acpi: Export the PCI hotplug API Samuel Ortiz
2018-11-01 15:27 ` Philippe Mathieu-Daudé
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 17/23] hw: i386: Export the MADT build method Samuel Ortiz
2018-11-01 15:12 ` Philippe Mathieu-Daudé
2018-11-01 15:24 ` Philippe Mathieu-Daudé
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 18/23] hw: acpi: Retrieve the PCI bus from AcpiPciHpState Samuel Ortiz
2018-11-01 10:22 ` [Qemu-devel] [PATCH v4 19/23] hw: acpi: Define ACPI tables builder interface Samuel Ortiz
2018-11-01 10:23 ` [Qemu-devel] [PATCH v4 20/23] hw: i386: Implement the ACPI builder interface for PC Samuel Ortiz
2018-11-01 10:23 ` [Qemu-devel] [PATCH v4 21/23] hw: pci-host: piix: Return PCI host pointer instead of PCI bus Samuel Ortiz
2018-11-01 10:23 ` [Qemu-devel] [PATCH v4 22/23] hw: i386: Set ACPI configuration PCI host pointer Samuel Ortiz
2018-11-01 10:23 ` [Qemu-devel] [PATCH v4 23/23] hw: i386: Refactor PCI host getter Samuel Ortiz
2018-11-02 12:29 ` [Qemu-devel] [PATCH v4 00/23] ACPI reorganization for hardware-reduced support Igor Mammedov
2018-11-05 2:10 ` Samuel Ortiz
2018-11-05 15:37 ` Samuel Ortiz
2018-11-05 16:07 ` Andrew Jones
2018-11-05 16:16 ` Samuel Ortiz
2018-11-08 14:12 ` Igor Mammedov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181108151234.48f37815@redhat.com \
--to=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).