From: Steven Hand Subject: Re: What is machine address? Date: Thu, 16 Sep 2004 09:27:58 +0100 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: References: Return-path: In-Reply-To: Message from Chengyuan Li of "Thu, 16 Sep 2004 16:08:52 +0800." Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Chengyuan Li Cc: xen-devel@lists.sourceforge.net, Steven.Hand@cl.cam.ac.uk List-Id: xen-devel@lists.xenproject.org >I find the words "machine->physical mapping" in Xen's source code. >What's the "machine address" ? And what's the difference between >machine address and physical address? Machine address[*] = address of a piece of RAM (starting at 0 and going up to the amount of memory you have in your actual machine). Physical address = address of a piece of memory used by a guest operating system (starting at 0 and going up to the amount of memory you have in that particular virtual machine). Simplified[+] example: your PC has 128Mb of memory. You run 2 virtual machines (domain 0 and domain 1) each with 64Mb of memory. For the guest OS in domain 0, physical addresses = machine addresses. For the guest OS in domain 1, physical address X = machine address 64Mb+X hope this helps, cheers, S. [*] I'm ignoring non RAM machine adresses (e.g. bus addresses) here for simplicitiy. [+] in reality (a) Xen takes some memory so no Guest actually has identical machine and physical addresses (b) the mappings aren't necessarily as simple as that given above - in general any physical page in any guest OS can map to any machine page. This is what the machine-to-phys and phys-to-machine tables are all about. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php