lkml.org 
[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 03/19] drivers/hv: minimal mshv module (/dev/mshv/)
Date
> 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.

> + 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.

> new file mode 100644
> index 000000000000..c68cc84fb983
> --- /dev/null
> +++ b/drivers/hv/mshv_main.c
Why not in /virt/hv or something under /virt?

> +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.

> +
> +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'.

- Sunil

\
 
 \ /
  Last update: 2021-06-03 03:29    [W:0.192 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site