aboutsummaryrefslogtreecommitdiff
path: root/hmp-commands.hx
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-04-20 15:30:58 +0200
committerDr. David Alan Gilbert <dgilbert@redhat.com>2017-04-26 14:42:31 +0100
commite9628441df3a7aa0ee83601a0cc9111b91e2319a (patch)
treed445f03840af5744dde4181ca5c8b266523b24f5 /hmp-commands.hx
parentdcaed66cbe2803f9378f3a043c2e482bf8035dfd (diff)
hmp: gpa2hva and gpa2hpa hostaddr command
These commands are useful when testing machine-check passthrough. gpa2hva is useful to inject a MADV_HWPOISON madvise from gdb, while gpa2hpa is useful to inject an error with the mce-inject kernel module. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1490021158-4469-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20170420133058.12911-1-pbonzini@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'hmp-commands.hx')
-rw-r--r--hmp-commands.hx32
1 files changed, 32 insertions, 0 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 88192817b2..0aca984261 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -526,6 +526,38 @@ Dump 80 16 bit values at the start of the video memory.
ETEXI
{
+ .name = "gpa2hva",
+ .args_type = "addr:l",
+ .params = "addr",
+ .help = "print the host virtual address corresponding to a guest physical address",
+ .cmd = hmp_gpa2hva,
+ },
+
+STEXI
+@item gpa2hva @var{addr}
+@findex gpa2hva
+Print the host virtual address at which the guest's physical address @var{addr}
+is mapped.
+ETEXI
+
+#ifdef CONFIG_LINUX
+ {
+ .name = "gpa2hpa",
+ .args_type = "addr:l",
+ .params = "addr",
+ .help = "print the host physical address corresponding to a guest physical address",
+ .cmd = hmp_gpa2hpa,
+ },
+#endif
+
+STEXI
+@item gpa2hpa @var{addr}
+@findex gpa2hpa
+Print the host physical address at which the guest's physical address @var{addr}
+is mapped.
+ETEXI
+
+ {
.name = "p|print",
.args_type = "fmt:/,val:l",
.params = "/fmt expr",