tools: utility to dump guest grant table info
authorDongli Zhang <dongli.zhang@oracle.com>
Sun, 2 Jul 2017 23:34:13 +0000 (07:34 +0800)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 22 Jun 2018 15:38:39 +0000 (16:38 +0100)
commit64fc6eaf724e0d4e1a8eeb86409472fe0b721770
tree71079c80d26b88c7d5a9aac0816f61a5a1d0d27c
parent18351cd148e7c43bdbd4e662032c599bed225008
tools: utility to dump guest grant table info

As both xen-netfront and xen-blkfront support multi-queue, they would
consume a lot of grant table references when there are many paravirtual
devices and vcpus assigned to guest. Guest domU might panic or hang due to
grant allocation failure when nr_grant_frames in guest has reached its max
value.

This utility would help the administrators to diagnose xen issue. There is
only one command gnttab_query_size so far to monitor the guest grant table
frame usage on dom0 side so that it is not required to debug on guest
kernel side for crash/hang analysis anymore.

It is extensible for adding new commands for more diagnostic functions and
the framework of xen-diag.c is from xen-livepatch.c.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
(cherry picked from commit df36d82e3fc91bee2ff1681fd438c815fa324b6a)

Gbp-Pq: Name 0030-tools-utility-to-dump-guest-grant-table-info.patch
tools/misc/Makefile
tools/misc/xen-diag.c [new file with mode: 0644]