Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp411134rwi; Thu, 27 Oct 2022 03:03:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5j3UBUcUFdm06umjmJb5Ct9H4tdC5YxQ7C8kNZ+iu5CwtYtLBzFru1MbMM+HFVHnW7M4k3 X-Received: by 2002:a05:6402:78c:b0:461:a7f3:2d61 with SMTP id d12-20020a056402078c00b00461a7f32d61mr20997668edy.84.1666865017003; Thu, 27 Oct 2022 03:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666865016; cv=none; d=google.com; s=arc-20160816; b=riCtIbDfAxlFCxomxv0QzQ6z+WL4xjLlBhVSbpaQTm8N9YmqvYF77jUHwNdP4wKnXC FL3nyd+Zj0m0L1iqC4oyzMKmg7EZ3IgXXykPzm6uB/dUWfgQE3pdRxq6enKQGRFLD433 B/G0NdS53WnX0G0CZxDRPjgIdUYj0qDpXAo8VaxDASN4NB+zNTW6YLUMebf4SgqQ3lzC hfste9eewV3xndk/0x62PfXoG5IfTFaE3R9qcHVYH7uf/HpB0OwR4Q4/tNFhMGag8qRK C66j6ZBTcsQtuwfs9eAnXE8EP81Z1lL7ACUhAYTMy7o88UxLNBUypZ3CdcQkmWiAaZg5 yGLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yWqjreysVmACqMYAc6h6HbEEP7ofHKdO6SnJusca1rU=; b=HWmtV3YK+8MQjcFUZdog1e+sS10O6sdx+4Jo9/jYieh2VlukmtDW2ZreWK1qwFb7wc X49x/Ko6TDdZIOt+gqiifaLLStK3xpQjrKwBRZ5uoF3wMd2SrHB1yup/TngaO+pewG/b /zJhY7N3+k27JcOuh/rYviA+o5fI7cPIcba87A4h+XkgduV8UcyfS/sZ/xe9nxHfzgay Us5cTi2vICtKbHnLITzyP9C3p25c0ck4ZSP7t+9Kl0rTQqAkIA+ozmotGluQAxGTl3Px xtYrk/wvIu5Ap0jKvnzlaoMguYAbGwL5/E5e8HRj06VUYCX0yIZmNMKzMsvlUJYXQvD1 /GTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="espbAOe/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020a05640235d400b004623a34a666si1304468edc.487.2022.10.27.03.02.58; Thu, 27 Oct 2022 03:03:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="espbAOe/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234581AbiJ0KBF (ORCPT + 99 others); Thu, 27 Oct 2022 06:01:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235039AbiJ0KAf (ORCPT ); Thu, 27 Oct 2022 06:00:35 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0CA5DD3A6; Thu, 27 Oct 2022 03:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666864812; x=1698400812; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fJPCFTV8MpF6btptcz/BJUn1rRYOmr6pkto3N3fNH+w=; b=espbAOe/VK/OuqYKfXdARkFUuJjbBmlKz6uBipnUZ3106njesWzYF+PP KaBrzQ6RODPm4ro47uEpH0eU3Z2CL8DrektXHFutfIRSa4cBhekantubr WB6VfJrzY0kNN8OnV16zehRuvBhe7xaxI6AjXAS+anTCkw/E730n1aBFg WpdvJRq+QRMiPYFjUWTvzdA/oOXVjZfHEzGJLIj1cFsUUDBbmYebhjG8k bYG4v6Ee6IPao9sOK0DETn5qJeN43S1y7rJfYfltG6hQ1ZHB+kLLt0u0K 5ZRFtgcas5XDGl5b4taMzw3dKnrO9EUBuHEDbOYSHGr0wa/IXK9oFHYyz g==; X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="394498356" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="394498356" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2022 03:00:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="583498473" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="583498473" Received: from liuzhao-optiplex-7080.sh.intel.com (HELO localhost) ([10.239.160.132]) by orsmga003.jf.intel.com with ESMTP; 27 Oct 2022 03:00:08 -0700 Date: Thu, 27 Oct 2022 18:05:48 +0800 From: Zhao Liu To: Wei Liu Cc: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , =?iso-8859-1?Q?Dexuan=A0Cui?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, =?iso-8859-1?Q?Ira=A0Weiny=A0?= , "Fabio M. De Francesco" , Zhenyu Wang , Zhao Liu Subject: Re: [PATCH v2] x86/hyperv: Remove BUG_ON() for kmap_local_page() Message-ID: References: <20221020083820.2341088-1-zhao1.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 26, 2022 at 03:17:18PM +0000, Wei Liu wrote: > Date: Wed, 26 Oct 2022 15:17:18 +0000 > From: Wei Liu > Subject: Re: [PATCH v2] x86/hyperv: Remove BUG_ON() for kmap_local_page() > > On Thu, Oct 20, 2022 at 04:38:20PM +0800, Zhao Liu wrote: > > From: Zhao Liu > > > > The commit 154fb14df7a3c ("x86/hyperv: Replace kmap() with > > kmap_local_page()") keeps the BUG_ON() to check if kmap_local_page() > > fails. > > > > But in fact, kmap_local_page() always returns a valid kernel address > > and won't return NULL here. It will BUG on its own if it fails. [1] > > > > So directly use memcpy_to_page() which creates local mapping to copy. > > > > [1]: https://lore.kernel.org/lkml/YztFEyUA48et0yTt@iweiny-mobl/ > > > > Suggested-by: Fabio M. De Francesco > > Suggested-by: Ira Weiny > > Reviewed-by: Ira Weiny > > Signed-off-by: Zhao Liu > > Applied to hyperv-fixes. Thanks. Sorry Wei, I appology for not deleting unused variables, which caused the next tree break. Do I need to send another v3 to make up for my carelessness? Zhao