From: "Michael S. Tsirkin" <mst@redhat.com>
To: Liran Alon <liran.alon@oracle.com>
Cc: ehabkost@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com,
Elad Gabay <elad.gabay@oracle.com>,
Igor Mammedov <imammedo@redhat.com>,
rth@twiddle.net
Subject: Re: [PATCH] acpi: Add Windows ACPI Emulated Device Table (WAET)
Date: Thu, 12 Mar 2020 15:47:19 -0400 [thread overview]
Message-ID: <20200312154646-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <8b3f3166-cc60-eae2-c20d-ad4a593c3e30@oracle.com>
On Thu, Mar 12, 2020 at 07:28:31PM +0200, Liran Alon wrote:
>
> On 12/03/2020 18:27, Igor Mammedov wrote:
> > On Wed, 11 Mar 2020 19:08:26 +0200
> > Liran Alon <liran.alon@oracle.com> wrote:
> > > +
> > > +static void
> > > +build_waet(GArray *table_data, BIOSLinker *linker)
> > see build_hmat_lb() for example how to doc comment for such function
> > should look like. Use earliest spec version where table was introduced.
>
> Note that WAET is a table that is not part of ACPI spec officially.
> It's specified on it's own document, there is only a single version, and
> there is only a single table in that document describing that table
> structure.
>
> Therefore, I cannot write a comment such as build_hmat_lb() have:
> /*
> * ACPI 6.3: 5.2.27.4 System Locality Latency and Bandwidth Information
> * Structure: Table 5-146
> */
>
> My best attempt to do something similar in v2 is:
> /*
> * Windows ACPI Emulated Devices Table
> * (Version 1.0 - April 6, 2009)
> * Spec: http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/WAET.docx
> *
> * Helpful to speedup Windows guests and ignored by others.
> */
>
> If it's not sufficient. Please suggest alternative phrasing which I would
> use in v2.
>
> >
> > > +{
> > > + AcpiTableWaet *waet;
> > > +
> > > + waet = acpi_data_push(table_data, sizeof(*waet));
> > > + waet->emulated_device_flags = cpu_to_le32(ACPI_WAET_PM_TIMER_GOOD);
> > we don't use packed structures for building ACPI tables anymore (there is
> > old code that still does but that's being converted when we touch it)
> >
> > pls use build_append_int_noprefix() api instead, see build_amd_iommu() as
> > an example how to build binary tables using it and how to use comments
> > to document fields.
> > Basic idea is that api makes function building a table match table's
> > description in spec (each call represents a row in spec) and comment
> > belonging to a row should contain verbatim field name as used by spec
> > so reader could copy/past and grep it easily.
> Thanks for pointing this out.
> I will make sure to update my code accordingly in v2.
> >
> >
> >
> >
> > > +
> > > + build_header(linker, table_data,
> > > + (void *)waet, "WAET", sizeof(*waet), 1, NULL, NULL);
> > > +}
> > > +
> > > /*
> > > * IVRS table as specified in AMD IOMMU Specification v2.62, Section 5.2
> > > * accessible here https://urldefense.com/v3/__http://support.amd.com/TechDocs/48882_IOMMU.pdf__;!!GqivPVa7Brio!On_WsDCS8ysOeUG17h1l3dTpWEm79AHwMHLbbUgsvagBSpgZAk5U1cXddn6ZNOU$
> > > @@ -2859,6 +2872,11 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
> > > machine->nvdimms_state, machine->ram_slots);
> > > }
> > > + if (!pcmc->do_not_add_waet_acpi) {
> > > + acpi_add_table(table_offsets, tables_blob);
> > > + build_waet(tables_blob, tables->linker);
> > > + }
> > we typically do not version ACPI table changes (there might be exceptions
> > but it should be a justified one).
> > ACPI tables are considered to be a part of firmware (even though they are
> > generated by QEMU) so on QEMU upgrade user gets a new firmware along with
> > new ACPI tables.
>
> Hmm... I would have expected as a QEMU user that upgrading QEMU may update
> my firmware exposed table (Such as ACPI),
> but only if I don't specify I wish to run on a specific machine-type. In
> that case, I would've expect to be exposed with exact same firmware
> information.
> I understood that this was one of the main reasons why ACPI/SMBIOS
> generation was moved from SeaBIOS to QEMU.
>
> If you think this isn't the case, I can just remove this flag (Makes code
> simpler). What do you prefer?
>
> Thanks for the review,
> -Liran
>
I'm inclined to agree, but no biggie if Igor disagrees let's go along
with his opinion.
--
MST
next prev parent reply other threads:[~2020-03-12 20:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 17:08 [PATCH] acpi: Add Windows ACPI Emulated Device Table (WAET) Liran Alon
2020-03-11 18:59 ` no-reply
2020-03-11 19:08 ` Liran Alon
2020-03-11 20:24 ` Michael S. Tsirkin
2020-03-12 1:31 ` Liran Alon
2020-03-12 6:27 ` Michael S. Tsirkin
2020-03-11 19:00 ` no-reply
2020-03-11 20:36 ` Michael S. Tsirkin
2020-03-11 23:20 ` Liran Alon
2020-03-12 6:12 ` Michael S. Tsirkin
2020-03-12 11:30 ` Liran Alon
2020-03-12 12:19 ` Michael S. Tsirkin
2020-03-12 12:55 ` Liran Alon
2020-03-12 16:35 ` Igor Mammedov
2020-03-12 18:48 ` Liran Alon
2020-03-13 9:35 ` Igor Mammedov
2020-03-12 16:27 ` Igor Mammedov
2020-03-12 17:09 ` Michael S. Tsirkin
2020-03-13 9:36 ` Igor Mammedov
2020-03-13 15:26 ` Michael S. Tsirkin
2020-03-16 13:26 ` Igor Mammedov
2020-03-12 17:28 ` Liran Alon
2020-03-12 19:47 ` Michael S. Tsirkin [this message]
2020-03-12 21:17 ` Liran Alon
2020-03-13 10:05 ` Igor Mammedov
2020-03-13 14:23 ` Liran Alon
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=20200312154646-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=ehabkost@redhat.com \
--cc=elad.gabay@oracle.com \
--cc=imammedo@redhat.com \
--cc=liran.alon@oracle.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).