]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm: create per-vcpu dirs in debugfs
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 16 Sep 2016 14:27:35 +0000 (10:27 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Sep 2016 14:57:47 +0000 (16:57 +0200)
commit45b5939e50746b92fd4cb47c02524f79ba8fabe6
tree2913b6e168819a11ff761d4d5106f89e1c5ae224
parent235539b48a2357da28f52d66d04bec04f3dcb9dd
kvm: create per-vcpu dirs in debugfs

This commit adds the ability for archs to export
per-vcpu information via a new per-vcpu dir in
the VM's debugfs directory.

If kvm_arch_has_vcpu_debugfs() returns true, then KVM
will create a vcpu dir for each vCPU in the VM's
debugfs directory. Then kvm_arch_create_vcpu_debugfs()
is responsible for populating each vcpu directory
with arch specific entries.

The per-vcpu path in debugfs will look like:

/sys/kernel/debug/kvm/29162-10/vcpu0
/sys/kernel/debug/kvm/29162-10/vcpu1

This is all arch specific for now because the only
user of this interface (x86) wants to export x86-specific
per-vcpu information to user-space.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/linux/kvm_host.h
virt/kvm/kvm_main.c