qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, eric.auger@redhat.com,
	stefanb@linux.ibm.com, qemu-devel@nongnu.org,
	qemu-arm@nongnu.org, peter.maydell@linaro.org, mst@redhat.com,
	shannon.zhaosl@gmail.com, imammedo@redhat.com
Cc: marcandre.lureau@redhat.com, drjones@redhat.com,
	lersek@redhat.com, ardb@kernel.org, philmd@redhat.com
Subject: [PATCH v2 3/5] tests: tpm-emu: Remove assert on TPM2_ST_NO_SESSIONS
Date: Tue,  9 Jun 2020 14:54:07 +0200	[thread overview]
Message-ID: <20200609125409.24179-4-eric.auger@redhat.com> (raw)
In-Reply-To: <20200609125409.24179-1-eric.auger@redhat.com>

bios-tables-test executes SeaBIOS. Indeed FW is needed to
fetch tables from QEMU and put them into the guest RAM. Also
the FW patches cross table pointers. At some point, SeaBIOS
ends up calling the TPM2_CC_HierarchyControl command with
TPM2_ST_SESSIONS tag, most probably steming from
tpm_set_failure/tpm20_hierarchycontrol SeaBIOS call path.
This causes an assert() in the qtest tpm emulation code.

As the goal here is not to boot SeaBIOS completely but just
let it grab the ACPI tables and consolidate them, let's just
remove the assert().

Signed-off-by: Eric Auger <eric.auger@redhat.com>

---

RFC -> PATCH:
- reword the commit message
---
 tests/qtest/tpm-emu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c
index c43ac4aef8..298d0eec74 100644
--- a/tests/qtest/tpm-emu.c
+++ b/tests/qtest/tpm-emu.c
@@ -49,7 +49,6 @@ static void *tpm_emu_tpm_thread(void *data)
         s->tpm_msg->tag = be16_to_cpu(s->tpm_msg->tag);
         s->tpm_msg->len = be32_to_cpu(s->tpm_msg->len);
         g_assert_cmpint(s->tpm_msg->len, >=, minhlen);
-        g_assert_cmpint(s->tpm_msg->tag, ==, TPM2_ST_NO_SESSIONS);
 
         s->tpm_msg = g_realloc(s->tpm_msg, s->tpm_msg->len);
         qio_channel_read(ioc, (char *)&s->tpm_msg->code,
-- 
2.20.1



  parent reply	other threads:[~2020-06-09 12:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 12:54 [PATCH v2 0/5] TPM-TIS bios-tables-test Eric Auger
2020-06-09 12:54 ` [PATCH v2 1/5] test/tpm-emu: include sockets and channel headers in tpm-emu header Eric Auger
2020-06-09 12:54 ` [PATCH v2 2/5] tests/acpi: Add void tables for Q35/TPM-TIS bios-tables-test Eric Auger
2020-06-09 12:54 ` Eric Auger [this message]
2020-06-10 16:38   ` [PATCH v2 3/5] tests: tpm-emu: Remove assert on TPM2_ST_NO_SESSIONS Stefan Berger
2020-06-09 12:54 ` [PATCH v2 4/5] bios-tables-test: Add Q35/TPM-TIS test Eric Auger
2020-06-10 16:39   ` Stefan Berger
2020-06-09 12:54 ` [PATCH v2 5/5] bios-tables-test: Generate reference tables for Q35/TPM-TIS Eric Auger
2020-06-09 14:00 ` [PATCH v2 0/5] TPM-TIS bios-tables-test no-reply
2020-06-09 14:24   ` Auger Eric
2020-06-09 14:15 ` no-reply
2020-06-09 14:30 ` no-reply

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=20200609125409.24179-4-eric.auger@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=ardb@kernel.org \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=stefanb@linux.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).