Bug 705831

Summary: add "xm debug-keys"
Product: Red Hat Enterprise Linux 5 Reporter: Paolo Bonzini <pbonzini>
Component: xenAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: drjones, jzheng, leiwang, mrezanin, qwan, xen-maint, yuzhang, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xen-3.0.3-133.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 05:55:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 699611    

Description Paolo Bonzini 2011-05-18 16:00:33 UTC
Description of problem:
I found out that we have code to support "xm debug-keys hhh" (same as ^A^A^A-hhh-^A^A^A) in the hypervisor, but not in the userspace because the patch was added in 3.1 time.

This can be quite useful when working on machines without a serial console (for example to print VMCBs/VMCSs, to hard reboot the machine, to dump physical CPU stacks).

Additional info:
This is implemented by c/s 14309.

Comment 4 Qixiang Wan 2011-12-05 07:33:17 UTC
Verified with xen-3.0.3-135.el5. The userspace support for sending debug keys works now after the fix.

example:

# xm debug-keys h

# xm dmesg
...
(XEN) 'h' pressed -> showing installed handlers
(XEN)  key '%' (ascii '25') => Trap to xendbg
(XEN)  key 'C' (ascii '43') => trigger a crashdump
(XEN)  key 'H' (ascii '48') => dump heap info
(XEN)  key 'N' (ascii '4e') => NMI statistics
(XEN)  key 'R' (ascii '52') => reboot machine
(XEN)  key 'a' (ascii '61') => dump timer queues
(XEN)  key 'd' (ascii '64') => dump registers
(XEN)  key 'h' (ascii '68') => show this message
(XEN)  key 'i' (ascii '69') => dump interrupt bindings
(XEN)  key 'm' (ascii '6d') => memory info
(XEN)  key 'n' (ascii '6e') => trigger an NMI
(XEN)  key 'q' (ascii '71') => dump domain (and guest debug) info
(XEN)  key 'r' (ascii '72') => dump run queues
(XEN)  key 't' (ascii '74') => display multi-cpu clock info
(XEN)  key 'u' (ascii '75') => dump numa info
(XEN)  key 'v' (ascii '76') => dump Intel's VMCS
(XEN)  key 'z' (ascii '7a') => print ioapic info

# xm debug-keys m

# xm dmesg
...
(XEN) Physical memory information:
(XEN)     Xen heap: 13956kB free
(XEN)     heap[08]: 968kB free
(XEN)     heap[09]: 2048kB free
(XEN)     heap[10]: 4096kB free
(XEN)     heap[11]: 8192kB free
(XEN)     heap[12]: 16384kB free
(XEN)     heap[13]: 32768kB free
(XEN)     heap[14]: 65536kB free
(XEN)     heap[15]: 131072kB free
(XEN)     heap[16]: 63544kB free
(XEN)     heap[17]: 2948kB free
(XEN)     heap[19]: 2020kB free
(XEN)     DMA heap: 329576kB free
(XEN)     heap[21]: 63508kB free
(XEN)     Dom heap: 63508kB free

Comment 5 errata-xmlrpc 2012-02-21 05:55:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0160.html