From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK71o-0002C8-Jl for qemu-devel@nongnu.org; Mon, 04 Jul 2016 12:47:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK71m-0002Us-IN for qemu-devel@nongnu.org; Mon, 04 Jul 2016 12:47:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK71m-0002Ug-AJ for qemu-devel@nongnu.org; Mon, 04 Jul 2016 12:47:22 -0400 Date: Mon, 4 Jul 2016 19:47:18 +0300 From: "Michael S. Tsirkin" Message-ID: <20160704194718-mutt-send-email-mst@redhat.com> References: <1467650742-17580-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467650742-17580-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 19/36] tests/acpi: add pxb/pxb-pcie tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Marcel Apfelbaum , Igor Mammedov , Laszlo Ersek , Eric Blake From: Marcel Apfelbaum Add an ivshmem device with 4G shared memory to pxb in order to check the ACPI code of 64bit MMIO allocation. Suggested-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Laszlo Ersek --- tests/bios-tables-test.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index de4019e..b1026d7 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -864,6 +864,41 @@ static void test_acpi_piix4_tcg_ipmi(void) free_test_data(&data); } +static void test_acpi_piix4_tcg_pxb(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".pxb"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + test_acpi_one("-machine accel=tcg" + " -device pxb,id=pxb,bus_nr=0x80,bus=pci.0" + " -object memory-backend-file,size=4G,mem-path=/tmp/shmem,share,id=mb" + " -device ivshmem-plain,memdev=mb,bus=pxb", + &data); + free_test_data(&data); +} + +static void test_acpi_q35_tcg_pxb_pcie(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_Q35; + data.variant = ".pxb_pcie"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(ipmi_required_struct_types); + test_acpi_one("-machine q35,accel=tcg" + " -device pxb-pcie,id=pxb,bus_nr=0x80,bus=pcie.0" + " -device ioh3420,id=rp,bus=pxb,slot=1" + " -object memory-backend-file,size=4G,mem-path=/tmp/shmem,share,id=mb" + " -device ivshmem-plain,memdev=mb,bus=rp", + &data); + free_test_data(&data); +} + int main(int argc, char *argv[]) { const char *arch = qtest_get_arch(); @@ -884,6 +919,8 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/tcg/ipmi", test_acpi_q35_tcg_ipmi); qtest_add_func("acpi/piix4/tcg/cpuhp", test_acpi_piix4_tcg_cphp); qtest_add_func("acpi/q35/tcg/cpuhp", test_acpi_q35_tcg_cphp); + qtest_add_func("acpi/piix4/tcg/pxb", test_acpi_piix4_tcg_pxb); + qtest_add_func("acpi/q35/tcg/pxb-pcie", test_acpi_q35_tcg_pxb_pcie); } ret = g_test_run(); boot_sector_cleanup(disk); -- MST