Re: [PATCH] KVM: selftests: Rename vm_open() to __vm_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 12, 2021 at 4:17 PM Krish Sadhukhan
<krish.sadhukhan@xxxxxxxxxx> wrote:
>
>
> On 10/12/21 2:14 PM, Jim Mattson wrote:
> > On Tue, Oct 12, 2021 at 1:43 PM Krish Sadhukhan
> > <krish.sadhukhan@xxxxxxxxxx> wrote:
> >> vm_open() actually creates the VM by opening the KVM device and calling
> >> KVM_CREATE_VM ioctl, so it is semantically more correct to call it
> >> __vm_create().
> > I see no problem with the current semantics, since the KVM_CREATE_VM
> > ioctl *opens* a new VM file descriptor.
>
> Agreed. But the KVM device is also opened for many purposes. For
> example, in kvm_get_supported_cpuid() it is opened for getting CPUID
> stuff.  The purpose of opening the KVM device in this context is to
> create a VM and hence I thought it would be semantically correct to
> rename the function.

You are misinterpreting my response. I said nothing about the  KVM device.

The KVM_CREATE_VM ioctl *opens* a brand-new VM file descriptor. In that sense,
vm_open makes perfect sense.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux