qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building


From: Michael S. Tsirkin
Subject: Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building
Date: Thu, 7 Jul 2022 06:08:35 -0400

On Thu, Jul 07, 2022 at 11:16:16AM +0200, Igor Mammedov wrote:
> On Fri, 1 Jul 2022 12:26:16 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Fri, Jul 01, 2022 at 09:35:00AM -0400, Igor Mammedov wrote:
> > > HPET AML doesn't depend on piix4 nor q35, move code buiding it
> > > to common scope to avoid duplication.
> > > 
> > > Signed-off-by: Igor Mammedov <imammedo@redhat.com>  
> > 
> > Apropos, tests/data/acpi/rebuild-expected-aml.sh ignores the
> > fact that some tables might be identical. Also, there's no
> > way to reuse expected files between machines. And so we have:
> > 
> > 
> > [qemu]$ find tests/data/acpi -type f -exec sha256sum '{}' ';'|sort
> [...]
> 
> > 
> > 
> > It's easy to fix up duplications within virt. But I am not 100% sure how
> > fix up duplication between q35 and pc.
> [...]
>  
> > Then we could maybe use the directory "pc" for files common to i440fx
> > and q35.  Maybe just teach the test to look under tests/data/acpi/x86
> > too? And I think we should teach tests/data/acpi/rebuild-expected-aml.sh
> > to check for duplicates and at least warn the user.
> 
> Probably duplicates in 'virt' mostly due to combination of not knowing
> that there is a fallback lookup (which is hidden in the code)
> and simplistic way tests/data/acpi/rebuild-expected-aml.sh rebuilds tables.
> 
> As you suggest, rebuild-expected-aml.sh can be improved to warn or even
> better drop duplicates if found.

Want to try?

> As for reusing tables between different machine types, alternatively
> we can add explicit remapping rules (possibly auto-generated) versus
> currently used implicit fallback approach.

My worry with this is that if a specific table needs to be split from
the generic variant then user would have to hack the test code as opposed
to just updating the tables, so the update can not be done
automatically. Thoughts?

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]