From: Xiaofeng Ling <xiaofeng.ling@intel.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
xen-devel <xen-devel@lists.xensource.com>
Subject: Re: question about page_to_phys
Date: Thu, 01 Sep 2005 17:56:54 +0800 [thread overview]
Message-ID: <4316D066.8010708@intel.com> (raw)
In-Reply-To: <ca96cc44c40fb9aea95586126b73ecc5@cl.cam.ac.uk>
Keir Fraser wrote:
>
> On 1 Sep 2005, at 10:19, Xiaofeng Ling wrote:
>
> If a guest is in translate mode it should have no concept of pseudophys
> vs machine. That translation is hidden from it. Hence there should be
> no need to hack the virtual drivers -- page_to_phys() should naturally
> translate to pseudophys if SHADOW_TRANSLATE is configured.
>
> -- Keir
>
so we need such a patch? but how to deal with virt_to_mfn in blkfront.c?
diff -r 9092486cc4b3 linux-2.6-xen-sparse/include/asm-xen/asm-i386/io.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/io.h
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/io.h
@@ -101,7 +101,11 @@
* Change "struct page" to physical address.
*/
#define page_to_pseudophys(page) ((dma_addr_t)page_to_pfn(page) <<
PAGE_SHIFT)
+#ifndef CONFIG_SHADOW_TRANSLATE
#define page_to_phys(page)
(phys_to_machine(page_to_pseudophys(page)))
+#else
+#define page_to_phys(page) (page_to_pseudophys(page))
+#endif
#define bio_to_pseudophys(bio) (page_to_pseudophys(bio_page((bio))) + \
(unsigned long) bio_offset((bio)))
next prev parent reply other threads:[~2005-09-01 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-01 1:29 question about page_to_phys Xiaofeng Ling
2005-09-01 9:07 ` Keir Fraser
[not found] ` <4316C793.4080501@intel.com>
[not found] ` <ca96cc44c40fb9aea95586126b73ecc5@cl.cam.ac.uk>
2005-09-01 9:56 ` Xiaofeng Ling [this message]
2005-09-01 10:37 ` Keir Fraser
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=4316D066.8010708@intel.com \
--to=xiaofeng.ling@intel.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--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 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.