From e9628441df3a7aa0ee83601a0cc9111b91e2319a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 20 Apr 2017 15:30:58 +0200 Subject: 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 Message-Id: <1490021158-4469-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini Message-Id: <20170420133058.12911-1-pbonzini@redhat.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'hmp-commands.hx') diff --git a/hmp-commands.hx b/hmp-commands.hx index 88192817b2..0aca984261 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -523,6 +523,38 @@ Dump 80 16 bit values at the start of the video memory. 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 @end smallexample @end itemize +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 { -- cgit v1.2.3