]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86, powerpc: do not allow clearing largepages debugfs entry
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 30 Sep 2019 16:48:44 +0000 (18:48 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 30 Sep 2019 16:52:00 +0000 (18:52 +0200)
commit8bff0f10e71d977f5701e2063e1c740841976375
tree3587bb045750f3a8163657a5302dac6bc7324a7d
parent4951b598c3ce295720e97bed59ae961efa09ed66
kvm: x86, powerpc: do not allow clearing largepages debugfs entry

The largepages debugfs entry is incremented/decremented as shadow
pages are created or destroyed.  Clearing it will result in an
underflow, which is harmless to KVM but ugly (and could be
misinterpreted by tools that use debugfs information), so make
this particular statistic read-only.

Cc: kvm-ppc@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/powerpc/kvm/book3s.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c