mirror of https://gitee.com/openkylin/qemu.git
HMP pull
New gva2gpa command delvm now uses hmp_handle_error so gets Error: prefix in messages -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAlzJe6cACgkQBRYzHrxb /ee5kQ//WLZsP6J5l7wpPdyl+D/8uVEkRKZ/rT90lQWAUwE8vE8YclzO9r9R5vU3 BRVlWu2kujkfqthX9YRjLU6IEYlmTDjPu2D/FAIQTYbjVByfwv/8HLt6YvuRhpbK PvhhfXvpQp9TsaFgHtw4/9QtUDvoNrbTMy43NKtBsCPRD89pA+ChZfC4A8VVjhbi 6wFVm8uKiLxr5rhoIT6G3QHUAAt/v21qxbygl7dYfZF6GyvjbD3l64MHelhHcf2i XiXLAH7uhz18E8XrZKzhUHCQyaMZ41cO4D8uRoYVSzV5k3fvsHpwC9Yb+YB+5pvr qmp8wo9RF14xqE/6DwjNLadRKeV+NxunJDjEz6cEQX0+TzbiaFt8afa80e4gkokS Y8t3IKcucAoxVendIVCkBp9txTudIr8ZiLyyiawuQjcMeExznfoVfJbJR7J7hW88 uLFAe/saUxvL8OcqiVyCMAmAPRm4lRnukchkTierdgz4yGtVYX1FxYc1BPD/kVF1 ETHCnLyYj7U82qpQL90ZLheT9Lky6Qo46u+DMdYzfuDbjre1UN0dSZSnnSndI90n /WYlSJGQB/5PQFPfiO9i83eBKOZvTuDl1wRdv5NrnQv+4KTN2UCn0awcF8nbQfBo yR+OBvKHEp8XRWWXh7MlNKPx0foC7nW7ay9ZCUj6gZrBrkUluxQ= =rKn5 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20190501' into staging HMP pull New gva2gpa command delvm now uses hmp_handle_error so gets Error: prefix in messages # gpg: Signature made Wed 01 May 2019 11:57:43 BST # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-hmp-20190501: hmp: gva2gpa debug command hmp: delvm: use hmp_handle_error Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
37560c259d
|
@ -585,6 +585,21 @@ STEXI
|
||||||
@findex gpa2hpa
|
@findex gpa2hpa
|
||||||
Print the host physical address at which the guest's physical address @var{addr}
|
Print the host physical address at which the guest's physical address @var{addr}
|
||||||
is mapped.
|
is mapped.
|
||||||
|
ETEXI
|
||||||
|
|
||||||
|
{
|
||||||
|
.name = "gva2gpa",
|
||||||
|
.args_type = "addr:l",
|
||||||
|
.params = "addr",
|
||||||
|
.help = "print the guest physical address corresponding to a guest virtual address",
|
||||||
|
.cmd = hmp_gva2gpa,
|
||||||
|
},
|
||||||
|
|
||||||
|
STEXI
|
||||||
|
@item gva2gpa @var{addr}
|
||||||
|
@findex gva2gpa
|
||||||
|
Print the guest physical address at which the guest's virtual address @var{addr}
|
||||||
|
is mapped based on the mapping for the current CPU.
|
||||||
ETEXI
|
ETEXI
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
7
hmp.c
7
hmp.c
|
@ -1480,10 +1480,11 @@ void hmp_delvm(Monitor *mon, const QDict *qdict)
|
||||||
const char *name = qdict_get_str(qdict, "name");
|
const char *name = qdict_get_str(qdict, "name");
|
||||||
|
|
||||||
if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) {
|
if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) {
|
||||||
error_reportf_err(err,
|
error_prepend(&err,
|
||||||
"Error while deleting snapshot on device '%s': ",
|
"deleting snapshot on device '%s': ",
|
||||||
bdrv_get_device_name(bs));
|
bdrv_get_device_name(bs));
|
||||||
}
|
}
|
||||||
|
hmp_handle_error(mon, &err);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
|
void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
|
||||||
|
|
22
monitor.c
22
monitor.c
|
@ -1673,6 +1673,28 @@ static void hmp_gpa2hva(Monitor *mon, const QDict *qdict)
|
||||||
memory_region_unref(mr);
|
memory_region_unref(mr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hmp_gva2gpa(Monitor *mon, const QDict *qdict)
|
||||||
|
{
|
||||||
|
target_ulong addr = qdict_get_int(qdict, "addr");
|
||||||
|
MemTxAttrs attrs;
|
||||||
|
CPUState *cs = mon_get_cpu();
|
||||||
|
hwaddr gpa;
|
||||||
|
|
||||||
|
if (!cs) {
|
||||||
|
monitor_printf(mon, "No cpu\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpa = cpu_get_phys_page_attrs_debug(mon_get_cpu(),
|
||||||
|
addr & TARGET_PAGE_MASK, &attrs);
|
||||||
|
if (gpa == -1) {
|
||||||
|
monitor_printf(mon, "Unmapped\n");
|
||||||
|
} else {
|
||||||
|
monitor_printf(mon, "gpa: %#" HWADDR_PRIx "\n",
|
||||||
|
gpa + (addr & ~TARGET_PAGE_MASK));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_LINUX
|
#ifdef CONFIG_LINUX
|
||||||
static uint64_t vtop(void *ptr, Error **errp)
|
static uint64_t vtop(void *ptr, Error **errp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,7 @@ static const char *hmp_cmds[] = {
|
||||||
"dump-guest-memory /dev/null 0 4096",
|
"dump-guest-memory /dev/null 0 4096",
|
||||||
"dump-guest-memory /dev/null",
|
"dump-guest-memory /dev/null",
|
||||||
"gdbserver",
|
"gdbserver",
|
||||||
|
"gva2gpa 0",
|
||||||
"hostfwd_add tcp::43210-:43210",
|
"hostfwd_add tcp::43210-:43210",
|
||||||
"hostfwd_remove tcp::43210-:43210",
|
"hostfwd_remove tcp::43210-:43210",
|
||||||
"i /w 0",
|
"i /w 0",
|
||||||
|
|
Loading…
Reference in New Issue