From patchwork Thu Aug 4 21:06:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9264347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2853C6048F for ; Thu, 4 Aug 2016 21:16:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17E2428210 for ; Thu, 4 Aug 2016 21:16:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C6CD28407; Thu, 4 Aug 2016 21:16:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A532A28210 for ; Thu, 4 Aug 2016 21:16:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVPxL-0001Cn-6V; Thu, 04 Aug 2016 21:13:31 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVPxJ-0001At-Ix for xen-devel@lists.xen.org; Thu, 04 Aug 2016 21:13:29 +0000 Received: from [193.109.254.147] by server-11.bemta-14.messagelabs.com id EB/31-09831-8FFA3A75; Thu, 04 Aug 2016 21:13:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsUyZ7p8oO6P9Yv DDX6vFLFY8nExiwOjx9Hdv5kCGKNYM/OS8isSWDNufpQsWCVQ8fPrYtYGxku8XYxcHEIC7UwS VyfsYYJwvjJKPHm7lrGLkRPI2cAoMWmxNESih1Fi6r9+sASbgJHE2aPTwWwRAWmJa58vM4IUM QvcYpTY/vsOM0hCWMBeomvxNvYuRg4OFgFVib0L00HCvALeEsc3XWUBsSUEFCSmPHwPVs4JFL /1eRUzxGIviYkt09khaowl+mb1sUxg5FvAyLCKUb04tagstUjXTC+pKDM9oyQ3MTNH19DQRC8 3tbg4MT01JzGpWC85P3cTIzBMGIBgB+PfCc6HGCU5mJREeV9VLw4X4kvKT6nMSCzOiC8qzUkt PsQow8GhJMG7bB1QTrAoNT21Ii0zBxiwMGkJDh4lEd6HIGne4oLE3OLMdIjUKUZFKXHeqyAJA ZBERmkeXBssSi4xykoJ8zICHSLEU5BalJtZgir/ilGcg1FJmPcjyBSezLwSuOmvgBYzAS0+Yb AAZHFJIkJKqoFxrebuGPMTq3ZoHw47XWmrcpWr9tiJ31NcpI18+PmqNrfqrJj073/FxftrK9R MD7eHXC/6cuXRUdmDHGrzqn4FBZxcL8A+L3LtDRn/RGGJCd4l1z4f+Guw6pvDkezdxxceEeic lvJ1f4yDAj/H7RadqfPNPhVdjPVZmhp12qHV4uvBGEcfFxZ+JZbijERDLeai4kQACLnkio0CA AA= X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1470345206!57588340!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 38460 invoked from network); 4 Aug 2016 21:13:28 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-3.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 Aug 2016 21:13:27 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u74LDAiV001760 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Aug 2016 21:13:10 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u74LDArK001816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Aug 2016 21:13:10 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u74LD9dY022147; Thu, 4 Aug 2016 21:13:09 GMT Received: from ovs104.us.oracle.com (/10.149.76.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Aug 2016 14:13:09 -0700 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Thu, 4 Aug 2016 17:06:37 -0400 Message-Id: <1470344811-14225-10-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1470344811-14225-1-git-send-email-boris.ostrovsky@oracle.com> References: <1470344811-14225-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Cc: wei.liu2@citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, julien.grall@arm.com, jbeulich@suse.com, zhaoshenglong@huawei.com, boris.ostrovsky@oracle.com, roger.pau@citrix.com Subject: [Xen-devel] [PATCH v2 09/23] acpi/hvmloader: Build WAET optionally X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Boris Ostrovsky Reviewed-by: Jan Beulich --- v2: * Note: didn't break "if ( !waet ) return -1" line since that's the style of the file. tools/firmware/hvmloader/acpi/build.c | 9 ++++++--- tools/firmware/hvmloader/acpi/libacpi.h | 1 + tools/firmware/hvmloader/util.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/firmware/hvmloader/acpi/build.c b/tools/firmware/hvmloader/acpi/build.c index 6ec8739..e362ccd 100644 --- a/tools/firmware/hvmloader/acpi/build.c +++ b/tools/firmware/hvmloader/acpi/build.c @@ -358,9 +358,12 @@ static int construct_secondary_tables(unsigned long *table_ptrs, } /* WAET. */ - waet = construct_waet(); - if (!waet) return -1; - table_ptrs[nr_tables++] = (unsigned long)waet; + if ( config->table_flags & ACPI_HAS_WAET ) + { + waet = construct_waet(); + if ( !waet ) return -1; + table_ptrs[nr_tables++] = (unsigned long)waet; + } if ( config->table_flags & ACPI_HAS_SSDT_PM ) { diff --git a/tools/firmware/hvmloader/acpi/libacpi.h b/tools/firmware/hvmloader/acpi/libacpi.h index e15abf7..a251d7c 100644 --- a/tools/firmware/hvmloader/acpi/libacpi.h +++ b/tools/firmware/hvmloader/acpi/libacpi.h @@ -31,6 +31,7 @@ #define ACPI_HAS_SSDT_S4 (1<<6) #define ACPI_HAS_TCPA (1<<7) #define ACPI_HAS_IOAPIC (1<<8) +#define ACPI_HAS_WAET (1<<9) struct acpi_numa { diff --git a/tools/firmware/hvmloader/util.c b/tools/firmware/hvmloader/util.c index 325c0a2..61018ea 100644 --- a/tools/firmware/hvmloader/util.c +++ b/tools/firmware/hvmloader/util.c @@ -919,7 +919,7 @@ void hvmloader_acpi_build_tables(struct acpi_config *config, if ( !strncmp(xenstore_read("platform/acpi_s4", "1"), "1", 1) ) config->table_flags |= ACPI_HAS_SSDT_S4; - config->table_flags |= (ACPI_HAS_TCPA | ACPI_HAS_IOAPIC); + config->table_flags |= (ACPI_HAS_TCPA | ACPI_HAS_IOAPIC | ACPI_HAS_WAET); config->tis_hdr = (uint16_t *)ACPI_TIS_HDR_ADDRESS;