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)
commit833b45de69a6016c4b0cebe6765d526a31a81580
tree3587bb045750f3a8163657a5302dac6bc7324a7d
parent2e4a75976dfb88ee6ce019b1d4fa507aabd02c14
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