diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2016-09-16 17:27:35 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-16 17:57:47 +0300 |
commit | 45b5939e50746b92fd4cb47c02524f79ba8fabe6 (patch) | |
tree | 2913b6e168819a11ff761d4d5106f89e1c5ae224 /include/linux/kvm_host.h | |
parent | 235539b48a2357da28f52d66d04bec04f3dcb9dd (diff) | |
download | linux-45b5939e50746b92fd4cb47c02524f79ba8fabe6.tar.xz |
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>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 5486ff9aa71e..01c0b9cc3915 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -265,6 +265,7 @@ struct kvm_vcpu { #endif bool preempted; struct kvm_vcpu_arch arch; + struct dentry *debugfs_dentry; }; static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu) |