Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5560461rwi; Tue, 18 Oct 2022 00:23:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Qx6b34C8kHc3VHr7Ba5H/X7GV9PtTfOaHjYOMDYl4g/hrQ4HcJyE0DR6Uc0siSH5uPXmk X-Received: by 2002:a17:907:724d:b0:78d:acf4:4c57 with SMTP id ds13-20020a170907724d00b0078dacf44c57mr1278837ejc.516.1666077821883; Tue, 18 Oct 2022 00:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666077821; cv=none; d=google.com; s=arc-20160816; b=oSEN2rDpki7qmXOuCckS/X9IoNjw2BV33oTsgtmYlgfuTys+7BhfKHcYO/HPPMjTy9 rWM5CXv1cc2g6GK4eQ3Oqrz4L9PlGzRqQaOcbYlwVER740yt+CXbrsvEa61c/H21PSIW cj08H2tv2pTxMmu5zS5Mmtkwtn8WwHYScizoy2Q54sZDJ7Szycz3kSGTtK4mu0uF5s5A b/SRUDRDdPaPTKzKbwooTT9FKAebfp7uxXbd92cL4K0WJtcb5bXqzHl/iIs2bSqOOV0g ked7Y088XRI+rtU8pKUanmJUysprNjBpkpoL6HGULtGmv12HvvSYjGnC9fQMbJaXKFs/ hetw== 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:dkim-signature; bh=2pM6wxJMkmKW6FwE4nA3ispfKOcxEN1pf3zt8eQvqEo=; b=BWq6fllDf/4n4K+/59epPlVNXxpF/lOXWCiytcrwSNBs3bH3X5DGIMolVfO5GtOnhR ANjA1B9xfcAHqxNoe4FM2J4idxgaPQW9ioL7D4LSKrvFlfLeg1sMXTdv65EA63goNK+v rTN0IgwqFh1W9feQBNVMQkTYVt3jEBKKq2liVUBibgAA4tOnqh3XkohMaNze3KK1ZVqA 4XAvdX90xa+Gg7yGFoMF2JyGT5BASXrNXA0rBTP5KGzithp7e/rKj1fLM2VDLISdVYnM Z51tpaQ7AYZkT12yCJDH6/13gXYMDD8G9OSOT/qbf4dDVyCzcCJwYq5NuebSK0oiYC0E SO/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="t/gIVIjx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf38-20020a1709077f2600b0078db5170767si11901680ejc.18.2022.10.18.00.23.01; Tue, 18 Oct 2022 00:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="t/gIVIjx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230028AbiJRHFK (ORCPT + 99 others); Tue, 18 Oct 2022 03:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbiJRHFB (ORCPT ); Tue, 18 Oct 2022 03:05:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 332E85C341; Tue, 18 Oct 2022 00:05:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 95DB561488; Tue, 18 Oct 2022 07:04:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9233C433C1; Tue, 18 Oct 2022 07:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666076699; bh=iGNsRA8td5VnSldmVTeh32Adr/l+fdhF5KrC+Q6jKpM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t/gIVIjx55gOOrC5O6DF4M/L2SFRXc9NHokBzVG90UlKOJNOkQa1ClHrhfm4hX0K1 WH7nmxfW5RJk6WbZKcIZN9s+LqvrfUUEy1A1CIVbMtiUDJZFZBVPzDQrhJmJbh8m0/ CMmW4IHShI2Uh7Dr0XnTakpl5VvOUdjxMZVq9ErA= Date: Tue, 18 Oct 2022 09:04:56 +0200 From: Greg KH To: Long Li Cc: Saurabh Sengar , Saurabh Singh Sengar , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu@kernel.org" , Dexuan Cui , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Michael Kelley (LINUX)" Subject: Re: [PATCH] uio_hv_generic: Enable interrupt for low speed VMBus devices Message-ID: References: <1665685754-13971-1-git-send-email-ssengar@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2022 at 06:57:33AM +0000, Long Li wrote: > > Subject: Re: [PATCH] uio_hv_generic: Enable interrupt for low speed VMBus > > devices > > > > On Tue, Oct 18, 2022 at 06:31:16AM +0000, Long Li wrote: > > > > Subject: Re: [PATCH] uio_hv_generic: Enable interrupt for low speed > > > > VMBus devices > > > > > > > > On Thu, Oct 13, 2022 at 11:29:14AM -0700, Saurabh Sengar wrote: > > > > > Hyper-V is adding some "specialty" synthetic devices. > > > > > > > > What devices are those specifically? > > > > > > > > > Instead of writing new kernel-level VMBus drivers for these > > > > > devices, the devices will be presented to user space via this > > > > > existing Hyper-V generic UIO driver, so that a user space driver can > > handle the device. > > > > > Since these new synthetic devices are low speed devices, they > > > > > don't support monitor bits and we must use vmbus_setevent() to > > > > > enable interrupts from the host. > > > > > > > > That is not what the UIO interface is for. Please write real > > > > drivers so that they tie into the specific user/kernel apis for those device > > types. > > > > > > > > Without a specific list of what these devices are, I can not > > > > recommend that anyone use the UIO api for them as that's probably not > > a good idea. > > > > > > There are some VMBUS drivers currently not implemented in Linux. Out > > > of all VMBUS drivers, two use "monitored bits": they are network and > > storage drivers. > > > All the rest VMBUS drivers use hypercall for host notification and > > > signal for next interrupt. One example of such driver is to collect > > > process level crash information for diagnostic purposes. > > > > > > Also, we want to move some existing kernel mode VMBUS drivers to > > > user-space, such as hv_kvp and hv_filecopy. They don't really fit into > > > an existing kernel API, and they create their own devices under /dev > > > and communicates with a user-mode daemon to do most of the work. It's > > > a better model that we can move those drivers entirely into user-mode. > > > > How are you going to be able to remove drivers that export an existing > > user/kernel api and not break current systems? > > It will be some configuration challenges, but it's doable. How exactly? We can not break userspace when you upgrade a kernel version. > Newer Linux > VMs can be configured in a way to use the UIO interfaces. This doesn't break > any existing VMs because the old model will continue to work when UIO is not > used. Also, this doesn't require any Hyper-V changes. Hyper-v changes are not the issue here :) Again, you have to support the situation where a system upgrades to a new kernel and all the same functionality must be there. How will you do that if you remove drivers from a newer kernel? > > UIO is for mmaped memory regions, like PCI devices, how is this a valid > > Hyper-V api at all? > > Currently uio_hv_generic is used to mmap VMBUS ring buffers to user-mode. > The primary use case is for DPDK. However, the same mmap model can be > used for all other VMBUS devices, as they all use the same ring buffers model. Ok, that feels like overkill... You need to also post the source for these new userspace drivers somewhere for us to review. I don't see a link to them in the changelog text :( thanks, greg k-h