From patchwork Tue Jul 13 20:15:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374957 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 D33A6C11F68 for ; Tue, 13 Jul 2021 20:17:33 +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 40C916135A for ; Tue, 13 Jul 2021 20:17:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40C916135A 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]:57714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OqS-0004Rj-4h for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:17:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oov-0001YY-8v for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41242 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 1m3Oor-0004vx-E8 for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:56 -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 16DK4PvJ175653 for ; Tue, 13 Jul 2021 16:15:51 -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=z/JPUZfVEkCPWyLWgIy258uJ2eVGHWRp5RNDeK/bmrU=; b=UyTIJEjxzNHQqb02zWqyVho5QUDlmWcMbMeZWoGOzsxREAtXeYCaUxYqlgDT4vBCYT7f fQ1QPoaXe081t5FvCNei4xtN8PJnvFtFhpU1t9ZMJu5g/sF8zUtcSm1mVRDs78K3Nyup 8n+B1/Fc8BEZRScSe9fA9zlL9EcrI0myEfoVA1+lTzEF25R0XopEnVK/CU8/gKVY5bkU BaF0lS305bt5hyQkkn/9a2WtWxHmDfJZlwk1a8HGLKGplPVv9t3W/Dy2Wv0nh8iBV609 cubRaS6GimNIQQ1h55TtDnef5pMoEbIPZAhYaC62necs1smXU698qbDWMBbGoeT45CMC sA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sdy5q78f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:50 -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 16DK4q2h180466 for ; Tue, 13 Jul 2021 16:15:50 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sdy5q783-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:50 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16DKC6qZ030515; Tue, 13 Jul 2021 20:15:49 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma03wdc.us.ibm.com with ESMTP id 39q36bf0ty-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:49 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFmkv21299514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:48 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BCA147805F; Tue, 13 Jul 2021 20:15:48 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 573097805C; Tue, 13 Jul 2021 20:15:48 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:48 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 01/10] tests: Rename TestState to TPMTestState Date: Tue, 13 Jul 2021 16:15:36 -0400 Message-Id: <20210713201545.903754-2-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: gu62WuBhYGta9YH3Hd4YYbSsJB7jN-ps X-Proofpoint-GUID: xhhRimcj0HDBaHeXzhRBIO5CDJsQsgaf X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 mlxscore=0 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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 , 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 Tue Jul 13 20:15:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374955 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 3BDC4C11F66 for ; Tue, 13 Jul 2021 20:17:33 +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 AEF826135A for ; Tue, 13 Jul 2021 20:17:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEF826135A 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]:57662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OqR-0004Py-QT for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:17:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oou-0001YL-HL for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45530 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 1m3Oor-0004wP-Dt for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:56 -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 16DK3UG3159852 for ; Tue, 13 Jul 2021 16:15:51 -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=i18rnZKDWLfvquNDmmDnuagjynsCInBUMoABA+cA58A=; b=SkkypGNuB9Nmyt8//3S6pw60rWF4y0fkTJLGGf26Yjt5ZvOtl+LRxiT2V3c+Rgng8sSF rji496TfQ0Mmiq57elkG8CH45PcZyQnbLd0KHjlrA3tu0IQUekmXj/UCdqaIF3COgkyj ft4OSMhqpyNQmZFbHdAnUmuRFleq0Ciz/ckQMIrnhwsyqU1Vwb2NT0jkdu9FzKLry82b eebVWoBHZ8KP08tq7lkxOEUNsQHDTm6dIsvOR5hlby766W7C4qHZR+3zopkLIpEw4FML yy4vnytotdL4phxfSQfac0lPZPpi/UYImPxqXhhA/pLkwgw4rRPprQnGPnq37tPLftTT TQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sb2bdm0b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:51 -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 16DK3WSF160053 for ; Tue, 13 Jul 2021 16:15:51 -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 39sb2bdkym-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:50 -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 16DKCOGe007124; Tue, 13 Jul 2021 20:15:50 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma02wdc.us.ibm.com with ESMTP id 39q36bf0dp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:50 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFnKi53477790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:49 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 38C0A78066; Tue, 13 Jul 2021 20:15:49 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D338E7805C; Tue, 13 Jul 2021 20:15:48 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:48 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 02/10] tests: Add tpm_version field to TPMTestState and fill it Date: Tue, 13 Jul 2021 16:15:37 -0400 Message-Id: <20210713201545.903754-3-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: j4SDEjpzLY9rR5wXGTDiETR9zRJzq3r2 X-Proofpoint-GUID: ZVFsXJFUhvJITISupN2BA7jpiUpddf1I X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 clxscore=1015 spamscore=0 phishscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) 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 --- v3: - Added enum TPMVersion for when CONFIG_TPM is not defined --- 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 | 8 ++++++++ tests/qtest/tpm-tis-device-test.c | 1 + tests/qtest/tpm-tis-test.c | 1 + 6 files changed, 24 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..610519883a 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; @@ -26,6 +27,12 @@ struct tpm_hdr { char buffer[]; } QEMU_PACKED; +#ifndef CONFIG_TPM +enum TPMVersion { + TPM_VERSION_2_0 = 2, +}; +#endif + typedef struct TPMTestState { GMutex data_mutex; GCond data_cond; @@ -34,6 +41,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 Tue Jul 13 20:15:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374953 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 A18D2C11F67 for ; Tue, 13 Jul 2021 20:17:32 +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 3BD5861351 for ; Tue, 13 Jul 2021 20:17:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BD5861351 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]:57658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OqQ-0004Pw-Rq for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:17:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oou-0001Y7-9B for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:1342 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 1m3Oor-0004x7-IX for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:55 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16DK3mJa140832 for ; Tue, 13 Jul 2021 16:15:52 -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=HoEDlvu6512z1b5RLkb4CCBDZszek8MVwxCtktdFtNM=; b=P5tMu/FzmU7hXXhO+3JZiL0JLEfN0uawj8ZOSfkSKxfH8nXkOfE4BviTeJ0rtc2Hkw7T l8RzALtXrVylTboiLgM95BMHOaDhQiHKswsK+4Zishg7JvVX7nNtkawyr76XVrynQwno UDxWG+pT9nD3vuH9LBC9Of426QyAOPB5mpdZsfpJ4l/KozokRA3qHBPqwsiJnp1mX7fM xFayqS/PYVjptv/DvJU0I0XH5hy9jwRaTp4KwRSrnIxUuWQUMhM6DC8xF54/7a1lrNy4 ITe15VKSzbjj83SzmYVWqLd/qTfmK5enw4CMxAU+366uwvJ3cYHhL5MXwvCXCXnTBStQ iw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sde10j1a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:52 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16DKASAP171358 for ; Tue, 13 Jul 2021 16:15:52 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sde10j14-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:52 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16DKDCAY032459; Tue, 13 Jul 2021 20:15:51 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01dal.us.ibm.com with ESMTP id 39q36cbhsa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:51 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFnks49152434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:49 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA0A978066; Tue, 13 Jul 2021 20:15:49 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4FA3C7805C; Tue, 13 Jul 2021 20:15:49 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:49 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 03/10] tests: acpi: Prepare for renaming of TPM2 related ACPI files Date: Tue, 13 Jul 2021 16:15:38 -0400 Message-Id: <20210713201545.903754-4-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: wfR9z70L_I6M6Nv7sZ_NTuv4xx_MIEC8 X-Proofpoint-ORIG-GUID: rSdEjTJwENKK3n5jHNBHjarKFeoGiNHc X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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 Reviewed-by: Igor Mammedov --- tests/data/acpi/q35/DSDT.tis.tpm2 | 0 tests/data/acpi/q35/TPM2.tis.tpm2 | 0 tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 3 files changed, 2 insertions(+) create mode 100644 tests/data/acpi/q35/DSDT.tis.tpm2 create mode 100644 tests/data/acpi/q35/TPM2.tis.tpm2 diff --git a/tests/data/acpi/q35/DSDT.tis.tpm2 b/tests/data/acpi/q35/DSDT.tis.tpm2 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/data/acpi/q35/TPM2.tis.tpm2 b/tests/data/acpi/q35/TPM2.tis.tpm2 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..b301b8fa06 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.tpm2", +"tests/data/acpi/q35/TPM2.tis.tpm2", From patchwork Tue Jul 13 20:15:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374979 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 DE7ABC07E96 for ; Tue, 13 Jul 2021 20:19:44 +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 9F86561175 for ; Tue, 13 Jul 2021 20:19:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F86561175 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]:38178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OsZ-0001yn-PI for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:19:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oou-0001Y5-3z for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62160) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oor-0004x5-ET for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:55 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16DK3iNm054753 for ; Tue, 13 Jul 2021 16:15:52 -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=MVOJgdr4wexwAri1vQ8wjQWuBqv9P3ZScgXkInrKN3o=; b=qr6BbT4wPrHZUHKMKajdqzFww2ywvPxnC8uOMyaNZTWISMUzSy4SlaKM5W1NFxDSxNB6 6V40BSfPC8FqwKVXnHg9sdla9Q5xJFmdi4vPRHAwtgshbMVGnou/woVLDzvlyVLAP3UP 1cTWk8iDXI2eM541pyhTW6nUf7KJQQm+3q6JY95K686gLoYAp6UE/v8nmgYXoRw7bp4M M7EAgZXvadEIEfDHTqxv+g24sv7LB2r5lf2FszaONxkEuY8JWftir9rom6KQMJ/mdke5 QTSwnHPJExzDZQfUVKr3QqEmoWXQmkRzg6yVL6GcCievQ/OkL1fMGBxZ0mXjlBLcTrp9 hQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39sc2xaxd7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:52 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16DK3j7p054881 for ; Tue, 13 Jul 2021 16:15:52 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 39sc2xaxcx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:52 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16DKC6NN030494; Tue, 13 Jul 2021 20:15:51 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma03wdc.us.ibm.com with ESMTP id 39q36bf0uq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:51 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFo8G15860014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:50 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6674C7806D; Tue, 13 Jul 2021 20:15:50 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E05F778063; Tue, 13 Jul 2021 20:15:49 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:49 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 04/10] tests: Add suffix 'tpm2' or 'tpm12' to ACPI table files Date: Tue, 13 Jul 2021 16:15:39 -0400 Message-Id: <20210713201545.903754-5-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mNLqQ3GAEBlaJ5WESh2dIwhriCw5rXy8 X-Proofpoint-ORIG-GUID: JQE7XAxVwo1lKtrYshc19NTTWrQeHulH X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 spamscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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: 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 Tue Jul 13 20:15:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374977 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=-13.8 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,UNWANTED_LANGUAGE_BODY, 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 0C2C8C11F66 for ; Tue, 13 Jul 2021 20:19:44 +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 AB84961175 for ; Tue, 13 Jul 2021 20:19:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB84961175 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]:38110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OsY-0001uy-Sm for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:19:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Op0-0001aj-6O for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:03 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:5710 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 1m3Oos-0004xN-5W for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:01 -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 16DK3UG4159852 for ; Tue, 13 Jul 2021 16:15:53 -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=d1VNtTRCn2eDY0m1mSeTP6//wndlGqR13cNZtY9W9wQ=; b=TG5Dj/ycpKwOXuv+Xg8XMv8gKYN8sUgF5QPL70zcEOaOKmDf6/NMv5Yhna/VkwTVQ3UD KtdcxChoM93fzuCZVSD9NC8xW0SBEuOO+Ax5waoX4/9045HuBYyhTmeeqxJ8MQz/crT+ 2XrgdxBGAPu4kB4WQ/IcDwpV8bRme5dOwssSRKHrQqRSOKgvVyXMABMTFec+9ucgE0XF 8jOS+PLNd/LDzT3e7KVG4koUh2gKy5Nib1ZxNQhBujYu4/7kXhb22S/3QYfG4oDg1CLu CDmF06sBNlV77fDRIbJxPszhvVHvdtLrWaKSu7Pbcb2cWvtEa8blG7i1KzNuVYXQiVnG 2Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sb2bdm11-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:53 -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 16DK3WSH160053 for ; Tue, 13 Jul 2021 16:15:52 -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 39sb2bdm0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:52 -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 16DKCQea007200; Tue, 13 Jul 2021 20:15:52 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma02wdc.us.ibm.com with ESMTP id 39q36bf0ek-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:52 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFpjp42533142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:51 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EF9E97805C; Tue, 13 Jul 2021 20:15:50 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D7C87806E; Tue, 13 Jul 2021 20:15:50 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:50 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 05/10] tests: acpi: tpm2: Add the renamed ACPI files and drop old ones Date: Tue, 13 Jul 2021 16:15:40 -0400 Message-Id: <20210713201545.903754-6-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: a1U2TSEl-y4vDgjkA7OxzGJaRiSLMDH3 X-Proofpoint-GUID: gjs-CUIxi0jlm4RXtf8GI7bL1n1XfZgj X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 clxscore=1015 spamscore=0 phishscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=991 suspectscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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 | Bin 8465 -> 0 bytes tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 0 -> 8465 bytes tests/data/acpi/q35/TPM2.tis | Bin 76 -> 0 bytes tests/data/acpi/q35/TPM2.tis.tpm2 | Bin 0 -> 76 bytes tests/qtest/bios-tables-test-allowed-diff.h | 2 -- 5 files changed, 2 deletions(-) delete mode 100644 tests/data/acpi/q35/DSDT.tis delete mode 100644 tests/data/acpi/q35/TPM2.tis diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis deleted file mode 100644 index 15a26a14e4be5280c0f1cc09f66428311100b7ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8465 zcmb7KOKcm*8J^`sS}vE;lA`5jBGz#qX@i84@u**@Y>mLF=l*P-f-(dq5MI&Lt`sqmp*oGU)qY^ycu3%1lqk6Sr+X$mAP(E?soQF z%Xb?^vs-U?cIk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U-oS`Ll)o84UaN^^;~xVY?;pXUctq_tsS<;ss^&`nq23jAB%4mEpBPv%fUjD~h{lEk1lXSh&kT^Sk_3A8&>Hbo%geQ51a_!6rE01c zb%_?pG^Cc}=+x9Z9q@hz*|@>*6z2ae@UM3G)WTnPtM8two&VzBcYcOvJPl*qi1!yT Mh>{=D$sDl%17maSY5)KL literal 0 HcmV?d00001 diff --git a/tests/data/acpi/q35/TPM2.tis b/tests/data/acpi/q35/TPM2.tis deleted file mode 100644 index fe0f05987be40f1c1742ae189df7821adc522fc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 wcmWFu@HO&bU|?Vob@F%i2v%^42yj*a0!E-1hz+8V0UI(0%m%6W&kkY&0CHRh0RR91 diff --git a/tests/data/acpi/q35/TPM2.tis.tpm2 b/tests/data/acpi/q35/TPM2.tis.tpm2 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..fe0f05987be40f1c1742ae189df7821adc522fc0 100644 GIT binary patch literal 76 wcmWFu@HO&bU|?Vob@F%i2v%^42yj*a0!E-1hz+8V0UI(0%m%6W&kkY&0CHRh0RR91 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 b301b8fa06..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.tpm2", -"tests/data/acpi/q35/TPM2.tis.tpm2", From patchwork Tue Jul 13 20:15:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374951 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 0AF7CC07E95 for ; Tue, 13 Jul 2021 20:17:32 +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 B2D2E6135A for ; Tue, 13 Jul 2021 20:17:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2D2E6135A 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]:57678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OqQ-0004QT-Lw for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:17:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oov-0001Yc-DS for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54628 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 1m3Oos-0004xr-Ha for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:15:57 -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 16DK4PGY175664 for ; Tue, 13 Jul 2021 16:15:53 -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=dKMFkkFl8n+JczG7OgICgT18GjNF9+hjX0hMVru2UQo=; b=QPmIY+xcJUCi5VnWdrGZxDfL/CgAy7pBCXhSyMS7nQaxRE+6PbQS1NW2BbMSF7WBLIQ2 cdidXRTScyPz9mywMA5pPllYT0ouWMYOXZiJFv+KwenrTGgkJXjZeyWgn4kN0C0jGmch gAKPFmOYd1R8Jifte1wpNsdHsmRYt4wc94yV6cMqe8yJut6oyYoT0Q4ffmFmIoeAhHpJ dt6wOcZ5R+oWFDNBHD96cLla5dCuFlnjXriWcFt/anA3uyfmjD4onRHmdSamllWYSGnw oKh5AZyjykCyyYpBuzqOoMiCkokwB067hAY+3h/DRBJZ+AvExN6G3L3uLsmCmXGpyeCe DQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sdy5q79k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:53 -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 16DK5QgT181896 for ; Tue, 13 Jul 2021 16:15:53 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com with ESMTP id 39sdy5q79a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:53 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16DKCL40028067; Tue, 13 Jul 2021 20:15:52 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma02dal.us.ibm.com with ESMTP id 39qt3bgg6j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:52 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFpVb50725214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:51 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 626457805F; Tue, 13 Jul 2021 20:15:51 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1233D78060; Tue, 13 Jul 2021 20:15:51 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:50 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 06/10] tests: tpm: Create TPM 1.2 response in TPM emulator Date: Tue, 13 Jul 2021 16:15:41 -0400 Message-Id: <20210713201545.903754-7-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: B07PDAh1FoVR4U2BmoK4ALemdZsB-Bl- X-Proofpoint-GUID: 7ONhNOQqiv2SPx7DKs3vqLqQoS6peArv X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 mlxscore=0 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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 Acked-by: Igor Mammedov --- v3: - Added TPM_VERSION_1_2 enum for when CONFIG_TPM is not defined --- tests/qtest/tpm-emu.c | 5 +++++ tests/qtest/tpm-emu.h | 4 ++++ 2 files changed, 9 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 610519883a..fcb5d7a1d6 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" @@ -29,6 +32,7 @@ struct tpm_hdr { #ifndef CONFIG_TPM enum TPMVersion { + TPM_VERSION_1_2 = 1, TPM_VERSION_2_0 = 2, }; #endif From patchwork Tue Jul 13 20:15:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374983 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 A4473C11F66 for ; Tue, 13 Jul 2021 20:21:10 +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 4DD7F61360 for ; Tue, 13 Jul 2021 20:21:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DD7F61360 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]:45076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3Otx-00078s-GI for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:21:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Op2-0001bK-0u for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:05 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60708) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oot-0004yX-7Y for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:01 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16DK3ill054710 for ; Tue, 13 Jul 2021 16:15:54 -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=qkGgrS6/lJMI3Otd5+ZfQ7JS1RRhDtyJ3EZX2Jor7fo=; b=l8R7/W6sx14+MAb78coDAuthZFFNepRUvdsjza70eybh9smhvVrM5MWd8Mxh4uTpu000 ORetSpVNRm13NicJlDQw6XQ09wRVGZZbynFjE2bt14QDILwPAvMYhvwyF7pQN/XQ7Gi2 4S4X13IHCGRYcLUSA73uytDGI8d7A7+xx3SeF++jm1GpkhU5yXg6GdS/Kss+9AOU9j+3 gU+7UOTYxYrymeZ/2IbYYpKF/HABz7M6F+mPtz3WcqVVUSDs+MB6oKQbzbqkJfxX21qk S4II1+1Ry33xd0RPuhsr60uctGVLzId9Het4bfNzBWI218jG4h2Sn9OmE1mSt2fWWemL 4A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39sc2xaxdy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:54 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16DK4sNO064015 for ; Tue, 13 Jul 2021 16:15:54 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 39sc2xaxdn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:54 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16DKCLeE028160; Tue, 13 Jul 2021 20:15:53 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma02dal.us.ibm.com with ESMTP id 39qt3bgg6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:53 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFqkf29360482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:52 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A26F78069; Tue, 13 Jul 2021 20:15:52 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 831B878060; Tue, 13 Jul 2021 20:15:51 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:51 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 07/10] tests: acpi: prepare for new TPM 1.2 related tables Date: Tue, 13 Jul 2021 16:15:42 -0400 Message-Id: <20210713201545.903754-8-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pAgS580cJDayRdL107g9Cm8AkdyngZri X-Proofpoint-ORIG-GUID: dje2CGFpkKJycviaZACtJY-vm07Pmpyi X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 spamscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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: 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 Tue Jul 13 20:15:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374975 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 8DEF9C07E95 for ; Tue, 13 Jul 2021 20:19:43 +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 0AB5A61175 for ; Tue, 13 Jul 2021 20:19:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AB5A61175 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]:38040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OsY-0001rZ-6P for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:19:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Ooz-0001aP-Ge for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:02 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62788 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 1m3Oot-0004ys-ET for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:00 -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 16DK8fTm044323 for ; Tue, 13 Jul 2021 16:15:54 -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=RkYZzL71+HtHWYLHoB/nPWI3fB0Lk7dgrGDrSaTpBzs=; b=TG6TY2PM8gd0CXicvx8rf/R7f0rr49NgFMQ+e3ScKZIfirE7450j5t8BbboGho6oKbHo 7/d1JzUcnUvyj0OCcM3MqCHHX0UmDlPlIqeQaTNvsbLM2JAxXGCbb0S68VyrhcdGMtgZ sgPj9Rwc8vpoSIhjrszKcYFSUngXufrccZAY1I5NRsYfHBWUELo01fHP8+NcwlesHfZx 8W4odmDocxpoBGZ278IfjoECvWvvJhPWW/soqH5WqfORt1mbBv4C3QGnh9Oj8OLEt3g2 mnu/nxPTnTbkU92H3Vcu7Gd9e/omIb3LNReN6rrdthSY8sD1ZVXnvmjd1TouetnKX8Zp sw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39qs3chq14-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:54 -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 16DKBP0n050994 for ; Tue, 13 Jul 2021 16:15:54 -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 39qs3chq0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:54 -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 16DKCOnh007109; Tue, 13 Jul 2021 20:15:53 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma02wdc.us.ibm.com with ESMTP id 39q36bf0f2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:53 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFqMk18153772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:52 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B22578063; Tue, 13 Jul 2021 20:15:52 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2147578068; Tue, 13 Jul 2021 20:15:52 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:52 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 08/10] tests: Use QMP to check whether a TPM device model is available Date: Tue, 13 Jul 2021 16:15:43 -0400 Message-Id: <20210713201545.903754-9-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: eqgXMW9EAWfKYKtMpC8Kj2gXxQ1xKvGt X-Proofpoint-ORIG-GUID: -LStvEh-MbubznikVuNpTk77b754MFHv X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 phishscore=0 impostorscore=0 suspectscore=0 mlxscore=0 adultscore=0 malwarescore=0 clxscore=1015 bulkscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) 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" Use QMP to check whether a given TPM device model is available and if it is not the case then do not register the tests that require it. Signed-off-by: Stefan Berger --- tests/qtest/bios-tables-test.c | 8 +++---- tests/qtest/tpm-emu.c | 38 ++++++++++++++++++++++++++++++++++ tests/qtest/tpm-emu.h | 2 ++ 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4ccbe56158..0a78ddb5d1 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1094,7 +1094,6 @@ uint64_t tpm_tis_base_addr; static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, uint64_t base, enum TPMVersion tpm_version) { -#ifdef CONFIG_TPM 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); @@ -1140,9 +1139,6 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, g_free(tmp_dir_name); g_free(args); free_test_data(&data); -#else - g_test_skip("TPM disabled"); -#endif } static void test_acpi_q35_tcg_tpm_tis(void) @@ -1518,7 +1514,9 @@ 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); + 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/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); diff --git a/tests/qtest/tpm-emu.c b/tests/qtest/tpm-emu.c index 32c704194b..2994d1cf42 100644 --- a/tests/qtest/tpm-emu.c +++ b/tests/qtest/tpm-emu.c @@ -16,6 +16,8 @@ #include "backends/tpm/tpm_ioctl.h" #include "io/channel-socket.h" #include "qapi/error.h" +#include "qapi/qmp/qlist.h" +#include "qapi/qmp/qstring.h" #include "tpm-emu.h" void tpm_emu_test_wait_cond(TPMTestState *s) @@ -192,3 +194,39 @@ void *tpm_emu_ctrl_thread(void *data) object_unref(OBJECT(lioc)); return NULL; } + +bool tpm_model_is_available(const char *args, const char *tpm_if) +{ + QTestState *qts; + QDict *rsp_tpm; + bool ret = false; + + qts = qtest_init(args); + if (!qts) { + return false; + } + + rsp_tpm = qtest_qmp(qts, "{ 'execute': 'query-tpm'}"); + if (!qdict_haskey(rsp_tpm, "error")) { + QDict *rsp_models = qtest_qmp(qts, + "{ 'execute': 'query-tpm-models'}"); + if (qdict_haskey(rsp_models, "return")) { + QList *models = qdict_get_qlist(rsp_models, "return"); + QListEntry *e; + + QLIST_FOREACH_ENTRY(models, e) { + QString *s = qobject_to(QString, qlist_entry_obj(e)); + const char *ename = qstring_get_str(s); + if (!strcmp(ename, tpm_if)) { + ret = true; + break; + } + } + } + qobject_unref(rsp_models); + } + qobject_unref(rsp_tpm); + qtest_quit(qts); + + return ret; +} diff --git a/tests/qtest/tpm-emu.h b/tests/qtest/tpm-emu.h index fcb5d7a1d6..c33d99af37 100644 --- a/tests/qtest/tpm-emu.h +++ b/tests/qtest/tpm-emu.h @@ -22,6 +22,7 @@ #include "qemu/sockets.h" #include "io/channel.h" #include "sysemu/tpm.h" +#include "libqos/libqtest.h" struct tpm_hdr { uint16_t tag; @@ -50,5 +51,6 @@ typedef struct TPMTestState { void tpm_emu_test_wait_cond(TPMTestState *s); void *tpm_emu_ctrl_thread(void *data); +bool tpm_model_is_available(const char *args, const char *tpm_if); #endif /* TESTS_TPM_EMU_H */ From patchwork Tue Jul 13 20:15:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374987 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 639D9C07E95 for ; Tue, 13 Jul 2021 20:22:27 +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 2863361360 for ; Tue, 13 Jul 2021 20:22:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2863361360 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]:48836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OvC-0001cU-CH for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:22:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Op2-0001bN-0E for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:05 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oov-0004zS-0K for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:02 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16DK7kYl003686 for ; Tue, 13 Jul 2021 16:15:56 -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=Cx2CYNAFW/rUBEJKlaN69hC3VQ0bToFiK+bNtANZU04=; b=fPCEKq33IMJ21OrQehdXbIRyrngiG8itAXY+Wjg3c32I6RZhQu7w7o7sGLrOseFYS3pC CX4laQCaGrl7uXAeWH+HCfNFCDagKS75iQHJhM+sE6mOhKLDwgoqvaLgzYEdbpHNEmao 5wxjtm33byLKbSQ7uDyVGdUE/d0JrlM8TvOXnaF3Tl0Kif4zEuqAXzef6i4YSRlRXLXF vZNswybT2WlovoisCzYVeSI0cge0d0h4Guda/dh2oAoHb+ygnDq8+iKd+5ENSvyo7BHT XXb+BzYVWz4EvhH4Pp+VEjjKyiLhO3rRadYJqLKiQIjoWg8h/z3YjOAp5F8SoJq/DS5B 6w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39qrmd55rd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:55 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16DKFtcn033342 for ; Tue, 13 Jul 2021 16:15:55 -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 39qrmd55r1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:55 -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 16DKBloh000609; Tue, 13 Jul 2021 20:15:54 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03dal.us.ibm.com with ESMTP id 39rkgum56v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:54 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFrCE16581186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:53 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0FD2A78069; Tue, 13 Jul 2021 20:15:53 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9276D78067; Tue, 13 Jul 2021 20:15:52 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:52 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 09/10] tests: acpi: Add test cases for TPM 1.2 with TCPA table Date: Tue, 13 Jul 2021 16:15:44 -0400 Message-Id: <20210713201545.903754-10-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: ih_NH-i3ITP8FeFASCk_WqdU5qXa9bD4 X-Proofpoint-GUID: m0VmP0-X_odcBp1Hzw-M3_yoh-7KFLps X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 suspectscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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_H4=0.001, RCVD_IN_MSPIKE_WL=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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 0a78ddb5d1..4f11d03055 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1141,11 +1141,16 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, free_test_data(&data); } -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; @@ -1516,6 +1521,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/oem-fields", test_acpi_oem_fields_q35); 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); } qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); qtest_add_func("acpi/oem-fields", test_acpi_oem_fields_pc); From patchwork Tue Jul 13 20:15:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 12374981 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, 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 74D4FC11F68 for ; Tue, 13 Jul 2021 20:19: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 199F06135A for ; Tue, 13 Jul 2021 20:19:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 199F06135A 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]:38168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3OsZ-0001yQ-Tv for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 16:19:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Op3-0001cT-SS for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:07 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36260) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Oov-0004ze-IW for qemu-devel@nongnu.org; Tue, 13 Jul 2021 16:16:04 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16DKCJuh017636 for ; Tue, 13 Jul 2021 16:15:56 -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=gTvedVsA3WHxqH5f3ghdkIpWNf85JlwKEWb6jdmsasw=; b=aQrB2ulm8y8VGXAaUBHzpV0oYoTQBmaPaKCiIpp59fadAsVKH5IzMcCpB1a8L2p7Y4OY pQtPRBNzYkL6dfqmPnZnl3C4YjYzqQXJrxvSx3VCzNz4SE//ibb4Hf8IWpaGSzA3RRFD 09L7y17j/Id0MHerQ4MeBWaJTMv6CERHlbOnw2lWokYTgaXhIGIk30A6lSKgaw+bJ/qv Ie+VZxU00ep8BiWXZewWJpo9g4z+/stHDzPwPxBLAjlMqtlHrB+yIRGIKtkDbPivFeoK cgZ4Kez/kwTJSPI6X0Qw0K/deoca0LWG3AeuIHNqqkjC60Wl81URqujojkS+IhyRdk9N 5w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39qrmd55rs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Jul 2021 16:15:56 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16DKCgVr019557 for ; Tue, 13 Jul 2021 16:15:55 -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 39qrmd55r8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 16:15:55 -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 16DKCSDu005528; Tue, 13 Jul 2021 20:15:55 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma04dal.us.ibm.com with ESMTP id 39q36c4ery-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jul 2021 20:15:55 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16DKFrNr16581094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Jul 2021 20:15:53 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A424F7805E; Tue, 13 Jul 2021 20:15:53 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2623B7806B; Tue, 13 Jul 2021 20:15:53 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Jul 2021 20:15:53 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org, marcandre.lureau@redhat.com Subject: [PATCH v5 10/10] tests: acpi: tpm1.2: Add expected TPM 1.2 ACPI blobs Date: Tue, 13 Jul 2021 16:15:45 -0400 Message-Id: <20210713201545.903754-11-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> References: <20210713201545.903754-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 9sSDhfv9lYX0cSHCxrfz8gs61DmGCbzP X-Proofpoint-GUID: c9ZKZDNKjQfriccm8IQbMMx5WmI4bdOr X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-13_12:2021-07-13, 2021-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 suspectscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107130124 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_H4=0.001, RCVD_IN_MSPIKE_WL=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 zcmb7KOKcm*8J^)oS}vE;lA`5jBGz#qX#hG&#UJ}#4u706M*H;Z)?=4gXRlPOc6l-q;xYM!E5gXd@E#^KX&h2-U{Ek6Uwf7YIO^xCbPQd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2p~^@7`xVJvXtg8iQQ9 zt}50n3y>?Hb=0msRH^l8>dI9TYL19SYLboQModiY~}NE zWfC&J+sZ#91B^IlaKzSfi4DZgirQJFozDKonX~lW)Akz&>wFGY2`RC$B&v_oUfcIq zumZbz_rCpN=jIs^`hI=g!p6_}ep75VX|Iu6!#39;&MI?W1cz3@DdLTd3m2^HO53lj zC;EvG?(ASr2{jRPnZ4pL|L*-AHbO6Rv{tNv*rM8%OpL}8d#jl^o$ze=Shv(_IQ?o? zE_46xe}8}WkN-T zswLRM;Tu~v=Jf_V3{d`N$Vdv7jeiJmw0{JP;vu!)qDnYJRgIPYBfYEWNHwo=M*9td ztm51gX0>mD9~;;afUnu{kj6#;B-oz>&kT^S90z*#&>HboE6TMa1a_%7t!k@-JjqYPs14H(f$GkQSk#h HnFIEJ4sbMLU|?V}a`Jcf2v%^42yj*a0!E-1hz+7a07U<12eAOxRtEt9 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",