Skip to contentSkip to conversation

X86/HMP: Expose x86 model specific registers via human monitor

PATCH Eric Blake 2 participants 2 messages Mar 13, 2017 1 message not in the archive

lore
Share & tools
lore

Eric Blake

author
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · Julian Kirsch

Provide read/write access to x86 model specific registers (MSRs) by means of two new HMP commands "msr-get" and "msr-set". The rationale behind this is to improve introspection capabilities for system virtualization mode. For instance, many modern x86-64 operating systems maintain access to internal data structures via the MSR_GSBASE/MSR_KERNELGSBASE MSRs. Giving introspection utilities (such as a remotely attached gdb) a way of accessing these registers improves analysis results drastically.

Changes v1 -> v2:
* Rename HMP commands to "msr-get" and "msr-set"

Most HMP commands still use '_'; it is only QMP where we insist on '-' in new interfaces. (And yes, there's not much rhyme or reason to that other than backwards consistency.)

Quoted 6 lines

* HMP commands Operate on the current default CPU only (removes need for cpu_index argument)
* Remove QMP command alltogether
* Implement HMP command in target/i386/monitor.c
* Add #ifdef TARGET_I386 around msr-get/msr-set in hmp-commands.hx

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#2 lore raw
Quoted 3 lines · Eric Blake

Most HMP commands still use '_'; it is only QMP where we insist on '-' in new interfaces. (And yes, there's not much rhyme or reason to that other than backwards consistency.)

Hi Eric,

sorry, I got confused about the "-"/"_" matter by a comment on an earlier version of the patch set which (as you correctly point out) concerned QMP, not HMP.

Best,
Julian