Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp355880pxy; Wed, 21 Apr 2021 04:55:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGbuV35H1wJJWy0rg2A1exGeS1LwCh9rzp/x3Cwby+qn2PCNpyrnfA68FrX2E3ZCXBIqwI X-Received: by 2002:a17:906:d110:: with SMTP id b16mr32502122ejz.146.1619006107943; Wed, 21 Apr 2021 04:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619006107; cv=none; d=google.com; s=arc-20160816; b=bHXYkd4G5YLOtr0YSyi+h9V8P4caFS+TtIlCWrb9Z9rntm7Le7FGDroJNFuPdPGunC Khip2kgqCs5cwEl8GVdlJuaWkB67qMI/NMfLHY7ZToc/bY/jhO9m1GYq+RupNyMumr8H ObKsreIfOnLRnJ2j35pircvMX+tIaK5gIIVzK5D2z25gBFOVt5rYcLor+e11XCepAung 3dst+3D/JUMFjlcPxfJ0JjeZej1I3fnHXpSUnDQWnYkY6XQQSWxTrl645q1qreKRO0x9 jW6T6Ifq5X0JNm7nb0LESeV9TqNH+2IxN0rYlf12fVHa74euCRw2AcGJJA1aDl4gbs0e yWHg== 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=byAleODMDPoZQ0ntwl50w8DGq+7YdYY2oogVoOwN1t0=; b=KXeekL+EVnjfdDbLjj/2CQ5jzWvFf4QEHTBcbR6sCXcB79OuTjneOAzM7rvI9OfR1P CCtCyItjuX41+V9IfkmhVwuW0NipGz3vYQcDa8OwJYdeA52quZP52+WeaHArJ0Rxsa4O EyZ2zuX5P72+swnomkmivkcZgCedByKmjHdKPhm2SYZYOElwHy3YbC6cKAx42jAZh51o Z9PJUO4rauYtWNuGoWUtiKyZR0qTcM9AZa86e0X6Gbf1lEaM6nioGDuRH9y7XRJAXvW3 o7KA14spVZJk+YPd0gKUstr/GxfQPrkYdYzvGlA63hzMVNnNcFM/OCWfza0p+tqqXt0b ihMg== 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 v13si1571170ejh.540.2021.04.21.04.54.44; Wed, 21 Apr 2021 04:55:07 -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 S238488AbhDUJsJ (ORCPT + 99 others); Wed, 21 Apr 2021 05:48:09 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:44590 "EHLO mail-wm1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238277AbhDUJsE (ORCPT ); Wed, 21 Apr 2021 05:48:04 -0400 Received: by mail-wm1-f50.google.com with SMTP id f195-20020a1c1fcc0000b029012eb88126d7so878730wmf.3; Wed, 21 Apr 2021 02:47:29 -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=byAleODMDPoZQ0ntwl50w8DGq+7YdYY2oogVoOwN1t0=; b=Kfqtz3RtUsST8oQpu7PaJMRINU41FED7F+OBVnV90o86fSHXZWmuyzl+ExaWOXEGPS tGeEw9zyDZkIF7UqBZCa4qJZOvKcf97uK+Sh53VRG0E1cH6vRWXoYBljUx8J6ccMeKUG /M2f4EXOk9FcxsFVV+rknd8x5mgGmp8ANxg+h01X4QnFDtNrZDkwBiI64kSo0xuqyFQb 8N284wT5RwmXTLimF7OE6oPYepMGJNc9vvJOHpIW+THfZiOctWL4GoJkKhUqCRma4RA+ IiFZL9DPOvKfudNU7P4KCnAWPA4khinXaWOuaJMjZ1Cwpgv1cFZro3+jNu/9F7sjqZie Hcxw== X-Gm-Message-State: AOAM531O0STVmeCPFVbWO9IpUPgK9uXdJHkJVrgOVOkxyQqRjNn0RPmh npJ6B/lqAilO7EKhgnbTJwc= X-Received: by 2002:a1c:f618:: with SMTP id w24mr8881161wmc.93.1618998448809; Wed, 21 Apr 2021 02:47:28 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id o17sm2530062wrg.80.2021.04.21.02.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 02:47:28 -0700 (PDT) Date: Wed, 21 Apr 2021 09:47:27 +0000 From: Wei Liu To: Michael Kelley Cc: Joseph Salisbury , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "x86@kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status Message-ID: <20210421094727.ulbzt7uktpxfw4hg@liuwe-devbox-debian-v2> References: <1618620183-9967-1-git-send-email-joseph.salisbury@linux.microsoft.com> <1618620183-9967-2-git-send-email-joseph.salisbury@linux.microsoft.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-kernel@vger.kernel.org On Tue, Apr 20, 2021 at 09:30:08PM +0000, Michael Kelley wrote: > From: Joseph Salisbury Sent: Friday, April 16, 2021 5:43 PM > > > > There is not a consistent pattern for checking Hyper-V hypercall status. > > Existing code uses a number of variants. The variants work, but a consistent > > pattern would improve the readability of the code, and be more conformant > > to what the Hyper-V TLFS says about hypercall status. > > > > Implemented new helper functions hv_result(), hv_result_success(), and > > hv_repcomp(). Changed the places where hv_do_hypercall() and related variants > > are used to use the helper functions. > > > > Signed-off-by: Joseph Salisbury > > --- > > arch/x86/hyperv/hv_apic.c | 16 +++++++++------- > > arch/x86/hyperv/hv_init.c | 2 +- > > arch/x86/hyperv/hv_proc.c | 25 ++++++++++--------------- > > arch/x86/hyperv/irqdomain.c | 6 +++--- > > arch/x86/hyperv/mmu.c | 8 ++++---- > > arch/x86/hyperv/nested.c | 8 ++++---- > > arch/x86/include/asm/mshyperv.h | 1 + > > drivers/hv/hv.c | 2 +- > > drivers/pci/controller/pci-hyperv.c | 2 +- > > include/asm-generic/mshyperv.h | 25 ++++++++++++++++++++----- > > 10 files changed, 54 insertions(+), 41 deletions(-) > > Wei -- I have gone through these changes reasonably carefully, but > your review of the Linux-in-the-root-partition changes would be a good > double-check. It's too easy to get the sense of the tests backwards. :-( The code looks correct to me. > > Reviewed-by: Michael Kelley Thanks. I will apply this series to hyperv-next shortly. Wei.