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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C138FC001DE for ; Thu, 3 Aug 2023 00:49:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uZVl/gtrKnudepzY5Pth7601WosuM6LsT8HNQEwJBZY=; b=Brne9tNsTEC0C+ d6Wc56eZFMXuodrfXboUudL81NDDLPo1lvrotOKWutgt1oTheSfw+2F6X1lCrAMLjt6GyTlcffeve 4H2MSPkLGYWnVacDMYjSdMHz3bQUt3OxFNfzlxJKZQvYJgNIit0JKulvnCvGvQD4PgRriAHunLnlq v5cRMyYwJ9edT+1Z65CWsGfIzr99lmPA1JxTZxkxQMohL6ksg5WhqiMOCtcqeBCIn1obwHXeWfZ7r uq5ivbh4gfmt3Fe9bfdAlI2VLXgPndO9dhRZte1hx15WGe6X2u646eRVJTPoiPDqycZuW4dQIvaAU K6W4Z7D3Y8TY+iZT5JhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRMWe-006J38-1X; Thu, 03 Aug 2023 00:49:12 +0000 Received: from mail-pg1-f180.google.com ([209.85.215.180]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRMWa-006J1w-0w for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 00:49:10 +0000 Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-55fcc15e109so200244a12.3 for ; Wed, 02 Aug 2023 17:49:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691023744; x=1691628544; 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=oTv5W4Q6yS6G6v7qn6WVl32Gcj1wC0XOowAiH8q+7B8=; b=eEv1IkQsj3C5HFGcFDij5USAdLV6gV6Ranj4RSsyWjs4T+Cm3ptUBPAg9s7+EoBMc7 gQJrTokgxVjvk6U1Tdi6m0ic/4gpmmPgIIZe6r5ncB1xx6V6sNvN4oymCaIckwJWdML9 MxPTQhhmlOyo7vLLFvxZzOnukYcEigXVu3F44M6xJ0jCcbvlUZGtui6DiNkDdKdGK2A3 F6dBiDo3MdbsGLvDCesnPnutcCF6dILzThht4dCzG8gTwkpMH2rnbzIa4nZG8Mfuo6nM uuTU43wkiyiisiGDHBgK8YzSZzHYwuMfLV7YIBYCrU5zDjUBNR48mOhXrmpPoUOZUipU RC1A== X-Gm-Message-State: ABy/qLZBcuTAcuP3lvOBXGVe6IBgStJkmCpsj9eP14LzKVMYu3ETwW8h dvu8sTm6kPFSnVNTn8pbMFo= X-Google-Smtp-Source: APBJJlGlrF2BoFgwZfEV6V2b6NStOmhRISsvraxtM7VPK80JgV3vkWcJ9YhwIsY3KRqEi5lAF4jmQg== X-Received: by 2002:a17:90a:6fa6:b0:262:e6c6:c2ec with SMTP id e35-20020a17090a6fa600b00262e6c6c2ecmr15085133pjk.33.1691023744201; Wed, 02 Aug 2023 17:49:04 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id l4-20020a17090ad10400b00263f33eef41sm1595084pju.37.2023.08.02.17.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 17:49:03 -0700 (PDT) Date: Thu, 3 Aug 2023 00:48:57 +0000 From: Wei Liu To: Nuno Das Neves Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, mikelley@microsoft.com, kys@microsoft.com, wei.liu@kernel.org, haiyangz@microsoft.com, decui@microsoft.com, ssengar@linux.microsoft.com, mukeshrathor@microsoft.com, stanislav.kinsburskiy@gmail.com, jinankjain@linux.microsoft.com, apais@linux.microsoft.com, Tianyu.Lan@microsoft.com, vkuznets@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, will@kernel.org, catalin.marinas@arm.com Subject: Re: [PATCH 14/15] asm-generic: hyperv: Use mshv headers conditionally. Add asm-generic/hyperv-defs.h Message-ID: References: <1690487690-2428-1-git-send-email-nunodasneves@linux.microsoft.com> <1690487690-2428-15-git-send-email-nunodasneves@linux.microsoft.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1690487690-2428-15-git-send-email-nunodasneves@linux.microsoft.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230802_174908_328571_7D2C4CE1 X-CRM114-Status: GOOD ( 25.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 27, 2023 at 12:54:49PM -0700, Nuno Das Neves wrote: > In order to keep unstable hyper-v interfaces independent of > hyperv-tlfs.h, hvhdk.h must replace hyperv-tlfs.h eveywhere it will be > used in the mshv driver. Please properly capitalize "Hyper-V" when it is used as a term. > Add hyperv-defs.h to replace some inclusions of hyperv-tlfs.h. > It includes hyperv-tlfs.h or hvhdk.h depending on a compile-time constant > HV_HYPERV_DEFS which will be defined in the mshv driver. > > Signed-off-by: Nuno Das Neves > --- > arch/arm64/include/asm/mshyperv.h | 2 +- > arch/x86/include/asm/mshyperv.h | 3 +-- > drivers/hv/hyperv_vmbus.h | 1 - > include/asm-generic/hyperv-defs.h | 26 ++++++++++++++++++++++++++ > include/asm-generic/mshyperv.h | 2 +- > include/linux/hyperv.h | 2 +- > 6 files changed, 30 insertions(+), 6 deletions(-) > create mode 100644 include/asm-generic/hyperv-defs.h > [...] > diff --git a/include/asm-generic/hyperv-defs.h b/include/asm-generic/hyperv-defs.h > new file mode 100644 > index 000000000000..ac6fcba35c8c > --- /dev/null > +++ b/include/asm-generic/hyperv-defs.h > @@ -0,0 +1,26 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_GENERIC_HYPERV_DEFS_H > +#define _ASM_GENERIC_HYPERV_DEFS_H > + > +/* > + * There are cases where Microsoft Hypervisor ABIs are needed which may not be > + * stable or present in the Hyper-V TLFS document. E.g. the mshv_root driver. > + * > + * As these interfaces are unstable and may differ from hyperv-tlfs.h, they > + * must be kept separate and independent. > + * > + * However, code from files that depend on hyperv-tlfs.h (such as mshyperv.h) > + * is still needed, so work around the issue by conditionally including the > + * correct definitions. > + * > + * Note: Since they are independent of each other, there are many definitions > + * duplicated in both hyperv-tlfs.h and uapi/hyperv/hv*.h files. > + */ Is this because we accidentally introduced some host only, unstable interfaces to hyperv-tlfs.h? Is the long term plan to drop those from hyperv-tlfs.h and further separate the helper functions? Thanks, Wei. > +#ifdef HV_HYPERV_DEFS > +#include > +#else > +#include > +#endif > + > +#endif /* _ASM_GENERIC_HYPERV_DEFS_H */ > + > diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h > index 2b20994d809e..e86b6f51fb64 100644 > --- a/include/asm-generic/mshyperv.h > +++ b/include/asm-generic/mshyperv.h > @@ -25,7 +25,7 @@ > #include > #include > #include > -#include > +#include > > #define VTPM_BASE_ADDRESS 0xfed40000 > > diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h > index f90de5abcd50..66ed8b3e5d89 100644 > --- a/include/linux/hyperv.h > +++ b/include/linux/hyperv.h > @@ -24,7 +24,7 @@ > #include > #include > #include > -#include > +#include > > #define MAX_PAGE_BUFFER_COUNT 32 > #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel