From patchwork Thu Sep 28 10:36:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9975749 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 8B6666034B for ; Thu, 28 Sep 2017 10:39:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CD92292A4 for ; Thu, 28 Sep 2017 10:39:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71CCC29394; Thu, 28 Sep 2017 10:39:09 +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 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 08A87292A4 for ; Thu, 28 Sep 2017 10:39:09 +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 1dxWBD-0002f9-Ua; Thu, 28 Sep 2017 10:36:31 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxWBC-0002f2-7N for xen-devel@lists.xenproject.org; Thu, 28 Sep 2017 10:36:30 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id 8B/1C-03283-DA0DCC95; Thu, 28 Sep 2017 10:36:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGIsWRWlGSWpSXmKPExsXitHRDpO7aC2c iDZ4vY7f4vmUykwOjx+EPV1gCGKNYM/OS8isSWDNmvl3AWvCPrWLft+UsDYw/WLsYOTkkBPwl 3k3bxgZiswkoS/zs7AWzRQT0JJoOPGcEsZkFFjBKTJuaD2ILC7hIbOs+ww5iswioStx+cZ4Zx OYVMJM4Ofca1Ex5iV1tF8FsTgFzifZLS8DqhYBqNky8wQhhK0h0TD/GBNErKHFy5hMWiF0SEg dfvGCewMg7C0lqFpLUAkamVYzqxalFZalFuhZ6SUWZ6RkluYmZObqGBmZ6uanFxYnpqTmJScV 6yfm5mxiBocMABDsYZ1/2P8QoycGkJMqrc+JMpBBfUn5KZUZicUZ8UWlOavEhRhkODiUJ3o7z QDnBotT01Iq0zBxgEMOkJTh4lER4288BpXmLCxJzizPTIVKnGI05bjy8/oeJo+Pm3T9MQix5+ XmpUuK8z0AmCYCUZpTmwQ2CRdclRlkpYV5GoNOEeApSi3IzS1DlXzGKczAqCfP2gUzhycwrgd v3CugUJqBTJk8EO6UkESEl1cC49e7c4z+1Ezq8j5byRjrvtTffvUBsziku3wONDv2XslXWB/1 g0n0vVnBO+fj5JOeEwLWsGV8uOUyvbT+1k8ustnbGO9mEM35OAdMnue/Sn1+keS/XWO7L0QUW Xxv922XqdvgsfhWePEf4Z/r9y+szk9tf7nkqc2X7s/LT87j/WwTLxfT+bGtWYinOSDTUYi4qT gQAl8NleakCAAA= X-Env-Sender: prvs=4379d8120=wei.liu2@citrix.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1506594987!118160806!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 61712 invoked from network); 28 Sep 2017 10:36:28 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-4.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 28 Sep 2017 10:36:28 -0000 X-IronPort-AV: E=Sophos;i="5.42,449,1500940800"; d="scan'208";a="441576301" From: Wei Liu To: Xen-devel Date: Thu, 28 Sep 2017 11:36:25 +0100 Message-ID: <20170928103625.896-3-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170928103625.896-1-wei.liu2@citrix.com> References: <20170928103625.896-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Anthony PERARD , Ian Jackson , Paul Durrant , Wei Liu Subject: [Xen-devel] [PATCH v2 2/2] libxendevicemodel: initialise extent to zero 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The pad field needs to be zero as required by the hypervisor. Instead of setting the pad separately, use C99 initialiser to clear extent. Signed-off-by: Wei Liu --- Cc: Ian Jackson Cc: Paul Durrant Backport to 4.9 --- tools/libs/devicemodel/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/devicemodel/core.c b/tools/libs/devicemodel/core.c index fcb260d29b..986f147658 100644 --- a/tools/libs/devicemodel/core.c +++ b/tools/libs/devicemodel/core.c @@ -483,7 +483,7 @@ int xendevicemodel_modified_memory( xendevicemodel_handle *dmod, domid_t domid, uint64_t first_pfn, uint32_t nr) { - struct xen_dm_op_modified_memory_extent extent; + struct xen_dm_op_modified_memory_extent extent = { }; extent.first_pfn = first_pfn; extent.nr = nr;