Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp570125rwi; Thu, 27 Oct 2022 05:11:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nb+DqaBwKy5xEnvyFAhmTpRZLr6mK+EJP2ldIKTXukdwXflqXsy+ic82DIYy1C8Gu3zTW X-Received: by 2002:a17:907:7e90:b0:78d:50f7:8abd with SMTP id qb16-20020a1709077e9000b0078d50f78abdmr40780763ejc.523.1666872674145; Thu, 27 Oct 2022 05:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666872674; cv=none; d=google.com; s=arc-20160816; b=JaTXryowTm6K9Yqe8a9TuDAgYkqFOnbPFMAH9dnzaT0T99ORcRrQye/LLW5TZPuf/i FCHbg7Uenx0YiM/u7lkEMCD2HIpVLiPHrxYF3bKPsL0WxcxFbHgIUOUwQZOyT++v04e2 VLBNUqqz5t/rzMdcG3FKHsvonvB6QPJqwpiU7DsNulxaRJqFDNGlKASRJ1Fr7WxwFw64 vrXzwSl2AvdCP4zzF1tiGXUEv9qayp2IF0gpUQ9xw3/X4kMwIN57D6Emhaj/MJOnGsrN Cvlan1F7q7rFKloS7gC6deIL28h7G7cMj3sCdo3XkICWyvWRNd+Qocbvx0b9MLK4a+zw CWGg== 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; bh=FdbMuT3q07TnuTjnPHzXSgdwPpbsUbQP8N9i6MigE9M=; b=EqN6pE9/WGHwgf4yyqsCOfMEE5vtyhhIMJcO2+YHSgiRyr1r2lhv+aJFWhyaUYKUPf MoB2VbJ6YYnDXpxe99Of+ouqAhe2BkEORJgxBqzwdlV6DlCwuE0ojM3vOZhFZZhUA9TJ 0wZoUR6qvQXa86oepiIDLlTq53BHUTYRWENJPTo9mlzLXC0QoukDuE/Tr+RrJFYhP+UN ifs00Ss3W7bD3wuVtzNLUKluxfcYiZsC4GrrgxsRJHpSKO8so429EdTOZBCdDRm8UPsj J20lKSzNgX0h86P7dihI3piGun04QKSBACxmuuYy0IEIgOtUUlGiw18CP1JqomIHoaNz qgLw== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk17-20020a1709077f9100b007a0d3365aa9si1420140ejc.136.2022.10.27.05.10.42; Thu, 27 Oct 2022 05:11:14 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234798AbiJ0LTN (ORCPT + 99 others); Thu, 27 Oct 2022 07:19:13 -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-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: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 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.