[Qemu-devel] Solaris kqemu patch

2007-01-12 Thread Ben Taylor

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

diff -ruN qemu-base/configure qemu/configure
--- qemu-base/configure	2007-01-05 16:25:54.0 -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.0 -0400
+++ qemu/kqemu.c	2007-01-12 12:08:02.935409000 -0500
@@ -26,6 +26,9 @@
 #include sys/mman.h
 #include sys/ioctl.h
 #endif
+#ifdef HOST_SOLARIS
+#include sys/modctl.h
+#endif
 #include stdlib.h
 #include stdio.h
 #include stdarg.h
diff -ruN qemu-base/osdep.c qemu/osdep.c
--- qemu-base/osdep.c	2006-08-17 12:19:07.0 -0400
+++ qemu/osdep.c	2007-01-12 12:16:19.137607000 -0500
@@ -27,6 +27,10 @@
 #include string.h
 #include errno.h
 #include unistd.h
+#ifdef HOST_SOLARIS
+#include sys/types.h
+#include sys/statvfs.h
+#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;
 
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] monitor help menu paging?

2007-01-12 Thread Ben Taylor

Anyone think that the monitor help screen ought to implement some kind of paging
(think more) or something?  I did a help, and half of the help is off the 
screen before 
I can figure out what I'm looking for (and apparently what I'm looking for is 
already 
scrolled off).

THoughts?

Ben


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] [PATCH] -parallel and -serial on Windows host - second try

2007-01-12 Thread alex
This is a second attempt to post, first one did not get through.

This patch fixes -parallel and -serial options work with TCP targets on
Windows host.

Alex.

--- /d/qemu/vl.c Fri Jan 12 10:43:12 2007
+++ vl.c Fri Jan 12 10:49:37 2007
@@ -2692,8 +2692,13 @@
 if (ret  0) {
 err = socket_error();
 if (err == EINTR || err == EWOULDBLOCK) {
+#ifndef _WIN32
 } else if (err == EINPROGRESS) {
 break;
+#else
+} else if (err == EINPROGRESS | err == WSAEALREADY) {
+break;
+#endif
 } else {
 goto fail;
 }
@@ -2708,7 +2713,6 @@
 else
 qemu_set_fd_handler(s-fd, NULL, tcp_chr_connect, chr);
 }
-
 if (is_listen  is_waitconnect) {
 printf(QEMU waiting for connection on: %s\n, host_str);
 tcp_chr_accept(chr);






___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel