Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3342084pxf; Mon, 22 Mar 2021 04:20:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/cHQ/Fi033CiVj73tYt7b6prX1AQyvbhS7RSRCGcqnl5xnA8cdFkM11a4MddTDtbVKFHd X-Received: by 2002:a05:6402:1754:: with SMTP id v20mr24765882edx.191.1616412006055; Mon, 22 Mar 2021 04:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616412006; cv=none; d=google.com; s=arc-20160816; b=ibPlnVOTCzL/rBCC07ZImqqBbm2D4DBXZcJQJNXaSfFAtzsFqJBnSjiCxnRcvmLYRM 8OS7UhESSBDnavnRQLPRhnfBWDNvTGrZljDhmv7e/pgi/t8Jx4gT0neymzyjURz9y+jN gStqRLs4vyRVjYOyB7nR2l9Buooxfv0CFtfUrayeu7lhoQStLmIETA58hwPElsj0oo7X Iy/9vc/Q3GLB7Z6yBxv6ZfvxSjQspnQkjUc5X+S3a3DAJ9bd0bEwStManvW5e1/K/P7O QBs2oFQHXVVBHes5xN+Aa2c2FQJ/MXWJbVi0N7G9Fw4Zvy6PTG3kEzig2evf76wqKFE8 h0Lw== 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=UkbQHhRFu3VCem8wMbYGSCHnBOT7NZBm3cb0xTaOfF0=; b=nrdwlLOlQMLQ/K4e540cMHiUYILXPqQqp5VZLmDfUGdKW1K90J7Ds3FfZ5M6NPZpIF QKpnpMS9Uwk3ul6sAxVqMwSGFOXZ+TQFen2vx+xL2AyrvSGr8x3DJHTqdIl4MY9++RQH 0k81PcQajtJ52Zf/Zkp3kPBsqEw2XghbeEr/YsQFbTBSRQcB7OIgF6LP34bpV6zMaopi 5OdaALZevEStSuHDXPBSWFocz9Ea7V2NYyg8q94zxp+RRsVVC5gcdyYizvBZK8By+WK/ eCRENUnN4ec3bTuPk1h78D4aHZL4kyqpiyTktkQkkxbT2lHWoLBZhtiLOZqgOS0aMokT 9WSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj16si10194685edb.143.2021.03.22.04.19.43; Mon, 22 Mar 2021 04:20:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230239AbhCVLQi (ORCPT + 99 others); Mon, 22 Mar 2021 07:16:38 -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-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-kernel@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.