From patchwork Wed Jun 30 15:37:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12352469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FED6C11F65 for ; Wed, 30 Jun 2021 15:39:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36DD5613FC for ; Wed, 30 Jun 2021 15:39:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36DD5613FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lycJA-0008EX-9y for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 11:39:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHT-0005PR-Cs for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:39 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:32542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHL-0008CG-C0 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:39 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UFYNxX062962 for ; Wed, 30 Jun 2021 11:37:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=CRBEd09ryVWU+vybpieBShRxMAsBMtz2wtmvqll4vqk=; b=dyoHtHYg/mUmdHDeoiidpV+BR1Py8KIhF+OFLwSaQcCo19spWwzXCBIETchLjr2Nvdzt EGiBwM7SPccr1ywK2zB7IL5vAX4nZ8o0OfGAVkX5U8Md797Yy/ogKPqCSrBLzHbllAUK oco9pTKYAqA2oLwUMFpPx0Kf9smIUHDyUQK7etiECFp7ps++BLUAzypNpcJUv+Ql22Om XGu4mPL6jEmtp0ZKfzfer39Buj8dQ7/bwUPCajvrMis7NT7z54wSpBnvD1kNUxvAbg2d UnraBVj+xgIw2r2yasGn0B3nJCCai9BpCKWI/xxAN2hYOcfUigpUvoOTRq1vizz1vME6 Gg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gr1syhtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jun 2021 11:37:28 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UFYRJk063319 for ; Wed, 30 Jun 2021 11:37:27 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gr1syht3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 11:37:27 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UFTRtl019673; Wed, 30 Jun 2021 15:37:26 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma04wdc.us.ibm.com with ESMTP id 39duvd28aa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:37:26 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UFbPub36635058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 15:37:26 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CEA0DAE0A5; Wed, 30 Jun 2021 15:37:24 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C006CAE0A1; Wed, 30 Jun 2021 15:37:24 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 15:37:24 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH 1/7] tests: Rename TestState to TPMTestState Date: Wed, 30 Jun 2021 11:37:17 -0400 Message-Id: <20210630153723.672473-2-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> References: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: FfOgKHyBAhw2_YeFisW7smrr5Njmtog7 X-Proofpoint-ORIG-GUID: 0L0sDY36H34ZopuR8-xeAeycKx2_VRNZ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_06:2021-06-30, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300092 Received-SPF: none client-ip=148.163.156.1; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Berger , philmd@redhat.com, Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Stefan Berger Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/tpm-crb-test.c | 4 ++-- tests/qtest/tpm-emu.c | 6 +++--- tests/qtest/tpm-emu.h | 6 +++--- tests/qtest/tpm-tis-device-test.c | 2 +- tests/qtest/tpm-tis-test.c | 2 +- tests/qtest/tpm-tis-util.c | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 51d3a4e239..a622f91a37 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1098,7 +1098,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, gchar *tmp_dir_name = g_strdup_printf("qemu-test_acpi_%s_tcg_%s.XXXXXX", machine, tpm_if); char *tmp_path = g_dir_make_tmp(tmp_dir_name, NULL); - TestState test; + TPMTestState test; test_data data; GThread *thread; char *args, *variant = g_strdup_printf(".%s", tpm_if); diff --git a/tests/qtest/tpm-crb-test.c b/tests/qtest/tpm-crb-test.c index ed533900d1..50936f1482 100644 --- a/tests/qtest/tpm-crb-test.c +++ b/tests/qtest/tpm-crb-test.c @@ -26,7 +26,7 @@ uint64_t tpm_tis_base_addr = TPM_TIS_ADDR_BASE; static void tpm_crb_test(const void *data) { - const TestState *s = data; + const TPMTestState *s = data; uint32_t intfid = readl(TPM_CRB_ADDR_BASE + A_CRB_INTF_ID); uint32_t csize = readl(TPM_CRB_ADDR_BASE + A_CRB_CTRL_CMD_SIZE); uint64_t caddr = readq(TPM_CRB_ADDR_BASE + A_CRB_CTRL_CMD_LADDR); @@ -145,7 +145,7 @@ int main(int argc, char **argv) int ret; char *args, *tmp_path = g_dir_make_tmp("qemu-tpm-crb-test.XXXXXX", NULL); GThread *thread; - TestState test; + TPMTestState test; module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c index 2e8eb7b94f..b9cddcc240 100644 --- a/tests/qtest/tpm-emu.c +++ b/tests/qtest/tpm-emu.c @@ -18,7 +18,7 @@ #include "qapi/error.h" #include "tpm-emu.h" -void tpm_emu_test_wait_cond(TestState *s) +void tpm_emu_test_wait_cond(TPMTestState *s) { gint64 end_time = g_get_monotonic_time() + 5 * G_TIME_SPAN_SECOND; @@ -36,7 +36,7 @@ void tpm_emu_test_wait_cond(TestState *s) static void *tpm_emu_tpm_thread(void *data) { - TestState *s = data; + TPMTestState *s = data; QIOChannel *ioc = s->tpm_ioc; s->tpm_msg = g_new(struct tpm_hdr, 1); @@ -71,7 +71,7 @@ static void *tpm_emu_tpm_thread(void *data) void *tpm_emu_ctrl_thread(void *data) { - TestState *s = data; + TPMTestState *s = data; QIOChannelSocket *lioc = qio_channel_socket_new(); QIOChannel *ioc; diff --git a/tests/qtest/tpm-emu.h b/tests/qtest/tpm-emu.h index 73f3bed0c4..b066ad63fb 100644 --- a/tests/qtest/tpm-emu.h +++ b/tests/qtest/tpm-emu.h @@ -26,7 +26,7 @@ struct tpm_hdr { char buffer[]; } QEMU_PACKED; -typedef struct TestState { +typedef struct TPMTestState { GMutex data_mutex; GCond data_cond; bool data_cond_signal; @@ -34,9 +34,9 @@ typedef struct TestState { QIOChannel *tpm_ioc; GThread *emu_tpm_thread; struct tpm_hdr *tpm_msg; -} TestState; +} TPMTestState; -void tpm_emu_test_wait_cond(TestState *s); +void tpm_emu_test_wait_cond(TPMTestState *s); void *tpm_emu_ctrl_thread(void *data); #endif /* TESTS_TPM_EMU_H */ diff --git a/tests/qtest/tpm-tis-device-test.c b/tests/qtest/tpm-tis-device-test.c index 63ed36440f..d36ae20243 100644 --- a/tests/qtest/tpm-tis-device-test.c +++ b/tests/qtest/tpm-tis-device-test.c @@ -33,7 +33,7 @@ int main(int argc, char **argv) { char *tmp_path = g_dir_make_tmp("qemu-tpm-tis-device-test.XXXXXX", NULL); GThread *thread; - TestState test; + TPMTestState test; char *args; int ret; diff --git a/tests/qtest/tpm-tis-test.c b/tests/qtest/tpm-tis-test.c index 79ffbc943e..6fee4779ea 100644 --- a/tests/qtest/tpm-tis-test.c +++ b/tests/qtest/tpm-tis-test.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) int ret; char *args, *tmp_path = g_dir_make_tmp("qemu-tpm-tis-test.XXXXXX", NULL); GThread *thread; - TestState test; + TPMTestState test; module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); diff --git a/tests/qtest/tpm-tis-util.c b/tests/qtest/tpm-tis-util.c index 9aff503fd8..939893bf01 100644 --- a/tests/qtest/tpm-tis-util.c +++ b/tests/qtest/tpm-tis-util.c @@ -373,7 +373,7 @@ void tpm_tis_test_check_access_reg_release(const void *data) */ void tpm_tis_test_check_transmit(const void *data) { - const TestState *s = data; + const TPMTestState *s = data; uint8_t access; uint32_t sts; uint16_t bcount; From patchwork Wed Jun 30 15:37:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12352497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7F3BC11F65 for ; Wed, 30 Jun 2021 15:53:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F7C661477 for ; Wed, 30 Jun 2021 15:53:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F7C661477 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lycWw-0006YB-ER for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 11:53:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycIJ-0007b0-PZ for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:38:31 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49552 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycIG-0000Fu-5y for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:38:31 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UFYdNi075770 for ; Wed, 30 Jun 2021 11:38:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=lNhUnV3bO6RQH3hit7Db3IibS4Qdp+Kk5RS7P1AnzSM=; b=nTiC0yHrWv+VRwezoKiriW6WAlu+13de88x00qi1H+nT9JlK7mtUnGDK2CkP9oOGvCxn Fs+XoiCBa4FXMvgZJyY8tCvH+sIa1KZcbjaoHtNKotUR6fPG8Jx6PaQvXAEWRn5h0XiD 4vy81ZfREFOHI8wHgfW0I1DrAAyQT3du3Ki6AzqOn5IkzCsNMSV+JfMZLSroSyQjFIH8 1vMTELMCocZhrA5grfCgixZKCGT9EstOfczVl8/VrY9gA2Idk/1lm9KEItm0ucUmU1Dh AWw09zwnFCa2PuroDDuxToxarI3ex4jZOC4ww3ZV5JmC9mZZHZXUPIurcpc4CRenac4z Qw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39gt2g35jn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jun 2021 11:38:26 -0400 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UFZriG086730 for ; Wed, 30 Jun 2021 11:38:26 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 39gt2g35j4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 11:38:26 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UFTm6F019735; Wed, 30 Jun 2021 15:38:25 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma04wdc.us.ibm.com with ESMTP id 39duvd29j7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:38:25 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UFbPQA38928720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 15:37:25 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA27DAE012; Wed, 30 Jun 2021 15:37:24 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA5DEAE0AA; Wed, 30 Jun 2021 15:37:24 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 15:37:24 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH 2/7] tests: Add tpm_version field to TPMTestState and fill it Date: Wed, 30 Jun 2021 11:37:18 -0400 Message-Id: <20210630153723.672473-3-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> References: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: dookpWhS3WlCoQEsH_Ejl3Iy0pOSgqxO X-Proofpoint-ORIG-GUID: -wVPrGdpG2vX1WFOB3gu6Mu3_CymQUiE X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_06:2021-06-30, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 suspectscore=0 impostorscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300092 Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Berger , philmd@redhat.com, Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Stefan Berger Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 5 +++-- tests/qtest/tpm-crb-test.c | 1 + tests/qtest/tpm-emu.c | 13 ++++++++++--- tests/qtest/tpm-emu.h | 2 ++ tests/qtest/tpm-tis-device-test.c | 1 + tests/qtest/tpm-tis-test.c | 1 + 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index a622f91a37..93c9d306b5 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1092,7 +1092,7 @@ static void test_acpi_piix4_tcg_numamem(void) uint64_t tpm_tis_base_addr; static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, - uint64_t base) + uint64_t base, enum TPMVersion tpm_version) { #ifdef CONFIG_TPM gchar *tmp_dir_name = g_strdup_printf("qemu-test_acpi_%s_tcg_%s.XXXXXX", @@ -1113,6 +1113,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, g_mutex_init(&test.data_mutex); g_cond_init(&test.data_cond); test.data_cond_signal = false; + test.tpm_version = tpm_version; thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test); tpm_emu_test_wait_cond(&test); @@ -1145,7 +1146,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, static void test_acpi_q35_tcg_tpm_tis(void) { - test_acpi_tcg_tpm("q35", "tis", 0xFED40000); + test_acpi_tcg_tpm("q35", "tis", 0xFED40000, TPM_VERSION_2_0); } static void test_acpi_tcg_dimm_pxm(const char *machine) diff --git a/tests/qtest/tpm-crb-test.c b/tests/qtest/tpm-crb-test.c index 50936f1482..7b94453390 100644 --- a/tests/qtest/tpm-crb-test.c +++ b/tests/qtest/tpm-crb-test.c @@ -156,6 +156,7 @@ int main(int argc, char **argv) g_mutex_init(&test.data_mutex); g_cond_init(&test.data_cond); test.data_cond_signal = false; + test.tpm_version = TPM_VERSION_2_0; thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test); tpm_emu_test_wait_cond(&test); diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c index b9cddcc240..8baf49eafd 100644 --- a/tests/qtest/tpm-emu.c +++ b/tests/qtest/tpm-emu.c @@ -56,9 +56,16 @@ static void *tpm_emu_tpm_thread(void *data) s->tpm_msg->code = be32_to_cpu(s->tpm_msg->code); /* reply error */ - s->tpm_msg->tag = cpu_to_be16(TPM2_ST_NO_SESSIONS); - s->tpm_msg->len = cpu_to_be32(sizeof(struct tpm_hdr)); - s->tpm_msg->code = cpu_to_be32(TPM_RC_FAILURE); + switch (s->tpm_version) { + case TPM_VERSION_2_0: + s->tpm_msg->tag = cpu_to_be16(TPM2_ST_NO_SESSIONS); + s->tpm_msg->len = cpu_to_be32(sizeof(struct tpm_hdr)); + s->tpm_msg->code = cpu_to_be32(TPM_RC_FAILURE); + break; + default: + g_debug("unsupport TPM version %u", s->tpm_version); + g_assert_not_reached(); + } qio_channel_write(ioc, (char *)s->tpm_msg, be32_to_cpu(s->tpm_msg->len), &error_abort); } diff --git a/tests/qtest/tpm-emu.h b/tests/qtest/tpm-emu.h index b066ad63fb..f7b1e3c6ab 100644 --- a/tests/qtest/tpm-emu.h +++ b/tests/qtest/tpm-emu.h @@ -18,6 +18,7 @@ #include "qemu/sockets.h" #include "io/channel.h" +#include "sysemu/tpm.h" struct tpm_hdr { uint16_t tag; @@ -34,6 +35,7 @@ typedef struct TPMTestState { QIOChannel *tpm_ioc; GThread *emu_tpm_thread; struct tpm_hdr *tpm_msg; + enum TPMVersion tpm_version; } TPMTestState; void tpm_emu_test_wait_cond(TPMTestState *s); diff --git a/tests/qtest/tpm-tis-device-test.c b/tests/qtest/tpm-tis-device-test.c index d36ae20243..3ddefb51ec 100644 --- a/tests/qtest/tpm-tis-device-test.c +++ b/tests/qtest/tpm-tis-device-test.c @@ -46,6 +46,7 @@ int main(int argc, char **argv) g_mutex_init(&test.data_mutex); g_cond_init(&test.data_cond); test.data_cond_signal = false; + test.tpm_version = TPM_VERSION_2_0; thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test); tpm_emu_test_wait_cond(&test); diff --git a/tests/qtest/tpm-tis-test.c b/tests/qtest/tpm-tis-test.c index 6fee4779ea..a4a25ba745 100644 --- a/tests/qtest/tpm-tis-test.c +++ b/tests/qtest/tpm-tis-test.c @@ -40,6 +40,7 @@ int main(int argc, char **argv) g_mutex_init(&test.data_mutex); g_cond_init(&test.data_cond); test.data_cond_signal = false; + test.tpm_version = TPM_VERSION_2_0; thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test); tpm_emu_test_wait_cond(&test); From patchwork Wed Jun 30 15:37:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12352503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01C5DC11F65 for ; Wed, 30 Jun 2021 15:59:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8ED57611CA for ; Wed, 30 Jun 2021 15:59:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8ED57611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyccH-00079m-G2 for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 11:59:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHV-0005Uj-AB for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:41 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHL-0008CV-CK for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:41 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UFYEZw028743 for ; Wed, 30 Jun 2021 11:37:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=yzRj0o8ojPFYgy8S6y2/BugwSstc3mgDZe0xkfx6el4=; b=ptMiXxm37ugy3pX5V8M4VcNTKiA3twI2CLAdSZe+8WZcZXQpsfiVXcLWOebXIIKERGfQ fGB6BaHfrpD4okV+XAlm2VOtfVaBuU9JD+AIGypTlOo8uWeYkFNQrt5BzW66ShnNTrgW a3VNiR8JyvxsEHkXVLT4w8UPElh0gzdD9HItOX4BxrHRhh3N1rOcKP6r193k+eFjSjFC sqNQu926+UfCTx/lDddePgGe8qlIYXK04uklS3jMP/zZqM3ptJ4KnXErmuUkefs/S1ci alpr1qmznYzmnm8c/vcuQ29q583xxnp2vgDCDGPZkG4iBCIn+hTtvTJCzIg54nqrEIxM Yg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gtfst7vf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jun 2021 11:37:28 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UFYD64028689 for ; Wed, 30 Jun 2021 11:37:27 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gtfst7uy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 11:37:27 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UFX0Ke029932; Wed, 30 Jun 2021 15:37:26 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03dal.us.ibm.com with ESMTP id 39duvdrkjw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:37:25 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UFbPIw39322046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 15:37:25 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F80DAE019; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 018C7AE052; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 15:37:24 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH 3/7] tests: Add suffix tpm2 or tpm12 to ACPI table files Date: Wed, 30 Jun 2021 11:37:19 -0400 Message-Id: <20210630153723.672473-4-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> References: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: KlqxwH-IVIs4iM6uZbc3NiugE8RSLcfH X-Proofpoint-GUID: uIZg43rDvPCci_vZ6ASaCLkqceEBlmxR X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_06:2021-06-29, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 adultscore=0 bulkscore=0 phishscore=0 clxscore=1015 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300092 Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Berger , philmd@redhat.com, Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Stefan Berger --- tests/data/acpi/q35/{DSDT.tis => DSDT.tis.tpm2} | Bin tests/data/acpi/q35/{TPM2.tis => TPM2.tis.tpm2} | Bin tests/qtest/bios-tables-test.c | 3 ++- 3 files changed, 2 insertions(+), 1 deletion(-) rename tests/data/acpi/q35/{DSDT.tis => DSDT.tis.tpm2} (100%) rename tests/data/acpi/q35/{TPM2.tis => TPM2.tis.tpm2} (100%) diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis.tpm2 similarity index 100% rename from tests/data/acpi/q35/DSDT.tis rename to tests/data/acpi/q35/DSDT.tis.tpm2 diff --git a/tests/data/acpi/q35/TPM2.tis b/tests/data/acpi/q35/TPM2.tis.tpm2 similarity index 100% rename from tests/data/acpi/q35/TPM2.tis rename to tests/data/acpi/q35/TPM2.tis.tpm2 diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 93c9d306b5..4ccbe56158 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1101,7 +1101,8 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, TPMTestState test; test_data data; GThread *thread; - char *args, *variant = g_strdup_printf(".%s", tpm_if); + const char *suffix = tpm_version == TPM_VERSION_2_0 ? "tpm2" : "tpm12"; + char *args, *variant = g_strdup_printf(".%s.%s", tpm_if, suffix); tpm_tis_base_addr = base; From patchwork Wed Jun 30 15:37:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12352481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5000BC11F65 for ; Wed, 30 Jun 2021 15:46:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC9FD61474 for ; Wed, 30 Jun 2021 15:46:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC9FD61474 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lycPm-0005Wx-3g for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 11:46:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHO-0005L2-Ki for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHL-0008CA-Hn for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:34 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UFWcqO012257 for ; Wed, 30 Jun 2021 11:37:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=tW2lOjeHvk8jGfHRPDFY00JzjaDHsrB7NDX2f+qqcBw=; b=pEq3Y+dRUKxMVwSbz1/e30P78G6z00JPclT5sSFJC7lV/Iq9E6RbORmdh9pl2mQW/sIw oyBXwoiOAOAaX9OV52vh4yHtFYrMFtYZ+smsdWTPKMpc32gpYVg/rZPNqoIDF+WeTJGQ MR53SnN3FGw4oLxwpSZWildjSsMGJ9qXMzwLNJM9IjHKnd8yUMy4M45o1XSzTFS+nU1j emYTuXSjR9hxztx/8cYCs8CBh+sSHAFr8eQfyK0UCK7+jlgfJ+lVjITYeiOOuYzQWS5/ ldHbdXBX8FjdaY3g7bcp0jPCwSqndR689r4zbhpuK5nWJk7jIcl7nmx66VM28wiOyUP6 Jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gr81xy1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jun 2021 11:37:27 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UFWrWp013691 for ; Wed, 30 Jun 2021 11:37:27 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gr81xy19-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 11:37:26 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UFa6QT011713; Wed, 30 Jun 2021 15:37:26 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma04dal.us.ibm.com with ESMTP id 39ekxd5t0p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:37:26 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UFbPbM40829406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 15:37:25 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 27473AE018; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 19A87AE097; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH 4/7] test: tpm: Create TPM 1.2 response in TPM emulator Date: Wed, 30 Jun 2021 11:37:20 -0400 Message-Id: <20210630153723.672473-5-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> References: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: A2G3qPs-689jst7Nnut1HH1os-z5dMes X-Proofpoint-GUID: 7Jku272QLXjbGAPRKta4VrGGUDedDycG X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_06:2021-06-30, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 impostorscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300092 Received-SPF: none client-ip=148.163.156.1; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Berger , philmd@redhat.com, Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Stefan Berger Acked-by: Igor Mammedov --- tests/qtest/tpm-emu.c | 5 +++++ tests/qtest/tpm-emu.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c index 8baf49eafd..32c704194b 100644 --- a/tests/qtest/tpm-emu.c +++ b/tests/qtest/tpm-emu.c @@ -62,6 +62,11 @@ static void *tpm_emu_tpm_thread(void *data) s->tpm_msg->len = cpu_to_be32(sizeof(struct tpm_hdr)); s->tpm_msg->code = cpu_to_be32(TPM_RC_FAILURE); break; + case TPM_VERSION_1_2: + s->tpm_msg->tag = cpu_to_be16(TPM_TAG_RSP_COMMAND); + s->tpm_msg->len = cpu_to_be32(sizeof(struct tpm_hdr)); + s->tpm_msg->code = cpu_to_be32(TPM_FAIL); + break; default: g_debug("unsupport TPM version %u", s->tpm_version); g_assert_not_reached(); diff --git a/tests/qtest/tpm-emu.h b/tests/qtest/tpm-emu.h index f7b1e3c6ab..b5354ea101 100644 --- a/tests/qtest/tpm-emu.h +++ b/tests/qtest/tpm-emu.h @@ -16,6 +16,9 @@ #define TPM_RC_FAILURE 0x101 #define TPM2_ST_NO_SESSIONS 0x8001 +#define TPM_FAIL 9 +#define TPM_TAG_RSP_COMMAND 0xc4 + #include "qemu/sockets.h" #include "io/channel.h" #include "sysemu/tpm.h" From patchwork Wed Jun 30 15:37:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12352499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 092BDC11F65 for ; Wed, 30 Jun 2021 15:55:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C462461396 for ; Wed, 30 Jun 2021 15:55:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C462461396 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lycYe-0001jL-VQ for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 11:55:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHS-0005Li-HK for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:31648 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHL-0008CT-CQ for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:38 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UFWfUG152730 for ; Wed, 30 Jun 2021 11:37:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=5/D039zP419vtVYnzEjGBNECi+/k/eXESIP82RlJjdU=; b=JTtkmxkKemgZcoYbEWJ7hJ+/ppOGkULXWQ3tcMPoTvOthe5ThvfoudMi9f1AkketEaFl zyN866RWIRmKSjYuKqoDzt3qnhE9WxP2D7xJBrzvY69Xs56NLY42PYTnECoEmQBRkrES h58a/7M3rkaX5zR+sbwR1/6TCK4W1Eeog54EgMILYwRRvqCXW/YSpZmmGPwHItO390Ub APTacy9HpyOHC3h/4GjqFMWTXje2Q1r/Vq8ayJQYnpzB3QNiXm1Kcp8EL4MZ2FOFUgEm 4vPPN73G6H3VfYdDDgVTorQfi+Ug8OkhshsY3/Hk3ILEmk2WD9KOcjN98e2M864/TFm5 YA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39gt12jtys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jun 2021 11:37:28 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UFXNaJ155306 for ; Wed, 30 Jun 2021 11:37:27 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com with ESMTP id 39gt12jty8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 11:37:27 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UFSeCk022883; Wed, 30 Jun 2021 15:37:25 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma02wdc.us.ibm.com with ESMTP id 39duvd29r4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:37:25 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UFbPFE39322048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 15:37:25 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 439CCAE096; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 32DACAE099; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH 5/7] tests: acpi: prepare for new TPM 1.2 related tables Date: Wed, 30 Jun 2021 11:37:21 -0400 Message-Id: <20210630153723.672473-6-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> References: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: e_sFTL0QQtDY-Hd6T48A6u8EMzz0TfNM X-Proofpoint-GUID: PJYuNJ9ypBg1dBAZS9tRolZKIEKNgh1R X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_06:2021-06-30, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 mlxscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 malwarescore=0 phishscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300092 Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Stefan Berger , "Michael S . Tsirkin" , philmd@redhat.com, Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Stefan Berger Acked-by: Igor Mammedov --- tests/data/acpi/q35/DSDT.tis.tpm12 | 0 tests/data/acpi/q35/TCPA.tis.tpm12 | 0 tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 3 files changed, 2 insertions(+) create mode 100644 tests/data/acpi/q35/DSDT.tis.tpm12 create mode 100644 tests/data/acpi/q35/TCPA.tis.tpm12 diff --git a/tests/data/acpi/q35/DSDT.tis.tpm12 b/tests/data/acpi/q35/DSDT.tis.tpm12 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/TCPA.tis.tpm12 b/tests/data/acpi/q35/TCPA.tis.tpm12 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..fb093b32b9 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.tis.tpm12", +"tests/data/acpi/q35/TCPA.tis.tpm12", From patchwork Wed Jun 30 15:37:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12352483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0A57C11F65 for ; Wed, 30 Jun 2021 15:48:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20D91611CA for ; Wed, 30 Jun 2021 15:48:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20D91611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lycSJ-0000Tt-3E for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 11:48:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHW-0005WX-03 for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:42 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:18378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHM-0008CD-5a for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:41 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UFXDDc044695 for ; Wed, 30 Jun 2021 11:37:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=hJs/FAiYalYwrO6QUimjgaArFhfnhQeNxIzVMc1zPvM=; b=tkPD3bQc+HrNDmaX33DrVCgK67kD8Shgq/9AtiuHw9k0BxfYE7KJGxaVEe9QJjoSzLjR CzOq0WRe3C0YPZobMbbTB2NjplXF3DyWCz9YIhdlKDGxLRPuQgeL2BlzUDeYX9yo8TbJ ZT75QwHJXiu+Mi1iuIqYa1SC2uSpHnqrbdtCRSkL7ZLNiPR3gCOHB/hJqGbifugL3zLw rGroeJiIqYGp73uK64gg/gA5lVnXvvhY6CzmyIy70RoqqUTCL1XaqldvmzFe+aRInsSf kIJJla7ns3tkqqJJAKxW3oy6bWM/7iURsO9LAeb6RGBguXO1oS+3utnhrZ2K87/wjEse fA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gr0372ax-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jun 2021 11:37:27 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UFXZM2050178 for ; Wed, 30 Jun 2021 11:37:27 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 39gr0372a6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 11:37:27 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UFQdlM005270; Wed, 30 Jun 2021 15:37:26 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma05wdc.us.ibm.com with ESMTP id 39duvd2a5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:37:25 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UFbPkH38666734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 15:37:25 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 54B36AE052; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F295AE02D; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH 6/7] tests: acpi: Add test cases for TPM 1.2 with TCPA table Date: Wed, 30 Jun 2021 11:37:22 -0400 Message-Id: <20210630153723.672473-7-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> References: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: q5iCYFID9XC6t280qHVGh7W05sz0CB6J X-Proofpoint-GUID: 8h_Y4XQQ0mbuvVGVAfc8tS8FhCUGXdJB X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_06:2021-06-30, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300092 Received-SPF: none client-ip=148.163.156.1; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Stefan Berger , "Michael S . Tsirkin" , philmd@redhat.com, Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Stefan Berger Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4ccbe56158..ddfd2d2b2a 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1145,11 +1145,16 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, #endif } -static void test_acpi_q35_tcg_tpm_tis(void) +static void test_acpi_q35_tcg_tpm2_tis(void) { test_acpi_tcg_tpm("q35", "tis", 0xFED40000, TPM_VERSION_2_0); } +static void test_acpi_q35_tcg_tpm12_tis(void) +{ + test_acpi_tcg_tpm("q35", "tis", 0xFED40000, TPM_VERSION_1_2); +} + static void test_acpi_tcg_dimm_pxm(const char *machine) { test_data data; @@ -1518,7 +1523,8 @@ int main(int argc, char *argv[]) return ret; } qtest_add_func("acpi/q35/oem-fields", test_acpi_oem_fields_q35); - qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_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); qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); qtest_add_func("acpi/oem-fields", test_acpi_oem_fields_pc); qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); From patchwork Wed Jun 30 15:37:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12352501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AC72C11F65 for ; Wed, 30 Jun 2021 15:57:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1139611CA for ; Wed, 30 Jun 2021 15:57:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1139611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lycat-0005HF-VF for qemu-devel@archiver.kernel.org; Wed, 30 Jun 2021 11:57:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHU-0005Rx-AK for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:40 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62838 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lycHL-0008CM-CA for qemu-devel@nongnu.org; Wed, 30 Jun 2021 11:37:40 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15UFX4Wi131224 for ; Wed, 30 Jun 2021 11:37:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=0fXgncAbR1vdCC6BsuqhbJ89iytgfr9NpJRhojh/9Yo=; b=N++waMWYfN5npXZU4NFk3AHxexCRk9ZKXUI7oyela0F6us6cL/rW0CRytRUXwY4m1de4 LPeVOUNmhRZFWYEnlwWgZrKhWdrUWqk5UGdZETwbDDeAp+CaDgNKCCCWk4Llc2Y1Wtsg 5MyE80PurLyFuJo+vyiBs1YOkcQ7lxhmlj20Pmp1cZvtj/oGbnvZGFmNlAPv9tFet5sX Ufe+r43ibOO0WIcDAE0eOokq0auMS+4IJkdoFhMoM7o/CEOwSHR6FEiRgVZbxZ2ULkOO 4mZvWS9nR/UamX6Z7lHwblriaav2insXbdCXTWUJanXBreSXo1jJPhYpdVaea7ACVGdY cA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39gubsr4m1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jun 2021 11:37:28 -0400 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15UFYGov135814 for ; Wed, 30 Jun 2021 11:37:28 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com with ESMTP id 39gubsr4k7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 11:37:28 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15UFX0qh030001; Wed, 30 Jun 2021 15:37:26 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03dal.us.ibm.com with ESMTP id 39duvdrkk6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Jun 2021 15:37:26 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15UFbPDi30671288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 15:37:25 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7061AAE097; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5FB30AE099; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 30 Jun 2021 15:37:25 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH 7/7] tests: acpi: tpm1.2: Add expected TPM 1.2 ACPI blobs Date: Wed, 30 Jun 2021 11:37:23 -0400 Message-Id: <20210630153723.672473-8-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> References: <20210630153723.672473-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 753263-abIFRCXAlDOenInrgoFQYbix9 X-Proofpoint-GUID: 1yAQbE71r2aFjxD2hLT8pp8olGHa4NwN X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-30_06:2021-06-30, 2021-06-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 clxscore=1015 impostorscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106300092 Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Stefan Berger , "Michael S . Tsirkin" , philmd@redhat.com, Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The TCPA.tis.tpm12 file contains the following: [000h 0000 4] Signature : "TCPA" [Trusted Computing Platform Alliance table] [004h 0004 4] Table Length : 00000032 [008h 0008 1] Revision : 02 [009h 0009 1] Checksum : 32 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 2] Platform Class : 0000 [026h 0038 4] Min Event Log Length : 00010000 [02Ah 0042 8] Event Log Address : 0000000007FF0000 Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Stefan Berger Acked-by: Igor Mammedov --- tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 0 -> 8465 bytes tests/data/acpi/q35/TCPA.tis.tpm12 | Bin 0 -> 50 bytes tests/qtest/bios-tables-test-allowed-diff.h | 2 -- 3 files changed, 2 deletions(-) diff --git a/tests/data/acpi/q35/DSDT.tis.tpm12 b/tests/data/acpi/q35/DSDT.tis.tpm12 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4178162b0b20b2a4a391daa73264963c28a99a3a 100644 GIT binary patch literal 8465 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 literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index fb093b32b9..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.tis.tpm12", -"tests/data/acpi/q35/TCPA.tis.tpm12",