From: Stefan Berger <stefanb@linux.ibm.com>
To: Joelle van Dyne <j@getutm.app>, Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@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>,
Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: Re: [PATCH v2 06/11] tpm_crb: move ACPI table building to device interface
Date: Tue, 1 Aug 2023 15:38:32 -0400 [thread overview]
Message-ID: <dc4fa093-3940-8fe8-057b-789243648765@linux.ibm.com> (raw)
In-Reply-To: <CA+E+eSB4KkTP7mkMm4VWb6DE3nhSOOB7O9ibtusAW4KKjqQakg@mail.gmail.com>
On 7/31/23 23:02, Joelle van Dyne wrote:
> On Mon, Jul 17, 2023 at 6:42 AM Igor Mammedov <imammedo@redhat.com> wrote:
>>
>> On Fri, 14 Jul 2023 13:21:33 -0400
>> Stefan Berger <stefanb@linux.ibm.com> wrote:
>>
>>> On 7/14/23 03:09, Joelle van Dyne wrote:
>>>> This logic is similar to TPM TIS ISA device. Since TPM CRB can only
>>>> support TPM 2.0 backends, we check for this in realize.
>>>>
>>>> Signed-off-by: Joelle van Dyne <j@getutm.app>
>>>
>>> This patch changes the order of in which the ACPI table elements are created but doesn't matter and also doesn't seem to upset ACPI test cases from what I saw:
>>
>> it seems we do have tests for TIS only (which I added when I was refactoring it to TYPE_ACPI_DEV_AML_IF)
>> perhaps add a test for CRB before this patch a follow process described in bios-tables-test.c
>> for updating expected blob
> I read the file and looked at the commits for TIS tests but I'm not
> sure I understand how it works. At what point do I specify that the
> CRB device should be created for the test?
For me it would be a bit of trial an error as well. So here's my best guess:
Did you look at b193e5f9cccb322b0febd5a2aba486? You basically have to find out which files
are going to change due to extending the tests, so doing something like in that patch comes
after you found out which files are changing and iirc the tests are going to complain about
those files. So I would try to first add CRB tests similar to the following to tests/qtest/bios-tables-test.c.
in one patch, then run the test cases and they will tell you which files changed, and then
add a patch similar to b193e5f9cccb322b0febd5a2aba486 before the test-enabling patch.
if (tpm_model_is_available("-machine q35", "tpm-tis")) {
qtest_add_func("acpi/q35/tpm2-tis", test_acpi_q35_tcg_tpm2_tis);
qtest_add_func("acpi/q35/tpm12-tis",
test_acpi_q35_tcg_tpm12_tis);
}
I would try to something like the above to aarch64 here:
} else if (strcmp(arch, "aarch64") == 0) {
if (has_tcg && qtest_has_device("virtio-blk-pci")) {
qtest_add_func("acpi/virt", test_acpi_virt_tcg);
qtest_add_func("acpi/virt/acpihmatvirt",
test_acpi_virt_tcg_acpi_hmat);
Then you run the tests again then it should create those files with the ACPI data and you copy them
to their destination (like in ca745d2277496464b54fd832c15c45d0227325bb) and remove the changes from
tests/qtest/bios-tables-test-allowed-diff.h and that becomes your 3rd patch. Once you run the tests
again with the 3rd patch there should be no more complaints about ACPI related changes.
Since CRB ACPI tests are not enabled right now you can add these patches somewhere in the middle of
the series or also at the end.
I hope this helps.
Stefan
next prev parent reply other threads:[~2023-08-01 20:05 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 7:09 [PATCH v2 00/11] tpm: introduce TPM CRB SysBus device Joelle van Dyne
2023-07-14 7:09 ` [PATCH v2 01/11] tpm_crb: refactor common code Joelle van Dyne
2023-07-14 7:09 ` [PATCH v2 02/11] tpm_crb: CTRL_RSP_ADDR is 64-bits wide Joelle van Dyne
2023-07-14 7:09 ` [PATCH v2 03/11] tpm_ppi: refactor memory space initialization Joelle van Dyne
2023-07-14 7:09 ` [PATCH v2 04/11] tpm_crb: use a single read-as-mem/write-as-mmio mapping Joelle van Dyne
2023-07-14 12:03 ` Stefan Berger
2023-07-14 7:09 ` [PATCH v2 05/11] tpm_crb: use the ISA bus Joelle van Dyne
2023-07-17 13:46 ` Igor Mammedov
2023-07-18 14:16 ` Stefan Berger
2023-08-01 1:46 ` Joelle van Dyne
2023-10-17 14:24 ` Alexander Graf
2023-07-14 7:09 ` [PATCH v2 06/11] tpm_crb: move ACPI table building to device interface Joelle van Dyne
2023-07-14 17:21 ` Stefan Berger
2023-07-17 13:42 ` Igor Mammedov
2023-08-01 3:02 ` Joelle van Dyne
2023-08-01 19:38 ` Stefan Berger [this message]
2023-08-07 10:20 ` Igor Mammedov
2023-07-14 7:09 ` [PATCH v2 07/11] hw/arm/virt: add plug handler for TPM on SysBus Joelle van Dyne
2023-07-14 12:11 ` Stefan Berger
2023-07-14 17:09 ` Joelle van Dyne
2023-07-17 14:00 ` Igor Mammedov
2023-07-14 7:09 ` [PATCH v2 08/11] hw/loongarch/virt: " Joelle van Dyne
2023-07-20 17:57 ` Stefan Berger
2023-08-03 11:35 ` Stefan Berger
2023-07-14 7:09 ` [PATCH v2 09/11] tpm_tis_sysbus: move DSDT AML generation to device Joelle van Dyne
2023-07-14 16:19 ` Stefan Berger
2023-07-14 17:29 ` Joelle van Dyne
2023-07-14 17:37 ` Stefan Berger
2023-07-14 17:39 ` Joelle van Dyne
2023-07-14 17:43 ` Stefan Berger
2023-07-14 17:46 ` Joelle van Dyne
2023-07-14 18:01 ` Stefan Berger
2023-07-14 18:15 ` Joelle van Dyne
2023-07-17 14:06 ` Igor Mammedov
2023-07-14 7:09 ` [PATCH v2 10/11] tpm_crb_sysbus: introduce TPM CRB SysBus device Joelle van Dyne
2023-07-14 14:27 ` Stefan Berger
2023-07-14 17:20 ` Joelle van Dyne
2023-07-14 17:52 ` Stefan Berger
2023-07-17 14:23 ` Igor Mammedov
2023-10-29 2:21 ` Joelle van Dyne
2023-07-14 7:09 ` [PATCH v2 11/11] tpm_crb: support restoring older vmstate Joelle van Dyne
2023-07-14 14:05 ` Stefan Berger
2023-07-14 14:51 ` Stefan Berger
2023-07-14 17:04 ` Joelle van Dyne
2023-07-14 18:22 ` Stefan Berger
2023-07-14 18:41 ` Stefan Berger
2023-07-14 18:49 ` Joelle van Dyne
2023-07-14 19:12 ` Stefan Berger
2023-07-14 19:44 ` Joelle van Dyne
2023-07-14 19:56 ` Stefan Berger
2023-07-17 14:40 ` Peter Maydell
2023-07-17 14:33 ` Igor Mammedov
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=dc4fa093-3940-8fe8-057b-789243648765@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=anisinha@redhat.com \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=j@getutm.app \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanb@linux.vnet.ibm.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).