Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp42573pxj; Wed, 23 Jun 2021 15:10:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmFPHQECqJblzwtNGB5E8IUU+J7KVnHu7vd/vmBVCqyizQfNwnDp+OEghtFMeahgbZCNVH X-Received: by 2002:a17:907:c0f:: with SMTP id ga15mr2049711ejc.228.1624486209038; Wed, 23 Jun 2021 15:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624486209; cv=none; d=google.com; s=arc-20160816; b=BgJEx8AYox7AvIzOleILEGd08s2NaKuGy6XaXt4M6pI28kKbwTEkT5W4V3nj5gwWDk nFcPey9TMgFbBtbvf0i5BbymYJyB11nXxcif3oIcgN38fFCeQTCKi8epg3I/+BcWlFoG 91dkcbaNp10OeoBPaSvRGCTV4f0kA2hbiKv/CMe7BdwOikmbHTlI22cg3uCS6BfmONGA 1UApBPYEM1INLtqFzDJl/ss8eVhCbxPLBmBns5da3XM8c8S9q7zacSxtwurbkflHj8FR qT4aPNlYJR5cfvoFz7GfNxFkT3bAsMuIulrd8FpzH8E1+kl5U/eNY/jWXzrwEBWBfSCm WMqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=0S1B3tajSDS4jZ66fuyQAE4asiaTTZT2KKBCT5RZ+Tg=; b=01OlBBIt+fUF10SAF70ah+VsrBo0OiCXh0sHX3Ncn62H6+ZXb63VQkDu/bAHsB581G RDjy6KKjsesYx711Wk2y2KyUJ1toWqXIRUOrVVj0CQo4cCMXK8+/y6NpfCQQyfG0aFYh 8VT1pr50+IUdDxC3Z+pu0xmoy0fiOalWKp8xM1iR6DoKxiTQEkaZFaYaIvUyvltveClG hqMrudmSNrgb7NrkH9W6VQ6wpX+y0To9Ac4Iexeje0B7NE4r3XKDymHHX0e5hu/Qyr2g K6gan49nnlUbd4omqZ+IIfwVBNVqd3YLB9rLj4WHol91oaOsyYrFD2gueJYu6+HyirDo Ulnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="dvmAR0/I"; 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=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si692385ejj.366.2021.06.23.15.09.44; Wed, 23 Jun 2021 15:10:09 -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=@linux.microsoft.com header.s=default header.b="dvmAR0/I"; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbhFWWHu (ORCPT + 99 others); Wed, 23 Jun 2021 18:07:50 -0400 Received: from linux.microsoft.com ([13.77.154.182]:59450 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbhFWWHr (ORCPT ); Wed, 23 Jun 2021 18:07:47 -0400 Received: from [10.0.0.178] (c-67-168-106-253.hsd1.wa.comcast.net [67.168.106.253]) by linux.microsoft.com (Postfix) with ESMTPSA id EE18B20B7188; Wed, 23 Jun 2021 15:05:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EE18B20B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1624485929; bh=0S1B3tajSDS4jZ66fuyQAE4asiaTTZT2KKBCT5RZ+Tg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=dvmAR0/Ir1JwoS4pQw0LRF8HnuEJjCmvcHosMXmVGSiyVlVp3CgaglO+GIS1CbcRB ihIT/j0yy+Ws3DhSVymjaqW61bLl2aRoyQ6fIe5Nkcbl781IofmTyGb2RfvHlcB5Ma KDXqsl58OskEywKmdb4BIx8pCSABfSiP/iFiED2k= Subject: Re: [PATCH 03/19] drivers/hv: minimal mshv module (/dev/mshv/) To: Sunil Muthuswamy , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: "virtualization@lists.linux-foundation.org" , Michael Kelley , "viremana@linux.microsoft.com" , "wei.liu@kernel.org" , vkuznets , Lillian Grassin-Drake , KY Srinivasan References: <1622241819-21155-1-git-send-email-nunodasneves@linux.microsoft.com> <1622241819-21155-4-git-send-email-nunodasneves@linux.microsoft.com> From: Nuno Das Neves Message-ID: <323bb12e-82db-d54c-1014-7f0b431ebdd7@linux.microsoft.com> Date: Wed, 23 Jun 2021 15:05:28 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/2/2021 6:28 PM, Sunil Muthuswamy wrote: >> diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig >> index 66c794d92391..d618b1fab2bb 100644 >> --- a/drivers/hv/Kconfig >> +++ b/drivers/hv/Kconfig >> @@ -27,4 +27,22 @@ config HYPERV_BALLOON >> help >> Select this option to enable Hyper-V Balloon driver. >> >> +config HYPERV_ROOT_API > > A more suitable place to put this would be under the "VIRTUALIZATION" > config menu option, where we have the "KVM" option today. > Is Xen also under "VIRTUALIZATION"? >> + tristate "Microsoft Hypervisor root partition interfaces: /dev/mshv" >> + depends on HYPERV >> + help >> + Provides access to interfaces for managing guest virtual machines >> + running under the Microsoft Hypervisor. > > These are technically not "root" interfaces. As you say it too, these are > interfaces to manage guest VMs. Calling it "HYPERV_ROOT_API" would > be confusing. Something along the lines of "HYPERV_VMM_API" or > "HYPERV_VM_API" seems more appropriate to me. > Good point - HYPERV_VMM_API might be better. >> new file mode 100644 >> index 000000000000..c68cc84fb983 >> --- /dev/null >> +++ b/drivers/hv/mshv_main.c > Why not in /virt/hv or something under /virt? > We decided that all the non arch-specific hyperv code should live in drivers/hv. >> +static int mshv_dev_open(struct inode *inode, struct file *filp); >> +static int mshv_dev_release(struct inode *inode, struct file *filp); >> +static long mshv_dev_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg); > > Do we need to have both 'mshv' & 'dev' in the name? How about just > calling these 'mshv_xyz'? Like you have for init/exit. > I wanted a distinction between mshv_* the module, and mshv_dev_* the root device of the module, but I guess it's effectively the same thing. >> + >> +static struct miscdevice mshv_dev = { >> + .minor = MISC_DYNAMIC_MINOR, >> + .name = "mshv", >> + .fops = &mshv_dev_fops, >> + .mode = 600, >> +}; > For the default mode, I think we want to keep it the same as that for 'kvm'. > KVM doesn't specify a mode here. Not sure how it gets set. > - Sunil >