From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A94FBFA3742 for ; Thu, 27 Oct 2022 11:19:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234871AbiJ0LTL (ORCPT ); Thu, 27 Oct 2022 07:19:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234893AbiJ0LTJ (ORCPT ); Thu, 27 Oct 2022 07:19:09 -0400 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4F5FAE7B; Thu, 27 Oct 2022 04:19:07 -0700 (PDT) Received: by mail-wm1-f43.google.com with SMTP id l16-20020a05600c4f1000b003c6c0d2a445so909120wmq.4; Thu, 27 Oct 2022 04:19:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FdbMuT3q07TnuTjnPHzXSgdwPpbsUbQP8N9i6MigE9M=; b=w/6wNwcmiEp/qssK4vaV46YIqJRUgadXZa9m9o14Q1W6ob0AB5T/tRjf/4MK2YYcwE 03YQcKUi59jYXiQgykzPrwMAdXdvCbMpOcSluqnXyiudXrQLq/P6ZNsfKKyb53vHt+cc hs34AWoxEWqgGItX3JltchVIOwDwSjM5fWdzEcvsKNh3COclFImWf0xXhR53t3iq36dn oA+NQ6TlrqgruQd3fA0gRH1pA21eKU2DSJownR1hAd7dGnYPsrQJJyskF/WnlaLhA58K uNcpNF0wcGBU5wb7gT9Uql1Co9mRIJ1IpYzUMxKgolG9nQVjQdRMLQ49U9aLAoM5PPhi RsRQ== X-Gm-Message-State: ACrzQf2lgupf6uPl7aA/nbS3gFNvblDt4mU+8l0PvFBmqOjfN+xJ3n1T y3EWGgmGUdLVObEeLBYhoTE= X-Google-Smtp-Source: AMsMyM4e6onb5FXA/XWAWabbp/IBV6y+QsqvnhW0CYaMslGRR6aUGU1yLaCxxwOOpKpYMHTcMjvPXA== X-Received: by 2002:a05:600c:502c:b0:3ce:794f:d664 with SMTP id n44-20020a05600c502c00b003ce794fd664mr5492164wmr.33.1666869546056; Thu, 27 Oct 2022 04:19:06 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id l18-20020a05600c1d1200b003a342933727sm4917798wms.3.2022.10.27.04.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 04:19:05 -0700 (PDT) Date: Thu, 27 Oct 2022 11:19:03 +0000 From: Wei Liu To: Zhao Liu Cc: Wei Liu , "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: Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org On Thu, Oct 27, 2022 at 06:05:48PM +0800, Zhao Liu wrote: > 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? There is no need to send v3. I've dealt with it. Thanks, Wei.