From patchwork Tue Jan 15 15:40:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025280 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFNF2P7jz9sBZ for ; Wed, 16 Jan 2019 02:57:33 +1100 (AEDT) Received: from localhost ([127.0.0.1]:58756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR5n-0004TO-3l for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 10:57:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR1i-0001Qm-F1 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR1e-0006Gn-HH for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47040) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR1d-0006Ga-Vr for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:14 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34FE081E05; Tue, 15 Jan 2019 15:53:13 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 803225D776; Tue, 15 Jan 2019 15:53:11 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:40:53 +0100 Message-Id: <1547566866-129386-2-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 15 Jan 2019 15:53:13 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 01/14] tests: acpi: add uefi_find_rsdp_addr() helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" introduce UEFI specific counterpart to acpi_find_rsdp_address() that will help to find RSDP address when [OA]VMF is used as firmware. It requires a [OA]VMF built with PcdAcpiTestSupport=TRUE, to locate RSDP address within 1Mb aligned ACPI test structure, tagged with GUID AB87A6B1-2034-BDA0-71BD-375007757785 Signed-off-by: Igor Mammedov Reviewed-by: Laszlo Ersek --- tests/acpi-utils.h | 1 + tests/acpi-utils.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/tests/acpi-utils.h b/tests/acpi-utils.h index ef388bb..3b11f47 100644 --- a/tests/acpi-utils.h +++ b/tests/acpi-utils.h @@ -46,6 +46,7 @@ typedef struct { uint8_t acpi_calc_checksum(const uint8_t *data, int len); uint32_t acpi_find_rsdp_address(QTestState *qts); +uint64_t uefi_find_rsdp_addr(QTestState *qts, uint64_t start, uint64_t size); uint64_t acpi_get_xsdt_address(uint8_t *rsdp_table); void acpi_parse_rsdp_table(QTestState *qts, uint32_t addr, uint8_t *rsdp_table); void acpi_fetch_table(QTestState *qts, uint8_t **aml, uint32_t *aml_len, diff --git a/tests/acpi-utils.c b/tests/acpi-utils.c index cc33b46..b9ff9df 100644 --- a/tests/acpi-utils.c +++ b/tests/acpi-utils.c @@ -111,3 +111,46 @@ void acpi_fetch_table(QTestState *qts, uint8_t **aml, uint32_t *aml_len, g_assert(!acpi_calc_checksum(*aml, *aml_len)); } } + +#define GUID_SIZE 16 +static uint8_t AcpiTestSupportGuid[GUID_SIZE] = + { 0xb1, 0xa6, 0x87, 0xab, + 0x34, 0x20, + 0xa0, 0xbd, + 0x71, 0xbd, 0x37, 0x50, 0x07, 0x75, 0x77, 0x85 }; + +typedef struct { + uint8_t signature_guid[16]; + uint64_t rsdp10; + uint64_t rsdp20; +} __attribute__((packed)) UefiTestSupport; + +/* Wait at most 600 seconds (test is slow with TCI and --enable-debug) */ +#define TEST_DELAY (1 * G_USEC_PER_SEC / 10) +#define TEST_CYCLES MAX((600 * G_USEC_PER_SEC / TEST_DELAY), 1) +#define MB 0x100000ULL +uint64_t uefi_find_rsdp_addr(QTestState *qts, uint64_t start, uint64_t size) +{ + int i, j; + uint8_t data[GUID_SIZE]; + + for (i = 0; i < TEST_CYCLES; ++i) { + for (j = 0; j < size / MB; j++) { + /* look for GUID at every 1Mb block */ + uint64_t addr = start + j * MB; + + qtest_memread(qts, addr, data, sizeof(data)); + if (!memcmp(AcpiTestSupportGuid, data, sizeof(data))) { + UefiTestSupport ret; + + qtest_memread(qts, addr, &ret, sizeof(ret)); + ret.rsdp10 = le64_to_cpu(ret.rsdp10); + ret.rsdp20 = le64_to_cpu(ret.rsdp20); + return ret.rsdp20 ? ret.rsdp20 : ret.rsdp10; + } + } + g_usleep(TEST_DELAY); + } + g_assert_not_reached(); + return 0; +} From patchwork Tue Jan 15 15:40:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025272 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFJQ6lMVz9sBZ for ; Wed, 16 Jan 2019 02:54:14 +1100 (AEDT) Received: from localhost ([127.0.0.1]:57867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR2a-0001YE-UQ for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 10:54:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR1t-0001WX-G9 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR1n-0006Ik-35 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58666) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR1h-0006H7-DI for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:21 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B41F8046C; Tue, 15 Jan 2019 15:53:15 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 793285D776; Tue, 15 Jan 2019 15:53:13 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:40:54 +0100 Message-Id: <1547566866-129386-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 15 Jan 2019 15:53:15 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 02/14] tests: acpi: make RSDT test routine handle XSDT X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" If RSDP revision is more than 0 fetch table pointed by XSDT and fallback to legacy RSDT table otherwise. While at it drop unused acpi_get_xsdt_address(). Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- PS: it doesn't affect existing pc/q35 machines as they use RSDP.revision == 0 but it will be used by followup patch to enable testing arm/virt board which uses provides XSDT table. --- tests/acpi-utils.h | 3 +-- tests/acpi-utils.c | 14 +------------- tests/bios-tables-test.c | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/tests/acpi-utils.h b/tests/acpi-utils.h index 3b11f47..398900c 100644 --- a/tests/acpi-utils.h +++ b/tests/acpi-utils.h @@ -47,8 +47,7 @@ typedef struct { uint8_t acpi_calc_checksum(const uint8_t *data, int len); uint32_t acpi_find_rsdp_address(QTestState *qts); uint64_t uefi_find_rsdp_addr(QTestState *qts, uint64_t start, uint64_t size); -uint64_t acpi_get_xsdt_address(uint8_t *rsdp_table); -void acpi_parse_rsdp_table(QTestState *qts, uint32_t addr, uint8_t *rsdp_table); +void acpi_parse_rsdp_table(QTestState *qts, uint64_t addr, uint8_t *rsdp_table); void acpi_fetch_table(QTestState *qts, uint8_t **aml, uint32_t *aml_len, const uint8_t *addr_ptr, const char *sig, bool verify_checksum); diff --git a/tests/acpi-utils.c b/tests/acpi-utils.c index b9ff9df..84068a8 100644 --- a/tests/acpi-utils.c +++ b/tests/acpi-utils.c @@ -51,19 +51,7 @@ uint32_t acpi_find_rsdp_address(QTestState *qts) return off; } -uint64_t acpi_get_xsdt_address(uint8_t *rsdp_table) -{ - uint64_t xsdt_physical_address; - uint8_t revision = rsdp_table[15 /* Revision offset */]; - - /* We must have revision 2 if we're looking for an XSDT pointer */ - g_assert(revision == 2); - - memcpy(&xsdt_physical_address, &rsdp_table[24 /* XsdtAddress offset */], 8); - return le64_to_cpu(xsdt_physical_address); -} - -void acpi_parse_rsdp_table(QTestState *qts, uint32_t addr, uint8_t *rsdp_table) +void acpi_parse_rsdp_table(QTestState *qts, uint64_t addr, uint8_t *rsdp_table) { uint8_t revision; diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 0bf7164..529bfc4 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -107,17 +107,25 @@ static void test_acpi_rsdp_table(test_data *data) } } -static void test_acpi_rsdt_table(test_data *data) +static void test_acpi_rxsdt_table(test_data *data) { + const char *sig = "RSDT"; AcpiSdtTable rsdt = {}; + int entry_size = 4; + int addr_off = 16 /* RsdtAddress */; uint8_t *ent; - /* read RSDT table */ + if (data->rsdp_table[15 /* Revision offset */] != 0) { + addr_off = 24 /* XsdtAddress */; + entry_size = 8; + sig = "XSDT"; + } + /* read [RX]SDT table */ acpi_fetch_table(data->qts, &rsdt.aml, &rsdt.aml_len, - &data->rsdp_table[16 /* RsdtAddress */], "RSDT", true); + &data->rsdp_table[addr_off], sig, true); /* Load all tables and add to test list directly RSDT referenced tables */ - ACPI_FOREACH_RSDT_ENTRY(rsdt.aml, rsdt.aml_len, ent, 4 /* Entry size */) { + ACPI_FOREACH_RSDT_ENTRY(rsdt.aml, rsdt.aml_len, ent, entry_size) { AcpiSdtTable ssdt_table = {}; acpi_fetch_table(data->qts, &ssdt_table.aml, &ssdt_table.aml_len, ent, @@ -519,7 +527,7 @@ static void test_acpi_one(const char *params, test_data *data) data->tables = g_array_new(false, true, sizeof(AcpiSdtTable)); test_acpi_rsdp_address(data); test_acpi_rsdp_table(data); - test_acpi_rsdt_table(data); + test_acpi_rxsdt_table(data); test_acpi_fadt_table(data); if (iasl) { From patchwork Tue Jan 15 15:40:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025278 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFMl37gSz9sDB for ; Wed, 16 Jan 2019 02:57:07 +1100 (AEDT) Received: from localhost ([127.0.0.1]:58654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR5N-000497-9x for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 10:57:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR1v-0001Xy-D9 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR1s-0006Jy-RF for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47092) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR1l-0006HM-4r for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:23 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1E71881F11; Tue, 15 Jan 2019 15:53:17 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E9AE5D776; Tue, 15 Jan 2019 15:53:15 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:40:55 +0100 Message-Id: <1547566866-129386-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 15 Jan 2019 15:53:17 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 03/14] tests: acpi: rename acpi_parse_rsdp_table() into acpi_fetch_rsdp_table() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" so name would reflect what the function does Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- tests/acpi-utils.h | 2 +- tests/acpi-utils.c | 2 +- tests/bios-tables-test.c | 2 +- tests/vmgenid-test.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/acpi-utils.h b/tests/acpi-utils.h index 398900c..59fb7d5 100644 --- a/tests/acpi-utils.h +++ b/tests/acpi-utils.h @@ -47,7 +47,7 @@ typedef struct { uint8_t acpi_calc_checksum(const uint8_t *data, int len); uint32_t acpi_find_rsdp_address(QTestState *qts); uint64_t uefi_find_rsdp_addr(QTestState *qts, uint64_t start, uint64_t size); -void acpi_parse_rsdp_table(QTestState *qts, uint64_t addr, uint8_t *rsdp_table); +void acpi_fetch_rsdp_table(QTestState *qts, uint64_t addr, uint8_t *rsdp_table); void acpi_fetch_table(QTestState *qts, uint8_t **aml, uint32_t *aml_len, const uint8_t *addr_ptr, const char *sig, bool verify_checksum); diff --git a/tests/acpi-utils.c b/tests/acpi-utils.c index 84068a8..dce0fb7 100644 --- a/tests/acpi-utils.c +++ b/tests/acpi-utils.c @@ -51,7 +51,7 @@ uint32_t acpi_find_rsdp_address(QTestState *qts) return off; } -void acpi_parse_rsdp_table(QTestState *qts, uint64_t addr, uint8_t *rsdp_table) +void acpi_fetch_rsdp_table(QTestState *qts, uint64_t addr, uint8_t *rsdp_table) { uint8_t revision; diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 529bfc4..99d7bf8 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -89,7 +89,7 @@ static void test_acpi_rsdp_table(test_data *data) uint8_t *rsdp_table = data->rsdp_table, revision; uint32_t addr = data->rsdp_addr; - acpi_parse_rsdp_table(data->qts, addr, rsdp_table); + acpi_fetch_rsdp_table(data->qts, addr, rsdp_table); revision = rsdp_table[15 /* Revision offset */]; switch (revision) { diff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c index 52cdd83..27153a0 100644 --- a/tests/vmgenid-test.c +++ b/tests/vmgenid-test.c @@ -40,7 +40,7 @@ static uint32_t acpi_find_vgia(QTestState *qts) g_assert_cmphex(rsdp_offset, <, RSDP_ADDR_INVALID); - acpi_parse_rsdp_table(qts, rsdp_offset, rsdp_table); + acpi_fetch_rsdp_table(qts, rsdp_offset, rsdp_table); acpi_fetch_table(qts, &rsdt, &rsdt_len, &rsdp_table[16 /* RsdtAddress */], "RSDT", true); From patchwork Tue Jan 15 15:40:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFJY5wm7z9sD9 for ; Wed, 16 Jan 2019 02:54:21 +1100 (AEDT) Received: from localhost ([127.0.0.1]:57891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR2h-0001ca-4G for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 10:54:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR1x-0001aV-Qn for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR1v-0006Qi-Gb for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53124) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR1t-0006Hz-HZ for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:31 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14CCC1F575; Tue, 15 Jan 2019 15:53:19 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 63A9C5D776; Tue, 15 Jan 2019 15:53:17 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:40:56 +0100 Message-Id: <1547566866-129386-5-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 15 Jan 2019 15:53:19 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 04/14] tests: acpi: make pointer to RSDP 64bit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" In case of UEFI RSDP doesn't have to be located in lowmem, it could be placed at any address. Make sure that test won't break if it is placed above the first 4Gb of address space. PS: While at it cleanup some local variables as we don't really need them. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- tests/bios-tables-test.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 99d7bf8..c28c5c7 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -26,7 +26,7 @@ typedef struct { const char *machine; const char *variant; - uint32_t rsdp_addr; + uint64_t rsdp_addr; uint8_t rsdp_table[36 /* ACPI 2.0+ RSDP size */]; GArray *tables; uint32_t smbios_ep_addr; @@ -86,13 +86,11 @@ static void test_acpi_rsdp_address(test_data *data) static void test_acpi_rsdp_table(test_data *data) { - uint8_t *rsdp_table = data->rsdp_table, revision; - uint32_t addr = data->rsdp_addr; + uint8_t *rsdp_table = data->rsdp_table; - acpi_fetch_rsdp_table(data->qts, addr, rsdp_table); - revision = rsdp_table[15 /* Revision offset */]; + acpi_fetch_rsdp_table(data->qts, data->rsdp_addr, rsdp_table); - switch (revision) { + switch (rsdp_table[15 /* Revision offset */]) { case 0: /* ACPI 1.0 RSDP */ /* With rev 1, checksum is only for the first 20 bytes */ g_assert(!acpi_calc_checksum(rsdp_table, 20)); From patchwork Tue Jan 15 15:40:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025277 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFLg5vr7z9sBZ for ; Wed, 16 Jan 2019 02:56:10 +1100 (AEDT) Received: from localhost ([127.0.0.1]:58402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR4R-0003Kj-1W for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 10:56:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR1x-0001aW-Qm for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR1v-0006QR-E0 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR1q-0006IQ-TB for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:29 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0AB3F12B2D; Tue, 15 Jan 2019 15:53:21 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A96B5D776; Tue, 15 Jan 2019 15:53:19 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:40:57 +0100 Message-Id: <1547566866-129386-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 15 Jan 2019 15:53:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 05/14] tests: acpi: fetch X_DSDT if pointer to DSDT is 0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" that way it would be possible to test a DSDT pointed by 64bit X_DSDT field in FADT. PS: it will allow to enable testing arm/virt board, which sets only newer X_DSDT field. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- tests/bios-tables-test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index c28c5c7..0f04a0a 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -140,6 +140,8 @@ static void test_acpi_fadt_table(test_data *data) AcpiSdtTable table = g_array_index(data->tables, typeof(table), 0); uint8_t *fadt_aml = table.aml; uint32_t fadt_len = table.aml_len; + uint32_t val; + int dsdt_offset = 40 /* DSDT */; g_assert(compare_signature(&table, "FACP")); @@ -148,8 +150,12 @@ static void test_acpi_fadt_table(test_data *data) fadt_aml + 36 /* FIRMWARE_CTRL */, "FACS", false); g_array_append_val(data->tables, table); + memcpy(&val, fadt_aml + dsdt_offset, 4); + if (!val) { + dsdt_offset = 140 /* X_DSDT */; + } acpi_fetch_table(data->qts, &table.aml, &table.aml_len, - fadt_aml + 40 /* DSDT */, "DSDT", true); + fadt_aml + dsdt_offset, "DSDT", true); g_array_append_val(data->tables, table); memset(fadt_aml + 36, 0, 4); /* sanitize FIRMWARE_CTRL ptr */ From patchwork Tue Jan 15 15:40:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025279 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFMs03vpz9sDB for ; Wed, 16 Jan 2019 02:57:13 +1100 (AEDT) Received: from localhost ([127.0.0.1]:58672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR5S-0004Du-SZ for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 10:57:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR23-0001eU-M2 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR21-0006TI-Jk for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40758) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR21-0006Rf-D1 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:37 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9623083F3C; Tue, 15 Jan 2019 15:53:33 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4733D5D777; Tue, 15 Jan 2019 15:53:23 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:40:59 +0100 Message-Id: <1547566866-129386-8-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 15 Jan 2019 15:53:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 07/14] tests: acpi: skip FACS table if board uses hw reduced ACPI profile X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" If FADT has HW_REDUCED_ACPI flag set, do not attempt to fetch FACS as it's not provided by the board. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- tests/bios-tables-test.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 0f04a0a..8887319 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -146,9 +146,13 @@ static void test_acpi_fadt_table(test_data *data) g_assert(compare_signature(&table, "FACP")); /* Since DSDT/FACS isn't in RSDT, add them to ASL test list manually */ - acpi_fetch_table(data->qts, &table.aml, &table.aml_len, - fadt_aml + 36 /* FIRMWARE_CTRL */, "FACS", false); - g_array_append_val(data->tables, table); + memcpy(&val, fadt_aml + 112 /* Flags */, 4); + val = le32_to_cpu(val); + if (!(val & 1UL << 20 /* HW_REDUCED_ACPI */)) { + acpi_fetch_table(data->qts, &table.aml, &table.aml_len, + fadt_aml + 36 /* FIRMWARE_CTRL */, "FACS", false); + g_array_append_val(data->tables, table); + } memcpy(&val, fadt_aml + dsdt_offset, 4); if (!val) { From patchwork Tue Jan 15 15:41:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFR73S4Wz9sBZ for ; Wed, 16 Jan 2019 03:00:03 +1100 (AEDT) Received: from localhost ([127.0.0.1]:59385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR8D-0006mg-Ag for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 11:00:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR25-0001gP-Le for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR22-0006Tp-W3 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58906) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR22-0006ST-LI for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:38 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 88A5DBAEC; Tue, 15 Jan 2019 15:53:35 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4B585D777; Tue, 15 Jan 2019 15:53:33 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:41:00 +0100 Message-Id: <1547566866-129386-9-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 15 Jan 2019 15:53:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 08/14] tests: acpi: introduce an abilty start tests with UEFI firmware X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" For testcase to use UEFI firmware, one needs to provide and specify firmware and varstore blobs names in test_data { uefi_fl1, uefi_fl2) } fields respectively. Signed-off-by: Igor Mammedov --- tests/bios-tables-test.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 8887319..d290dd2 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -26,6 +26,8 @@ typedef struct { const char *machine; const char *variant; + const char *uefi_fl1; + const char *uefi_fl2; uint64_t rsdp_addr; uint8_t rsdp_table[36 /* ACPI 2.0+ RSDP size */]; GArray *tables; @@ -519,21 +521,35 @@ static void test_smbios_structs(test_data *data) static void test_acpi_one(const char *params, test_data *data) { char *args; - - /* Disable kernel irqchip to be able to override apic irq0. */ - args = g_strdup_printf("-machine %s,accel=%s,kernel-irqchip=off " - "-net none -display none %s " - "-drive id=hd0,if=none,file=%s,format=raw " - "-device ide-hd,drive=hd0 ", - data->machine, "kvm:tcg", - params ? params : "", disk); + bool use_uefi = data->uefi_fl1 && data->uefi_fl2; + + if (use_uefi) { + args = g_strdup_printf("-machine %s,accel=%s -nodefaults -nographic " + "-drive if=pflash,format=raw,file=%s/%s,readonly " + "-drive if=pflash,format=raw,file=%s/%s,snapshot=on %s", + data->machine, "kvm:tcg", data_dir, data->uefi_fl1, data_dir, + data->uefi_fl2, params ? params : ""); + + } else { + /* Disable kernel irqchip to be able to override apic irq0. */ + args = g_strdup_printf("-machine %s,accel=%s,kernel-irqchip=off " + "-net none -display none %s " + "-drive id=hd0,if=none,file=%s,format=raw " + "-device ide-hd,drive=hd0 ", + data->machine, "kvm:tcg", params ? params : "", disk); + } data->qts = qtest_init(args); - boot_sector_test(data->qts); + if (use_uefi) { + data->rsdp_addr = uefi_find_rsdp_addr(data->qts, + 0x40000000ULL, 128ULL * 1024 * 1024); + } else { + boot_sector_test(data->qts); + test_acpi_rsdp_address(data); + } data->tables = g_array_new(false, true, sizeof(AcpiSdtTable)); - test_acpi_rsdp_address(data); test_acpi_rsdp_table(data); test_acpi_rxsdt_table(data); test_acpi_fadt_table(data); From patchwork Tue Jan 15 15:41:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFRV6gl3z9sBZ for ; Wed, 16 Jan 2019 03:00:22 +1100 (AEDT) Received: from localhost ([127.0.0.1]:59482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR8W-00072U-T3 for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 11:00:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR26-0001hN-Kv for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR25-0006WA-Mg for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58940) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR24-0006TO-0C for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:41 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87BE688311; Tue, 15 Jan 2019 15:53:37 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBECB5D777; Tue, 15 Jan 2019 15:53:35 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:41:01 +0100 Message-Id: <1547566866-129386-10-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 15 Jan 2019 15:53:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 09/14] tests: acpi: move boot_sector_init() into x86 tests branch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" boot_sector_init() won't be used by arm/virt board, so move it from global scope to x86 branch that uses it. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- tests/bios-tables-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index d290dd2..d9efe59 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -799,13 +799,13 @@ int main(int argc, char *argv[]) const char *arch = qtest_get_arch(); int ret; - ret = boot_sector_init(disk); - if(ret) - return ret; - g_test_init(&argc, &argv, NULL); if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + ret = boot_sector_init(disk); + if(ret) + return ret; + qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); qtest_add_func("acpi/q35", test_acpi_q35_tcg); From patchwork Tue Jan 15 15:41:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFVm3TfVz9sBQ for ; Wed, 16 Jan 2019 03:03:12 +1100 (AEDT) Received: from localhost ([127.0.0.1]:60146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjRBG-0000n9-2H for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 11:03:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR27-0001ia-P1 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR26-0006XH-SU for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48112) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR26-0006Ub-MQ for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:53:42 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 76C3C4E916; Tue, 15 Jan 2019 15:53:39 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5EAE5D777; Tue, 15 Jan 2019 15:53:37 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:41:02 +0100 Message-Id: <1547566866-129386-11-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 15 Jan 2019 15:53:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 10/14] tests: acpi: ignore SMBIOS tests when UEFI firmware is used X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" once FW provides a pointer to SMBIOS entry point like it does for RSDP it should be possible to enable this one the same way. Signed-off-by: Igor Mammedov --- tests/bios-tables-test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index d9efe59..a64d0c2 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -562,8 +562,11 @@ static void test_acpi_one(const char *params, test_data *data) } } - test_smbios_entry_point(data); - test_smbios_structs(data); + /* TODO: make SMBIOS tests work with UEFI firmware */ + if (!use_uefi) { + test_smbios_entry_point(data); + test_smbios_structs(data); + } assert(!global_qtest); qtest_quit(data->qts); From patchwork Tue Jan 15 15:41:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025286 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFVw1KvQz9sBQ for ; Wed, 16 Jan 2019 03:03:20 +1100 (AEDT) Received: from localhost ([127.0.0.1]:60183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjRBO-0000un-4N for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 11:03:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR2P-00023c-7P for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR2O-0006aw-AT for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47620) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR2O-0006an-0g for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:00 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A96B7F6A0; Tue, 15 Jan 2019 15:53:59 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id F03B85D777; Tue, 15 Jan 2019 15:53:44 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:41:04 +0100 Message-Id: <1547566866-129386-13-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 15 Jan 2019 15:53:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 12/14] tests: acpi: prepare AVMF firmware blobs to be used by bios-tables-test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Copy blobs in ACPI test data directory and pad them up to 64Mb so that QEMU run by test could use them. Signed-off-by: Igor Mammedov --- tests/Makefile.include | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index aa68eb5..e1201d9 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -295,6 +295,7 @@ check-qtest-aarch64-y = tests/numa-test$(EXESUF) check-qtest-aarch64-$(CONFIG_SDHCI) += tests/sdhci-test$(EXESUF) check-qtest-aarch64-y += tests/boot-serial-test$(EXESUF) check-qtest-aarch64-y += tests/migration-test$(EXESUF) +qtest-uefi-images-aarch64 = avmf.img avmf_vars.img check-qtest-microblazeel-y += $(check-qtest-microblaze-y) @@ -710,7 +711,8 @@ tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o tests/boot-order-test$(EXESUF): tests/boot-order-test.o $(libqos-obj-y) tests/boot-serial-test$(EXESUF): tests/boot-serial-test.o $(libqos-obj-y) tests/bios-tables-test$(EXESUF): tests/bios-tables-test.o \ - tests/boot-sector.o tests/acpi-utils.o $(libqos-obj-y) + tests/boot-sector.o tests/acpi-utils.o $(libqos-obj-y) \ + | prep-uefi-images tests/pxe-test$(EXESUF): tests/pxe-test.o tests/boot-sector.o $(libqos-obj-y) tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y) tests/pca9552-test$(EXESUF): tests/pca9552-test.o $(libqos-omap-obj-y) @@ -936,6 +938,18 @@ $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json @diff -u $(SRC_PATH)/$*.out $*.test.out @diff -u $(SRC_PATH)/$*.exit $*.test.exit +qtest-uefi-images = $(foreach target,$(QTEST_TARGETS), $(strip $(qtest-uefi-images-$(target)))) +# Suppress implicit pc-bios/foo rules +$(patsubst %,pc-bios/%,$(qtest-uefi-images)): ; + +# create rules for expanding UEFI images for configured targets +$(foreach uefi-img, $(qtest-uefi-images), \ + $(eval tests/data/acpi/$(uefi-img): pc-bios/$(uefi-img) ; \ + $(call quiet-command, cat $$< /dev/zero | head -c 67108864 > $$@))) + +.PHONY: prep-uefi-images +prep-uefi-images: $(patsubst %, tests/data/acpi/%, $(qtest-uefi-images)) + .PHONY: check-tests/qapi-schema/doc-good.texi check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi @diff -u $(SRC_PATH)/tests/qapi-schema/doc-good.texi $< @@ -999,6 +1013,7 @@ check-clean: rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y)) rm -f tests/test-qapi-gen-timestamp rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR) + rm -f $(patsubst %,tests/data/acpi/%, $(qtest-uefi-images)) clean: check-clean @@ -1009,4 +1024,5 @@ all: $(QEMU_IOTESTS_HELPERS-y) -include $(wildcard tests/*.d) -include $(wildcard tests/libqos/*.d) + endif From patchwork Tue Jan 15 15:41:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025287 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFZf2KlRz9sD9 for ; Wed, 16 Jan 2019 03:06:34 +1100 (AEDT) Received: from localhost ([127.0.0.1]:60890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjREW-0003Qv-9c for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 11:06:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR2S-00024v-LK for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR2R-0006dQ-Na for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59132) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR2R-0006dD-I9 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:03 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9184A5F722; Tue, 15 Jan 2019 15:54:02 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 79ECE5D777; Tue, 15 Jan 2019 15:53:59 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:41:05 +0100 Message-Id: <1547566866-129386-14-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 15 Jan 2019 15:54:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 13/14] tests: acpi: add simple arm/virt testcase X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" adds simple arm/virt test case that starts guest with default values (modulo cortex-a57) Signed-off-by: Igor Mammedov --- tests/Makefile.include | 1 + tests/bios-tables-test.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index e1201d9..a62de4c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -296,6 +296,7 @@ check-qtest-aarch64-$(CONFIG_SDHCI) += tests/sdhci-test$(EXESUF) check-qtest-aarch64-y += tests/boot-serial-test$(EXESUF) check-qtest-aarch64-y += tests/migration-test$(EXESUF) qtest-uefi-images-aarch64 = avmf.img avmf_vars.img +check-qtest-aarch64-y += tests/bios-tables-test$(EXESUF) check-qtest-microblazeel-y += $(check-qtest-microblaze-y) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index a64d0c2..197ae26 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -797,6 +797,20 @@ static void test_acpi_piix4_tcg_dimm_pxm(void) test_acpi_tcg_dimm_pxm(MACHINE_PC); } +static void test_acpi_virt_tcg(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = "virt"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + data.uefi_fl1 = "avmf.img"; + data.uefi_fl2 = "avmf_vars.img"; + test_acpi_one("-cpu cortex-a57 ", &data); + free_test_data(&data); +} + int main(int argc, char *argv[]) { const char *arch = qtest_get_arch(); @@ -824,6 +838,8 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem); qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm); qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); + } else if (strcmp(arch, "aarch64") == 0) { + qtest_add_func("acpi/virt", test_acpi_virt_tcg); } ret = g_test_run(); boot_sector_cleanup(disk); From patchwork Tue Jan 15 15:41:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1025282 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fFQ964R8z9sBZ for ; Wed, 16 Jan 2019 02:59:13 +1100 (AEDT) Received: from localhost ([127.0.0.1]:59199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR7P-0005sd-Kv for incoming@patchwork.ozlabs.org; Tue, 15 Jan 2019 10:59:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjR2W-000290-MT for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjR2V-0006f9-Og for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53724) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjR2V-0006eF-IS for qemu-devel@nongnu.org; Tue, 15 Jan 2019 10:54:07 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFF3B369CA; Tue, 15 Jan 2019 15:54:05 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id C89FB5D778; Tue, 15 Jan 2019 15:54:02 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 16:41:06 +0100 Message-Id: <1547566866-129386-15-git-send-email-imammedo@redhat.com> In-Reply-To: <1547566866-129386-1-git-send-email-imammedo@redhat.com> References: <1547566866-129386-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 15 Jan 2019 15:54:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 14/14] tests: acpi: refactor rebuild-expected-aml.sh to dump ACPI tables for a specified list of targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Samuel Ortiz , "Michael S. Tsirkin" , Laszlo Ersek , Shannon Zhao , Gonglei , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Make initial list contain aarch64 and x86_64 targets. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- tests/data/acpi/rebuild-expected-aml.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh index bf9ba24..6287aa6 100755 --- a/tests/data/acpi/rebuild-expected-aml.sh +++ b/tests/data/acpi/rebuild-expected-aml.sh @@ -7,21 +7,12 @@ # # Authors: # Marcel Apfelbaum +# Igor Mammedov # # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level directory. -qemu= - -if [ -e x86_64-softmmu/qemu-system-x86_64 ]; then - qemu="x86_64-softmmu/qemu-system-x86_64" -elif [ -e i386-softmmu/qemu-system-i386 ]; then - qemu="i386-softmmu/qemu-system-i386" -else - echo "Run 'make' to build the qemu exectutable!" - echo "Run this script from the build directory." - exit 1; -fi +qemu_bins="aarch64-softmmu/qemu-system-aarch64 x86_64-softmmu/qemu-system-x86_64" if [ ! -e "tests/bios-tables-test" ]; then echo "Test: bios-tables-test is required! Run make check before this script." @@ -29,6 +20,14 @@ if [ ! -e "tests/bios-tables-test" ]; then exit 1; fi -TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/bios-tables-test +for qemu in $qemu_bins; do + if [ ! -e $qemu ]; then + echo "Run 'make' to build following the qemu exectutables: $qemu_bins" + echo "Run this script from the build directory." + exit 1; + fi + TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/bios-tables-test +done + echo "The files were rebuilt and can be added to git."