From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6jx1-00034B-WC for qemu-devel@nongnu.org; Mon, 14 Jul 2014 13:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6jws-0002xP-F2 for qemu-devel@nongnu.org; Mon, 14 Jul 2014 13:22:07 -0400 Message-ID: <53C411B4.30401@suse.de> Date: Mon, 14 Jul 2014 19:21:56 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1405283775-44571-1-git-send-email-agraf@suse.de> <1405283775-44571-2-git-send-email-agraf@suse.de> <53C3E35E.1080408@ilande.co.uk> In-Reply-To: <53C3E35E.1080408@ilande.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] PPC: Cuda: Use cuda timer to expose tbfreq to guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland , qemu-ppc@nongnu.org Cc: programmingkidx@gmail.com, qemu-devel@nongnu.org On 14.07.14 16:04, Mark Cave-Ayland wrote: > On 13/07/14 21:36, Alexander Graf wrote: > >> Mac OS X calibrates a number of frequencies on bootup based on reading >> tb values on bootup and comparing them to via cuda timer values. >> >> The only variable we can really steer well (thanks to KVM) is the cuda >> frequency. So let's use that one to fake Mac OS X into believing the >> bus frequency is tbfreq * 4. That way Mac OS X will automatically >> calculate the correct timebase frequency. >> >> With this patch and the patch set I posted earlier I can successfully >> run Mac OS X 10.2, 10.3 and 10.4 guests with -M mac99 on TCG and KVM. > > Fantastic! I thought you mentioned before that there was a problem > with the way in which OS X used the MMU which meant it wouldn't be > possible to run under KVM but I guess that has been fixed now? Yes, a patch for that is on the KVM mailing list. I just relocate the instruction pointer "somewhere safe" when in split real mode. Very crude hack, but it works astonishingly well. > Also do any of these changes help any of the *BSDs to boot further? I don't know :). I've never tried to boot *BSD on PPC, so I have no idea where that's broken. Alex