From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1da684cfe23ffc1ad92ffebc6837646b@9netics.com> To: 9fans@9fans.net Date: Sun, 21 Jun 2015 15:02:15 -0700 From: Skip Tavakkolian <9nut@9netics.com> In-Reply-To: <20150621233253.1d74c860@zinc.9fans.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] compiling xen3 with more recent pc kernel Topicbox-Message-UUID: 5a197b70-ead9-11e9-9d60-3106f5b1d025 thanks. i saw the note and was wondering if for xen3 it could be stubbed out. >> i had to make the following changes to the kernel for xen3 to match up >> to recent labs pc kernel and to compile successfully. can anyone >> verify the changes are correct? (i could to a smoke test on EC2, but >> don't feel adventurous at the moment) > > The evenaddr function in trap.c should be replaced by validalign: > > void > validalign(uintptr addr, unsigned align) > { > /* > * Plan 9 is a 32-bit O/S, and the hardware it runs on > * does not usually have instructions which move 64-bit > * quantities directly, synthesizing the operations > * with 32-bit move instructions. Therefore, the compiler > * (and hardware) usually only enforce 32-bit alignment, > * if at all. > * > * Take this out if the architecture warrants it. > */ > if(align == sizeof(vlong)) > align = sizeof(long); > > /* > * Check align is a power of 2, then addr alignment. > */ > if((align != 0 && !(align & (align-1))) && !(addr & (align-1))) > return; > postnote(up, 1, "sys: odd address", NDebug); > error(Ebadarg); > /*NOTREACHED*/ > } > > This is a change done by Jim McKie on 2014-05-15. > > -- > David du Colombier