From patchwork Tue Jan 12 18:50:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 8020201 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E3A1D9F1CC for ; Tue, 12 Jan 2016 18:57:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89A7F2041A for ; Tue, 12 Jan 2016 18:57:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0354020412 for ; Tue, 12 Jan 2016 18:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763441AbcALS5Q (ORCPT ); Tue, 12 Jan 2016 13:57:16 -0500 Received: from mga14.intel.com ([192.55.52.115]:19771 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbcALS5O (ORCPT ); Tue, 12 Jan 2016 13:57:14 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 12 Jan 2016 10:57:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,558,1449561600"; d="scan'208";a="891764339" Received: from xiaoreal1.sh.intel.com (HELO xiaoreal1.sh.intel.com.sh.intel.com) ([10.239.48.79]) by fmsmga002.fm.intel.com with ESMTP; 12 Jan 2016 10:57:11 -0800 From: Xiao Guangrong To: pbonzini@redhat.com, imammedo@redhat.com Cc: gleb@kernel.org, mtosatti@redhat.com, stefanha@redhat.com, mst@redhat.com, rth@twiddle.net, ehabkost@redhat.com, dan.j.williams@intel.com, kvm@vger.kernel.org, qemu-devel@nongnu.org, Xiao Guangrong Subject: [PATCH v2 02/11] tests: acpi: test NVDIMM tables Date: Wed, 13 Jan 2016 02:50:01 +0800 Message-Id: <1452624610-46945-3-git-send-email-guangrong.xiao@linux.intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1452624610-46945-1-git-send-email-guangrong.xiao@linux.intel.com> References: <1452624610-46945-1-git-send-email-guangrong.xiao@linux.intel.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add nvdimm test, two tables are created which are NFIT and SSDT Max memory size and multiple slots are needed to enable NVDIMM which cause the primal SSDT table is also updated Signed-off-by: Xiao Guangrong --- tests/acpi-test-data/pc/NFIT | Bin 0 -> 224 bytes tests/acpi-test-data/pc/NFIT.bridge | Bin 0 -> 224 bytes tests/acpi-test-data/pc/SSDT | Bin 2486 -> 2885 bytes tests/acpi-test-data/pc/SSDT-NVDIMM | Bin 0 -> 134 bytes tests/acpi-test-data/pc/SSDT-NVDIMM.bridge | Bin 0 -> 134 bytes tests/acpi-test-data/pc/SSDT.bridge | Bin 4345 -> 4745 bytes tests/acpi-test-data/q35/NFIT | Bin 0 -> 224 bytes tests/acpi-test-data/q35/NFIT.bridge | Bin 0 -> 224 bytes tests/acpi-test-data/q35/SSDT | Bin 691 -> 1090 bytes tests/acpi-test-data/q35/SSDT-NVDIMM | Bin 0 -> 134 bytes tests/acpi-test-data/q35/SSDT-NVDIMM.bridge | Bin 0 -> 134 bytes tests/acpi-test-data/q35/SSDT.bridge | Bin 708 -> 1107 bytes tests/bios-tables-test.c | 15 ++++++++++----- 13 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 tests/acpi-test-data/pc/NFIT create mode 100644 tests/acpi-test-data/pc/NFIT.bridge create mode 100644 tests/acpi-test-data/pc/SSDT-NVDIMM create mode 100644 tests/acpi-test-data/pc/SSDT-NVDIMM.bridge create mode 100644 tests/acpi-test-data/q35/NFIT create mode 100644 tests/acpi-test-data/q35/NFIT.bridge create mode 100644 tests/acpi-test-data/q35/SSDT-NVDIMM create mode 100644 tests/acpi-test-data/q35/SSDT-NVDIMM.bridge diff --git a/tests/acpi-test-data/pc/NFIT b/tests/acpi-test-data/pc/NFIT new file mode 100644 index 0000000000000000000000000000000000000000..2d2a190bd0a603dac228177428f4884e23393a7c GIT binary patch literal 224 zcmeZs^9*^wz`($m?Bwt45v<@85#a0x6k`O6f!H7#0xTGq7?@!khRVwy(mrn~aaiNb zYb>$7=Qc$7=Qc_4hm*i5~I(8tlt+X z2vQD|4i0g|lnx3Gfl3EN_+m-}1;Nsa@&3W}A>JQ7?_k>f>Vd_&wMBAFI&P0nCw1I0lmh{*_I8fI?Z!Ss&}0M+w@ Ae*gdg delta 67 zcmX>qwoRBTIM^j*8z%z;HZMy8JSrk^6{=-28$7=Qc$7=Qc3~-0_B_I=&v$c_g@=BFBr!_=dPiL^3Vlnw-JV28x4B5R(zaG|Zfw!{iPClKFy& delta 66 zcmX@av6+=CIM^j*GZO;?W9>#RenuuQ$;r};d&PY@V)U8ggPr07oIMSEJpx=fd|mv4 W7$$#UEMpg8^9^x}WSab&*&P5k77>a7 diff --git a/tests/acpi-test-data/q35/SSDT-NVDIMM b/tests/acpi-test-data/q35/SSDT-NVDIMM new file mode 100644 index 0000000000000000000000000000000000000000..22265278c3a4df9e9fee0ea9e04b37f2c80baa29 GIT binary patch literal 134 zcmWFzb_r=?U|?XpWu@nmVny%K&LG5XB$!A|i3&YlLo9sw>KzAk=2 zTuhVSGnUmyH+gaU1{fG{#D{vi@ETMY7%*_edw9C=I9}js5Rr>_4hm*i5~I(8tlt+X z2vQD|4i0g|lnx3Gfl3EN_+m-}1;Nsa@&3W}A>JQ7?_k>f>Vd_&wMBAFI&P0nCw1I0lmh{*_I8fH$;VTu3%NXmk4 delta 66 zcmcc2afFpCIM^lR2onPXqwGd5enuv5smaoed&PY@V)U8ggPr07oIMSEJpx=fd|mv4 W7$$#UEMpg8^9^x}WSab&IRXGMZ4qz) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index fc01cce..87cf2e5 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -157,6 +157,10 @@ static const char *iasl = stringify(CONFIG_IASL); static const char *iasl; #endif +#define NVDIMM_PARAMS " -m 128M,maxmem=5G,slots=2 " \ + "-object memory-backend-ram,id=mem1,size=128M " \ + "-device nvdimm,memdev=mem1" + static void free_test_data(test_data *data) { AcpiSdtTable *temp; @@ -823,7 +827,7 @@ static void test_acpi_piix4_tcg(void) */ memset(&data, 0, sizeof(data)); data.machine = MACHINE_PC; - test_acpi_one("-machine accel=tcg", &data); + test_acpi_one("-machine accel=tcg,nvdimm" NVDIMM_PARAMS, &data); free_test_data(&data); } @@ -834,7 +838,8 @@ static void test_acpi_piix4_tcg_bridge(void) memset(&data, 0, sizeof(data)); data.machine = MACHINE_PC; data.variant = ".bridge"; - test_acpi_one("-machine accel=tcg -device pci-bridge,chassis_nr=1", &data); + test_acpi_one("-machine accel=tcg,nvdimm -device pci-bridge,chassis_nr=1" + NVDIMM_PARAMS, &data); free_test_data(&data); } @@ -844,7 +849,7 @@ static void test_acpi_q35_tcg(void) memset(&data, 0, sizeof(data)); data.machine = MACHINE_Q35; - test_acpi_one("-machine q35,accel=tcg", &data); + test_acpi_one("-machine q35,accel=tcg,nvdimm" NVDIMM_PARAMS, &data); free_test_data(&data); } @@ -855,8 +860,8 @@ static void test_acpi_q35_tcg_bridge(void) memset(&data, 0, sizeof(data)); data.machine = MACHINE_Q35; data.variant = ".bridge"; - test_acpi_one("-machine q35,accel=tcg -device pci-bridge,chassis_nr=1", - &data); + test_acpi_one("-machine q35,accel=tcg,nvdimm " + "-device pci-bridge,chassis_nr=1" NVDIMM_PARAMS, &data); free_test_data(&data); }