From: Keir Fraser <keir.xen@gmail.com>
To: david <david_n@gmx.at>
Cc: xen-devel@lists.xensource.com
Subject: Re: Can't map the page referenced by HVM-DomU CR3 in Dom0
Date: Tue, 19 Apr 2011 23:14:15 +0100 [thread overview]
Message-ID: <C9D3C7C7.16A1B%keir.xen@gmail.com> (raw)
In-Reply-To: <4DAE056C.30108@gmx.at>
On 19/04/2011 22:58, "david" <david_n@gmx.at> wrote:
>> xc_translate_foreign_address() will convert a guest virtual address into a
>> guest physical address. It's not working out for you because guest cr3
>> values are already guest physical addresses. Thus the virtual-to-physical
>> conversion you subject the values to is meaningless.
>
> ahhh, .. I see. I thought the translation is between guest physical and
> real physical address.
The toolstack deals entirely with guest physical addresses for HVM guests.
There's actually no way, and no need, to find out the underlying real
physical addresses.
> The way to calculate the correct physical frame
> number is cr3 >> PAGE_SHIFT corresponding to xen_cr3_to_pfn(cr3) in
> public/arch-x86/xen-x86_64.h, right?
Yes, although strictly speaking the xen_cr3_to_pfn() macro is intended to be
used only with PV guests' cr3 values (the x86_32 version of that macro is
not suitable for use with HVM cr3 values). Consider an HVM guest in 32-bit
PAE mode -- its CR3 value may not be page aligned.
-- Keir
prev parent reply other threads:[~2011-04-19 22:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 13:45 Can't map the page referenced by HVM-DomU CR3 in Dom0 david
2011-04-18 9:34 ` Tim Deegan
2011-04-19 15:44 ` david
2011-04-19 16:26 ` Keir Fraser
2011-04-19 21:58 ` david
2011-04-19 22:14 ` Keir Fraser [this message]
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=C9D3C7C7.16A1B%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=david_n@gmx.at \
--cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).