From: Goswin von Brederlow Subject: Re: Confused about start of day setup Date: Mon, 24 Sep 2007 20:47:36 +0200 Message-ID: <87fy13yk6v.fsf@informatik.uni-tuebingen.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Keir Fraser's message of "Mon, 24 Sep 2007 17:53:09 +0100") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com, Goswin von Brederlow List-Id: xen-devel@lists.xenproject.org Keir Fraser writes: > On 23/9/07 06:29, "Goswin von Brederlow" > wrote: > >> Now here is an example output of this loop: >> >> ERROR: -22 pinning failed: addr = 90000 [212000], op = 0, mfn = 212 >> ERROR: -22 pinning failed: addr = 91000 [0], op = 0, mfn = 0 >> ERROR: -22 pinning failed: addr = 92000 [b3d5000], op = 0, mfn = b3d5 >> ERROR: -22 pinning failed: addr = 93000 [2000], op = 0, mfn = 2 >> ERROR: -22 pinning failed: addr = 96000 [2000], op = 0, mfn = 2 >> ERROR: -22 pinning failed: addr = 97000 [1000000], op = 0, mfn = 1000 >> ERROR: -22 pinning failed: addr = 98000 [0], op = 0, mfn = 0 >> ERROR: -22 pinning failed: addr = 99000 [1000], op = 0, mfn = 1 >> ERROR: -22 pinning failed: addr = 9a000 [0], op = 0, mfn = 0 > > The [phys] values look screwed. There are duplicates and many are 0! So it > looks rather like your p2m lookup logic is broken somehow. > > -- Keir I can't fathom what could be wrong with this: unsigned long *phys_to_machine_mapping; phys_to_machine_mapping = (unsigned long *)start_info.mfn_list; machine_address = phys_to_machine_mapping[(addr - VIRT_START) >> PAGE_SHIFT] << PAGE_SHIFT; The code is too simple and it works for all other pages outside that one range. No I don't think it is this piece of code. But if there is nothing to be there than the data itself must be corrupt. Although I can't think of anything that could be overwriting that phys_to_machine_mapping array. Maybe I could hack the domain creator to map the array read-only and see if I get a segfault? MfG Goswin