From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhylands@gmail.com (Dave Hylands) Date: Tue, 19 Apr 2011 16:20:19 -0700 Subject: VMA of processes and CPU registers In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi John, On Tue, Apr 19, 2011 at 3:56 PM, limp wrote: > Hi all, > > I know that each user processes has a number of virtual memory areas (VMA) > which consist its (virtual memory) address space. For example cat > /proc/1426/maps will return the (virtual memory) address space of the > process 1426. > > What I don't know for sure is if the actual CPU registers contain the > virtual address of a running process or the "translated" by MMU physical > address. > > I think that every access to a VA must be resolved to a corresponding PA so > I guess the CPU registers will deal with the physical addresses rather than > the virtual ones but I wanted to be sure about it. The CPU registers will contain the virtual addresses. Each and every time that the CPU tries to access a virtual memory location, then the address will be translated by the MMU into a physical address. Generally speaking. the only time you actually deal with physical addresses is when you're setting up the MMU, and when programming hardware (like DMA) which accesses memory without going through the MMU. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com