From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: "Zheng, Jiajia" <jiajia.zheng@intel.com>
Cc: "lmr@redhat.com" <lmr@redhat.com>,
"Li, Haicheng" <haicheng.li@intel.com>,
Max Asbock <masbock@linux.vnet.ibm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"You, Yongkang" <yongkang.you@intel.com>,
"avi@redhat.com" <avi@redhat.com>,
"Kleen, Andi" <andi.kleen@intel.com>
Subject: Re: [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address.
Date: Wed, 27 Jan 2010 15:39:22 -0600 [thread overview]
Message-ID: <4B60B28A.40400@linux.vnet.ibm.com> (raw)
In-Reply-To: <DA586906BA1FFC4384FCFD6429ECE86035293492@shzsmsx502.ccr.corp.intel.com>
On 01/26/2010 09:25 PM, Zheng, Jiajia wrote:
> Add command p2v to translate Guest physical address to Host virtual address.
>
For what purpose?
> Signed-off-by: Max Asbock<masbock@linux.vnet.ibm.com>
> Jiajia Zheng<jiajia.zheng@intel.com>
> ---
> diff --git a/monitor.c b/monitor.c
> index b33b01f..83d9ac7 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -668,6 +668,11 @@ static void do_info_uuid(Monitor *mon, QObject **ret_data)
> *ret_data = qobject_from_jsonf("{ 'UUID': %s }", uuid);
> }
>
> +static void do_info_p2v(Monitor *mon)
> +{
> + monitor_printf(mon, "p2v implemented\n");
> +}
>
These should be implemented as QMP commands.
> /* get the current CPU defined by the user */
> static int mon_set_cpu(int cpu_index)
> {
> @@ -2283,6 +2288,14 @@ static void do_inject_mce(Monitor *mon, const QDict *qdict)
> break;
> }
> }
> +static void do_p2v(Monitor *mon, const QDict *qdict)
> +{
> + target_long size = 4096;
> + target_long addr = qdict_get_int(qdict, "addr");
> +
> + monitor_printf(mon, "Guest physical address %p is mapped at host virtual address %p\n", (void *)addr, cpu_physical_memory_map( (target_phys_addr_t)addr, (target_phys_addr_t *)&size, 0));
>
This isn't quite right. It assumes TARGET_PAGE_SIZE is 4k which is
certainly not always true. It also assumes that
cpu_physical_memory_map() something that has some meaning which isn't
necessarily the case. It could be a pointer to a bounce buffer.
Could you give an end-to-end description of how you expect this
mechanism to be used so we can work out a more appropriate set of
interfaces. I assume this is MCE related.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2010-01-27 21:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 3:25 [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address Zheng, Jiajia
2010-01-27 21:39 ` Anthony Liguori [this message]
2010-01-27 22:31 ` Max Asbock
2010-02-03 4:04 ` Zheng, Jiajia
2010-02-03 13:41 ` Anthony Liguori
2010-02-03 14:11 ` Kleen, Andi
2010-02-03 14:23 ` Anthony Liguori
2010-02-03 15:29 ` Lucas Meneghel Rodrigues
2010-02-03 15:49 ` Kleen, Andi
2010-02-03 16:14 ` Anthony Liguori
2010-02-05 2:07 ` Zheng, Jiajia
2010-02-07 14:03 ` Avi Kivity
2010-02-07 16:23 ` Anthony Liguori
2010-02-07 16:31 ` Avi Kivity
2010-02-07 22:09 ` Anthony Liguori
2010-02-08 3:38 ` Zheng, Jiajia
2010-02-08 8:43 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B60B28A.40400@linux.vnet.ibm.com \
--to=aliguori@linux.vnet.ibm.com \
--cc=andi.kleen@intel.com \
--cc=avi@redhat.com \
--cc=haicheng.li@intel.com \
--cc=jiajia.zheng@intel.com \
--cc=lmr@redhat.com \
--cc=masbock@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=yongkang.you@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.