[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Can't map the page referenced by HVM-DomU CR3 in Dom0


  • To: david <david_n@xxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Tue, 19 Apr 2011 23:14:15 +0100
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 19 Apr 2011 15:15:14 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=QQhZbtA5IZfkLj3kzZpc7UqANT1I5UIyecJfTz2byyXGdDGqZ9/zeT6SFVEOV8DBAU BrD+wIOg9ASgn0cCpiTnDymT3I3XxpV9LRjTvqhPPMPi8ahP9ahTCACpKxjzRmubldMC CJx6v7lOnitLKyKzFbHcBa8ZZgd3pXmzQjqWs=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acv+3x5RqaXX+JfDBEuhVKMMTrRakQ==
  • Thread-topic: [Xen-devel] Can't map the page referenced by HVM-DomU CR3 in Dom0

On 19/04/2011 22:58, "david" <david_n@xxxxxx> 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.