From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H5QOg-0001ei-BA for qemu-devel@nongnu.org; Fri, 12 Jan 2007 12:40:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H5QOf-0001eE-Kv for qemu-devel@nongnu.org; Fri, 12 Jan 2007 12:40:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H5QOf-0001eB-Hn for qemu-devel@nongnu.org; Fri, 12 Jan 2007 12:40:57 -0500 Received: from [70.168.83.80] (helo=centrmmtao04.cox.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H5QOf-0003xX-6R for qemu-devel@nongnu.org; Fri, 12 Jan 2007 12:40:57 -0500 Received: from eastrmimpo02.cox.net ([68.1.16.120]) by centrmmtao04.cox.net (InterMail vM.6.01.06.03 201-2131-130-104-20060516) with ESMTP id <20070112174055.ERCG5993.centrmmtao04.cox.net@eastrmimpo02.cox.net> for ; Fri, 12 Jan 2007 12:40:55 -0500 Message-ID: <7086895.1168623655500.JavaMail.root@eastrmwml03.mgt.cox.net> Date: Fri, 12 Jan 2007 12:40:55 -0500 From: Ben Taylor MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_90756_4013873.1168623654969" Subject: [Qemu-devel] Solaris kqemu patch Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qemu-devel@nongnu.org ------=_Part_90756_4013873.1168623654969 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit This patch allows for the opensolaris kqemu module to be activated under a Solaris Express (11) host running qemu. The solaris kqemu module is located at: http://www.opensolaris.org/os/project/qemu/downloads/kqemu-osol-1.3.0pre9-v0.2.tar.gz ------=_Part_90756_4013873.1168623654969 Content-Type: text/x-patch; name=sol-kqemu.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=sol-kqemu.patch diff -ruN qemu-base/configure qemu/configure --- qemu-base/configure 2007-01-05 16:25:54.000000000 -0500 +++ qemu/configure 2007-01-12 12:14:34.352357000 -0500 @@ -151,6 +151,11 @@ make="gmake" install="ginstall" solarisrev=`uname -r | cut -f2 -d.` + if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then + if test "$solarisrev" -gt 10 ; then + kqemu="yes" + fi + fi fi # find source path diff -ruN qemu-base/kqemu.c qemu/kqemu.c --- qemu-base/kqemu.c 2006-10-02 13:58:33.000000000 -0400 +++ qemu/kqemu.c 2007-01-12 12:08:02.935409000 -0500 @@ -26,6 +26,9 @@ #include #include #endif +#ifdef HOST_SOLARIS +#include +#endif #include #include #include diff -ruN qemu-base/osdep.c qemu/osdep.c --- qemu-base/osdep.c 2006-08-17 12:19:07.000000000 -0400 +++ qemu/osdep.c 2007-01-12 12:16:19.137607000 -0500 @@ -27,6 +27,10 @@ #include #include #include +#ifdef HOST_SOLARIS +#include +#include +#endif #include "cpu.h" #if defined(USE_KQEMU) @@ -86,13 +90,22 @@ const char *tmpdir; char phys_ram_file[1024]; void *ptr; +#ifdef HOST_SOLARIS + struct statvfs stfs; +#else struct statfs stfs; +#endif if (phys_ram_fd < 0) { tmpdir = getenv("QEMU_TMPDIR"); if (!tmpdir) +#ifdef HOST_SOLARIS + tmpdir = "/tmp"; + if (statvfs(tmpdir, &stfs) == 0) { +#else tmpdir = "/dev/shm"; if (statfs(tmpdir, &stfs) == 0) { +#endif int64_t free_space; int ram_mb; ------=_Part_90756_4013873.1168623654969--