arm64: ptdump: debugfs registration with ptdump_info_cb
When KVM is in protected mode, the hypervisor handles the stage-2
page-table. The only way to safely read from the kernel those
page-tables is for the hypervisor to do a copy beforehand (of course
that is only allowed under a debug option). Therefore, ptdump_info,
which will point to the copy of the page-table, must be allocated
dynamically and only once the file is open.
To that end, create a new interface where the caller must provide
a set of callbacks that will be called before each page-table walk.
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2 files changed