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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D869FC433C1 for ; Mon, 22 Mar 2021 11:17:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A933A6198E for ; Mon, 22 Mar 2021 11:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbhCVLQe (ORCPT ); Mon, 22 Mar 2021 07:16:34 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:38892 "EHLO mail-wr1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbhCVLQ0 (ORCPT ); Mon, 22 Mar 2021 07:16:26 -0400 Received: by mail-wr1-f53.google.com with SMTP id z2so16246210wrl.5; Mon, 22 Mar 2021 04:16:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UkbQHhRFu3VCem8wMbYGSCHnBOT7NZBm3cb0xTaOfF0=; b=jFOahz2DY2y/DDIDWItBo+DTjtqHrA85pvlDoNSUxXQQUN9I4SZyEpKgriuxYWLYIX F/du/WtoC2LPJHYyO+Zav7UmNdaDkENo3OwSIMn8jZHYXLCYBkpPNj9hfabZRseTlkti 8NboPo0Ynb/4fXE7J1isTzGUeyd77+hyVh5Ift+JO89Dw4IniGaUo10zMHgABYf67PQ9 iOou6GlnllcoiNrfWOz/t3HKSz7Dd5aS9aMnPfVuS7pZxRnhidbi0HbJOmoy1E+VUak5 aHJ6gyEEeBM8ZRqGXe+uPUQ/L3fU5ya/hFFQUxUm9Ve1WNhMjHW8AMXowZB/g6uTBoUb CBWg== X-Gm-Message-State: AOAM531MMJ6ssQDETU4G4cgHSAovNeq54W9dX4pdbuRbmaFIf/A9Ewn3 JDWResRjtBB8owjETURXdHnHGka4/zU= X-Google-Smtp-Source: ABdhPJxONToZF/zYJgJuQYMDI6ZY4mH5zGY9bhnz1Ws/t2BZvxSpu6NNWHPzKlavMQhoByPSHAGsAw== X-Received: by 2002:a05:6000:1563:: with SMTP id 3mr17541609wrz.211.1616411783637; Mon, 22 Mar 2021 04:16:23 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id o15sm13518844wra.93.2021.03.22.04.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 04:16:23 -0700 (PDT) Date: Mon, 22 Mar 2021 11:16:21 +0000 From: Wei Liu To: Michael Kelley Cc: Sunil Muthuswamy , Matheus Castello , "linux-hyperv@vger.kernel.org" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Tianyu Lan , Wei Liu , vkuznets , KY Srinivasan , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4] x86/Hyper-V: Support for free page reporting Message-ID: <20210322111621.kdjsaxxioxo6k7dl@liuwe-devbox-debian-v2> References: 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 Fri, Mar 19, 2021 at 09:30:50PM +0000, Michael Kelley wrote: > From: Sunil Muthuswamy Sent: Friday, March 19, 2021 2:21 PM > > > > > What's the strategy for this flag in the unlikely event that the hypercall fails? > > > It doesn't seem right to have hv_query_ext_cap() fail, but leave the > > > static flag set to true. Just move that line down to after the status check > > > has succeeded? > > > > That call should not fail in any normal circumstances. The current idea was to > > avoid repeating the same call on persistent failure. > > OK, I can see that as a valid strategy. And the assumption is that a failed > hypercall would leave hv_extended_cap unmodified and hence all zeros. > > I'm OK with this approach if you want to keep it. But perhaps add a short > comment about the intent so it doesn't look like a bug. :-) > Sunil, if you can send an updated version of your patch by either providing a comment or moving the code around, I can queue it up for hyperv-next. I think adding a comment is perhaps the easier thing to do. Wei.