From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 21 Jun 2015 23:32:53 +0200 From: David du Colombier <0intro@gmail.com> To: 9fans@9fans.net Message-ID: <20150621233253.1d74c860@zinc.9fans.fr> In-Reply-To: References: 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: 5a11bf34-ead9-11e9-9d60-3106f5b1d025 > 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