]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Get an fd before creating the VM
authorOliver Upton <oupton@google.com>
Wed, 20 Jul 2022 09:22:49 +0000 (09:22 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Aug 2022 19:08:27 +0000 (15:08 -0400)
commit4eb053984141bc9ba1aef3ad48b797694bab1df5
tree6dce7aba27c5e28407d732d685c909505f6672d5
parentde27bd348c8f60c4bbeafcf8b9066e4055188623
KVM: Get an fd before creating the VM

Allocate a VM's fd at the very beginning of kvm_dev_ioctl_create_vm() so
that KVM can use the fd value to generate strigns, e.g. for debugfs,
when creating and initializing the VM.

Signed-off-by: Oliver Upton <oupton@google.com>
Message-Id: <20220720092259.3491733-4-oliver.upton@linux.dev>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c