Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp89402pxb; Wed, 14 Apr 2021 10:05:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpweOFnTTeKL71qJHli3YsQQ2OPGxJxaqnFsweED/6YB8+qnFju936K2nKfZ3TzgykL03P X-Received: by 2002:a05:6a00:1687:b029:253:f417:4dba with SMTP id k7-20020a056a001687b0290253f4174dbamr2550275pfc.5.1618419940843; Wed, 14 Apr 2021 10:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618419940; cv=none; d=google.com; s=arc-20160816; b=wtP7Eq8LPVPziXpMy7gh98WGlvkfoERIer9XKvczdNjUoq6YlhDhFO9pvztPWJ2TmI KttWqLlcUBNbJsO4B4qs98F6CeYxMTKctOO9q/86KQY8zwvA2D/sWkb0CVTCznmr7+oR PsqoPOVgXuBTuxayF6guZWuyB+KHYmd2mc76y2PV02rUzWCVaWdjO7Ax6kY85sXdoIZ/ 3MjJDTEAoMqmM6BQFY10iE+fZni30qVGtO3iF8RbyVjZLRWmczD8MetNpenWx/EuRb7S yLyDI+toKrA3AVuIs9zILmFwgKW/Xvtxsy8PvMI34AecOdoiZh45Pf7nLM+gQMF0iKgm BgwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NQzmRz1SgfYPiy5PiCbLc0US4QTVYKM0ZTRqQQ8H8rc=; b=rbJ1NsUeF9Z/nQ5FcRbgNH97+JD0t7W8EG7u91QdacdjOMqVXY0ZQWZ9lCFlKFVJgq 4zBDDqgtKkh+9UyQtrIZn9d2kf0ZMnfOcOzrN7s932TBMEaf+M9m6dpbWGBzW9arTaqC q9rTA+M98U7PGiub8lP9VIwM136eoXCOtZabEkXEAdkmoqaCXf5pd91GRwPq8cIZX95f D1FJINGYiQ3CH1mrYwmR4Qht0gfcSY9rhLD9HzMEboHA26DhUBEur+mrB1QuqidtQpPI L+S1MxfzMyPER4J2QnSNUZ6ZpGgC/BJH97iyU1npGr8rekNSFREpztc/3Sd1LiA87oKT I8AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rh+NGnuK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si43145pgc.356.2021.04.14.10.05.20; Wed, 14 Apr 2021 10:05:40 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rh+NGnuK; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232821AbhDNPB6 (ORCPT + 99 others); Wed, 14 Apr 2021 11:01:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232447AbhDNPBz (ORCPT ); Wed, 14 Apr 2021 11:01:55 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 775D1C061574; Wed, 14 Apr 2021 08:01:33 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id v6so30616709ejo.6; Wed, 14 Apr 2021 08:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NQzmRz1SgfYPiy5PiCbLc0US4QTVYKM0ZTRqQQ8H8rc=; b=rh+NGnuKNbhWeF0aC1YJbanhaPJVUOej1hVSdDCIJOrRE/3tu5JIg0S569FT8N62nu 4hBIkfuizskZEryw7ulOujHP7XeoVNcAKAEIJbnQ8kxIWwai+RoCTa+DcAoD4QX8qctP EECnf9W+Mzvl5lvpanBjZ715yEZE0brlC39vjvCWmM2uP4YlsSg8W3fpl14WNV2tVe0N ONvRr1fINu0BFRnCecTS7BqYdM/0Msh6ZSVCXUf/xPuEEdxE7FUnRcTQUFRg+r9l6ycF pi74tCWMDGyLxof13HNVGt2/9FNEegeiWCco7e3QnUexxOOjxgwE47WvyuPRKtgJeOjI XzCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NQzmRz1SgfYPiy5PiCbLc0US4QTVYKM0ZTRqQQ8H8rc=; b=mRIcbBrvjxZR+XPgFbebVZe8lfNIXjERx1/9nXDpalHvQzsRZoD2gfum6Tq6qpwUCw 7B9p8OzI8LDxc6izAIiGpApOFI7IB0D1Y3dDitLoDPRlCHe3hBUhbP8SIcPELhMABxlL HwpgSGKDuD9o1On2UVwf3UYxofolQuapLMbc8nj08MG6Jrb8BeJt1flGu2iBN1jCcQnV 0WJIw04LiPuO4l3/rniTIYjSsyjk3cMxWMBneNUlxTMERSpm/F0jNw36DiYxtA3NHC5b voLgXeB768SPF6B//hC3+dTecSMB8L6kXyZzSZ10LaF8M9gOYGliNGvMoLKISYQnERRX m7nQ== X-Gm-Message-State: AOAM530GoU8Jm2hs4NIt5hTl/hjNS/a/XoGELZOXIh1WjoprJc743+V2 DzsYpuDxPu3uNzvCJgrEdjPp0mEoZGNo1A== X-Received: by 2002:a17:906:b7ce:: with SMTP id fy14mr18392793ejb.261.1618412491855; Wed, 14 Apr 2021 08:01:31 -0700 (PDT) Received: from anparri.mshome.net (host-95-232-15-7.retail.telecomitalia.it. [95.232.15.7]) by smtp.gmail.com with ESMTPSA id c12sm12683393edx.54.2021.04.14.08.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 08:01:31 -0700 (PDT) From: "Andrea Parri (Microsoft)" To: linux-kernel@vger.kernel.org Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, mikelley@microsoft.com, "Andrea Parri (Microsoft)" Subject: [PATCH v2 1/3] Drivers: hv: vmbus: Introduce and negotiate VMBus protocol version 5.3 Date: Wed, 14 Apr 2021 17:01:16 +0200 Message-Id: <20210414150118.2843-2-parri.andrea@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210414150118.2843-1-parri.andrea@gmail.com> References: <20210414150118.2843-1-parri.andrea@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hyper-V has added VMBus protocol version 5.3. Allow Linux guests to negotiate the new version on version of Hyper-V that support it. Signed-off-by: Andrea Parri (Microsoft) --- drivers/hv/connection.c | 3 ++- include/linux/hyperv.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 350e8c5cafa8c..dc19d5ae4373c 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -45,6 +45,7 @@ EXPORT_SYMBOL_GPL(vmbus_proto_version); * Table of VMBus versions listed from newest to oldest. */ static __u32 vmbus_versions[] = { + VERSION_WIN10_V5_3, VERSION_WIN10_V5_2, VERSION_WIN10_V5_1, VERSION_WIN10_V5, @@ -60,7 +61,7 @@ static __u32 vmbus_versions[] = { * Maximal VMBus protocol version guests can negotiate. Useful to cap the * VMBus version for testing and debugging purpose. */ -static uint max_version = VERSION_WIN10_V5_2; +static uint max_version = VERSION_WIN10_V5_3; module_param(max_version, uint, S_IRUGO); MODULE_PARM_DESC(max_version, diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 2c18c8e768efe..d6a6f76040b5f 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -234,6 +234,7 @@ static inline u32 hv_get_avail_to_write_percent( * 5 . 0 (Newer Windows 10) * 5 . 1 (Windows 10 RS4) * 5 . 2 (Windows Server 2019, RS5) + * 5 . 3 (Windows Server 2021) // FIXME: use proper version number/name */ #define VERSION_WS2008 ((0 << 16) | (13)) @@ -245,6 +246,7 @@ static inline u32 hv_get_avail_to_write_percent( #define VERSION_WIN10_V5 ((5 << 16) | (0)) #define VERSION_WIN10_V5_1 ((5 << 16) | (1)) #define VERSION_WIN10_V5_2 ((5 << 16) | (2)) +#define VERSION_WIN10_V5_3 ((5 << 16) | (3)) /* Make maximum size of pipe payload of 16K */ #define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384) -- 2.25.1