From patchwork Tue Jun 20 06:19:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9798631 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 D3FE660328 for ; Tue, 20 Jun 2017 06:22:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC464269A3 for ; Tue, 20 Jun 2017 06:22:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0FA926E98; Tue, 20 Jun 2017 06:22:28 +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 5BBC6269A3 for ; Tue, 20 Jun 2017 06:22:28 +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 1dNCVs-0002xA-36; Tue, 20 Jun 2017 06:19:44 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNCVr-0002x4-AD for xen-devel@lists.xenproject.org; Tue, 20 Jun 2017 06:19:43 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id 00/D1-11537-E7EB8495; Tue, 20 Jun 2017 06:19:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrEIsWRWlGSWpSXmKPExsXS6fjDS7d2n0e kwa5JFhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8byz9tYCy4KVbQtP8PUwPiNr4uRk0NIIE9i zor77CA2r4CdxKr5h5lAbAkBQ4nTC2+ygNgsAqoSn0+fAqthE1CXaHu2nbWLkYNDRMBA4tzRp C5GLg5mgatMEk2LV4LVCAt4Skw7spwNYr6dxIQVzcwg9bwCghJ/dwiDhJmBwp8mn2WZwMg9Cy EzC0kGwtaSePjrFpStLbFs4WtmkHJmAWmJ5f84YMr/HPnKhKoExPaUmHrwMdMCRo5VjBrFqUV lqUW6hpZ6SUWZ6RkluYmZObqGBsZ6uanFxYnpqTmJScV6yfm5mxiBYVnPwMC4g/H3cb9DjJIc TEqivFqbPCKF+JLyUyozEosz4otKc1KLDzHKcHAoSfCG7wXKCRalpqdWpGXmACMEJi3BwaMkw rtuF1Cat7ggMbc4Mx0idYpRUUqcVwCkTwAkkVGaB9cGi8pLjLJSwryMDAwMQjwFqUW5mSWo8q 8YxTkYlYR5TXYATeHJzCuBm/4KaDET0GLmMy4gi0sSEVJSDYwTtR9NOHOI5bRb+lG1KQeyJt+ 0P6AllraCQ3qb5XYu53mRaad3nNry6/WGG3s3vNA68TNP8ce0B+G3GW9/2uzfOmnmMZm6hzNZ 2Pl3XOA0UleZGfnc8dKiJ3kVvkeNzSKzz1yTe/Tiwq3VSTu3LFvpNffuSnfzfW5PX81qlmi1u h+YuWml3t6640osxRmJhlrMRcWJACShthbFAgAA X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-13.tower-31.messagelabs.com!1497939580!105783491!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22261 invoked from network); 20 Jun 2017 06:19:41 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-13.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 20 Jun 2017 06:19:41 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Tue, 20 Jun 2017 00:19:38 -0600 Message-Id: <5948DA980200007800164510@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.2 Date: Tue, 20 Jun 2017 00:19:36 -0600 From: "Jan Beulich" To: "xen-devel" References: <5948DA980200007800164510@prv-mh.provo.novell.com> Mime-Version: 1.0 Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall Subject: [Xen-devel] [PATCH] memory: don't suppress P2M update in populate_physmap() 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 Commit d18627583d ("memory: don't hand MFN info to translated guests") wrongly added a null-handle check there - just like stated in its description for memory_exchange(), the array is also an input for populate_physmap() (and hence can't reasonably be null). I have no idea how I've managed to overlook this. Signed-off-by: Jan Beulich memory: don't suppress P2M update in populate_physmap() Commit d18627583d ("memory: don't hand MFN info to translated guests") wrongly added a null-handle check there - just like stated in its description for memory_exchange(), the array is also an input for populate_physmap() (and hence can't reasonably be null). I have no idea how I've managed to overlook this. Signed-off-by: Jan Beulich --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -248,8 +248,7 @@ static void populate_physmap(struct memo guest_physmap_add_page(d, _gfn(gpfn), _mfn(mfn), a->extent_order); - if ( !paging_mode_translate(d) && - !guest_handle_is_null(a->extent_list) ) + if ( !paging_mode_translate(d) ) { for ( j = 0; j < (1U << a->extent_order); j++ ) set_gpfn_from_mfn(mfn + j, gpfn + j); Acked-by: Andrew Cooper --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -248,8 +248,7 @@ static void populate_physmap(struct memo guest_physmap_add_page(d, _gfn(gpfn), _mfn(mfn), a->extent_order); - if ( !paging_mode_translate(d) && - !guest_handle_is_null(a->extent_list) ) + if ( !paging_mode_translate(d) ) { for ( j = 0; j < (1U << a->extent_order); j++ ) set_gpfn_from_mfn(mfn + j, gpfn + j);