Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1544544pxb; Tue, 8 Feb 2022 21:46:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLG3I/h8EbyztCXC6DXhpy/vN+07oSjKCcsRmL5nRNBwCCbomhu4PJ4K05S7NXDGpxHyQ2 X-Received: by 2002:a17:90b:4a8d:: with SMTP id lp13mr776537pjb.206.1644385605979; Tue, 08 Feb 2022 21:46:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644385605; cv=none; d=google.com; s=arc-20160816; b=w3o65XKH6879K+5lFp/iPeF2h6aJ9oTmzKCu4Twjd0hOjWhgL9IY7rjL10MC5fBqBh bf66Quetd+3LJ4JXI/yXsQOwdxgezsrrZGonvRhWU1fntRVxmAQglpO/0XIeySyTQO0Q j8eCHiIpkXsZ/Qnn8YwZ3CHQeTKmE9yZFwZaUJqQVqYF4ZxOFgXt1/S4NUhaF7eG/dCj Of3PwppO0zMnfBJ54gmiR8DsI3zieMQNhIho0zLmu8D4i/9V1ugpGN1gmdHyKZdDF0Um UboRpdHsvSe5nEe7cXmlQIv4lLtt9ULi3zaE4EAHCH1maPjnIjYxmZlOVkhZ5g+P1cFZ 5ePg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-filter; bh=QMYPts7c7dD+rlJaWW7pjZHqR53IRrbmcgY9kyd0KSE=; b=TGNcTaLnfY5wEIj20BSXf/pZY9qVYB2lbZzxeqa/IXlRWjW1aChUCzEJLSKtXaf/Jy ZrArwScBEPYd8gAJng4ezUjyNRWokOqiaTSevZO27wKJjMSAZHc1uWu+qRRqznNMbv7t bB5R6jeaAaHYuOHr1xBR3tN6IhwCkrlNBYIdzelZ8y45WGAaxBM2pWNOej4/KwIPhxb9 YugwiTdFEAqU7EytN/+fGCBmDPASnSdLL/pVN4+lvnP+y3aIcz4JzY63eh9cRwBftOFA xaag2qJICaUApg48sapmT+BKMQqdQGl6VzhjI5lFhSvxXn04PlmaAtvJO8l0pqi35X2c KTqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WkXj8oQ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 1si4091320pjh.77.2022.02.08.21.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 21:46:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WkXj8oQ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1A7C6C008642; Tue, 8 Feb 2022 21:42:19 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384829AbiBHSYc (ORCPT + 99 others); Tue, 8 Feb 2022 13:24:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384827AbiBHSY3 (ORCPT ); Tue, 8 Feb 2022 13:24:29 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0797BC061576; Tue, 8 Feb 2022 10:24:27 -0800 (PST) Received: from [192.168.1.17] (unknown [192.182.151.181]) by linux.microsoft.com (Postfix) with ESMTPSA id 7F43B20B90CC; Tue, 8 Feb 2022 10:24:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7F43B20B90CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1644344666; bh=QMYPts7c7dD+rlJaWW7pjZHqR53IRrbmcgY9kyd0KSE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WkXj8oQ+bsG5VrIynKlh0LQUSCIhJuYfTkw+ZzaLwGaUGdlx9PQ6ITKwakNa2L8ga tGGebby3r6b56nlMeoRPjoesYxuPlQ54B8zvqENkMllOzeXB/a4eQ2QWQuerhTflFx vfvjHfiGD2ADOcgRAKtFOa00ijb0GQpGtbcBzc88= Message-ID: <5493bb21-7c85-9a8a-07f6-983d1d5c425b@linux.microsoft.com> Date: Tue, 8 Feb 2022 10:24:26 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v2 01/24] drivers: hv: dxgkrnl: Driver initialization and creation of dxgadapter Content-Language: en-US To: Greg KH Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, spronovo@microsoft.com References: <98fe53740526526c4df85a3a3d2e13e88c95f229.1644025661.git.iourit@linux.microsoft.com> From: Iouri Tarassov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_HI,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 Hi Greg, On 2/7/2022 11:20 PM, Greg KH wrote: > On Mon, Feb 07, 2022 at 10:59:25AM -0800, Iouri Tarassov wrote: > > > > On 2/5/2022 12:25 AM, Greg KH wrote: > > > On Fri, Feb 04, 2022 at 06:33:59PM -0800, Iouri Tarassov wrote: > > > > This is the first commit for adding support for a Hyper-V based > > > > vGPU implementation that exposes the DirectX API to Linux userspace. > > > > > > > > > > Only add the interfaces for the changes that you need in this commit. > > > Do not add them all and then use them later, that makes it impossible to > > > review. > > > > > > > --- > > > > MAINTAINERS | 7 + > > > > drivers/hv/Kconfig | 2 + > > > > drivers/hv/Makefile | 1 + > > > > drivers/hv/dxgkrnl/Kconfig | 26 + > > > > drivers/hv/dxgkrnl/Makefile | 5 + > > > > drivers/hv/dxgkrnl/dxgadapter.c | 172 +++ > > > > drivers/hv/dxgkrnl/dxgkrnl.h | 223 ++++ > > > > drivers/hv/dxgkrnl/dxgmodule.c | 736 ++++++++++++ > > > > drivers/hv/dxgkrnl/dxgprocess.c | 17 + > > > > drivers/hv/dxgkrnl/dxgvmbus.c | 578 +++++++++ > > > > drivers/hv/dxgkrnl/dxgvmbus.h | 855 ++++++++++++++ > > > > drivers/hv/dxgkrnl/hmgr.c | 23 + > > > > drivers/hv/dxgkrnl/hmgr.h | 75 ++ > > > > drivers/hv/dxgkrnl/ioctl.c | 24 + > > > > drivers/hv/dxgkrnl/misc.c | 37 + > > > > drivers/hv/dxgkrnl/misc.h | 89 ++ > > > > include/linux/hyperv.h | 16 + > > > > include/uapi/misc/d3dkmthk.h | 1945 +++++++++++++++++++++++++++++++ > > > > 18 files changed, 4831 insertions(+) > > > > > > Would you want to review a 4800 line patch all at once? > > > > > > greg k-h > > > > Hi Greg, > > > > Thank you for reviewing. I appreciate your time. > > > > 1. d3dkmthk.h defines the user mode interface structures. This is ported > > from > >  the windows header at once. Is it acceptable to add it at it is? > > No, again, would you want to be presented with code that is not used at > all? How would you want this to look if you had to review this? Could you recommend a similar in size driver to look how it was first submitted? I looked at the Habanalabs driver submission, which was signed off by you. The commit 1ea2a20e91a4d0543a933b4df706c2585db7e3ae adds 94 header files, without using the definitions.     habanalabs: add Goya registers header files     This patch just adds a lot of header files that contain description of     Goya's registers.     Signed-off-by: Greg Kroah-Hartman How did you review this? I do not see much difference between defining an interface to a virtual device and defining an interface to a hardware device. d3dkmthk.h defines a binary interface to the compute driver. It cannot be changed, because it must be binary compatible with the Windows display graphics model. In my opinion the only thing to review here is the usage of the correct Linux types and coding style. I can submit the file in a dedicated patch. > > 2. dxgvmbus.h defines the VM bus interface between the linux guest and the > > host. > > It was ported from the windows version at once. Is it acceptable to add it > > as it is? > > Again, no. The same here. dxgvmbus.h defines the binary VM bus interface between the host and guest. It must be compatible with the existing interface.It cannot be changed. In my opinion the only thing to review here is the usage of the correct Linux types and coding style. I can submit the file in a dedicated patch. What are you looking to review in these interface? I am trying to avoid unnecessary work, but will do it if it really helps during review. Thanks a lot, Iouri