Re: [Qemu-devel] Slow clock in guest OS

2008-01-25 Thread Sergey Bychkov
- Original Message - From: Mulyadi Santosa [EMAIL PROTECTED] To: qemu-devel@nongnu.org Sent: 25.01.2008 5:11 I can't understand why clock in guest OS (Windows 2003) goes very slow. Are you sure the rtc freq has been made to 1024? # cat /proc/sys/dev/rtc/max-user-freq should yield

Re: [Qemu-devel] Slow clock in guest OS

2008-01-25 Thread Mulyadi Santosa
Hi... On Jan 25, 2008 6:51 PM, Sergey Bychkov [EMAIL PROTECTED] wrote: Yes, it helps, in some extent. With rtc/max-user-freq set to 1024 and -clock rtc option VM now works like in 0.8.2 version. Clock is slower than in host, but Windows Time server could correct this, if started. Busy host

[Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Laurent Vivier
Hi, this patch allows to mount qemu disk images on the host. It is based on the Network Block Device protocol and allows qemu-img to become an NBD server (Yes, Anthony, userspace block device is the right way to do that... :-P ). Once you've applied the attached patch to Qemu and build the

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Ian Jackson
Paul Brook writes (Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target): Huh? No it doesn't. config-host.mak contains CPPFLAGS= then Makefile.target contains CPPFLAGS+=whatever It doesn't seem to on my build. Why don't you just put your custom flags in CFLAGS, not CPPFLAGS? The former

Re: [Qemu-devel] [PATCH] Allow AF_UNIX sockets to be disabled on non-Windows

2008-01-25 Thread Johannes Schindelin
Hi, On Fri, 25 Jan 2008, Ian Jackson wrote: But when the existing code says } #ifndef _WIN32 if (strstart(display, unix:, p)) { addr = (struct sockaddr *)uaddr; addrlen = sizeof(uaddr); etc. then changing it to something like #if !(defined(_WIN32)

[Qemu-devel] qemu/hw iommu.c

2008-01-25 Thread Blue Swirl
CVSROOT:/cvsroot/qemu Module name:qemu Changes by: Blue Swirl blueswir1 08/01/25 19:52:55 Modified files: hw : iommu.c Log message: Add TurboSPARC mask ID register (Robert Reif) CVSWeb URLs:

[Qemu-devel] qemu/hw slavio_timer.c

2008-01-25 Thread Blue Swirl
CVSROOT:/cvsroot/qemu Module name:qemu Changes by: Blue Swirl blueswir1 08/01/25 19:51:27 Modified files: hw : slavio_timer.c Log message: User timer limit fixes (Robert Reif) CVSWeb URLs:

Re: [Qemu-devel] [PATCH] hw/slavio_timer.c user timer mode change fix

2008-01-25 Thread Robert Reif
Blue Swirl wrote: On 1/23/08, Robert Reif [EMAIL PROTECTED] wrote: Change ptimer limit only when mode changes. Update timer configuration register user timer bits properly. The patch does not apply. It should apply on top of the first user timer patch that is in CVS now.

Re: [Qemu-devel] [PATCH] hw/sun4m.c fix power addresses

2008-01-25 Thread Blue Swirl
On 1/25/08, Robert Reif [EMAIL PROTECTED] wrote: Blue Swirl wrote: On 1/24/08, Robert Reif [EMAIL PROTECTED] wrote: diff -p -u -r1.81 sun4m.c This breaks my tests, so I guess a fix is also needed for OpenBIOS. Probably, they were tested using ss5/170 and ss10 openboot images.

Re: [Qemu-devel] [PATCH] hw/slavio_timer.c user timer mode change fix

2008-01-25 Thread Robert Reif
Rediffed against cvs. diff -p -u -r1.29 slavio_timer.c --- hw/slavio_timer.c 25 Jan 2008 19:51:27 - 1.29 +++ hw/slavio_timer.c 25 Jan 2008 21:50:35 - @@ -199,10 +199,8 @@ static void slavio_timer_mem_writel(void count = ((uint64_t)s-counthigh 32) | s-count;

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Laurent Vivier
Le vendredi 25 janvier 2008 à 20:52 +0100, Andre Przywara a écrit : Laurent Vivier wrote: Le vendredi 25 janvier 2008 à 09:18 -0600, Anthony Liguori a écrit : Laurent Vivier wrote: Hi, this patch allows to mount qemu disk images on the host. Sorry, I didn't see you did a

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Daniel P. Berrange
On Fri, Jan 25, 2008 at 02:27:34PM -0600, Anthony Liguori wrote: Andre Przywara wrote: Laurent Vivier wrote: What I'm wondering is how loop and device mapper can work ? I shortly evaluated the loop device idea, but came to the conclusion that this not so easy to implement (and would

Re: [Qemu-devel] [PATCH] hw/sun4m.c fix power addresses

2008-01-25 Thread Blue Swirl
On 1/24/08, Robert Reif [EMAIL PROTECTED] wrote: diff -p -u -r1.81 sun4m.c This breaks my tests, so I guess a fix is also needed for OpenBIOS.

Re: [Qemu-devel] [PATCH][PPC] Use float32/64 instead of float/double

2008-01-25 Thread Blue Swirl
On 1/23/08, Aurelien Jarno [EMAIL PROTECTED] wrote: Aurelien Jarno a écrit : On Sun, Dec 30, 2007 at 06:32:45PM +0200, Blue Swirl wrote: On 12/30/07, Aurelien Jarno [EMAIL PROTECTED] wrote: The patch below changes the float and double types into float32 and and float64 types in the PPC

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Anthony Liguori
Andre Przywara wrote: Laurent Vivier wrote: What I'm wondering is how loop and device mapper can work ? I shortly evaluated the loop device idea, but came to the conclusion that this not so easy to implement (and would require qcow code in the kernel). I see only little chance for this go

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Andre Przywara
Laurent Vivier wrote: Le vendredi 25 janvier 2008 à 09:18 -0600, Anthony Liguori a écrit : Laurent Vivier wrote: Hi, this patch allows to mount qemu disk images on the host. Sorry, I didn't see you did a similar work 19 months ago. Note, the general problem with this approach is that

Re: [Qemu-devel] Slow clock in guest OS

2008-01-25 Thread Sergey Bychkov
Sometimes VM hangs on start. ^^ this is weird can you dump the generated opcode? pls see qemu-doc/tech for more detail on how to do it. Sorry, did You mean http://fabrice.bellard.free.fr/qemu/qemu-tech.html; or what? Sergey Bychkow ICQ: 21014758 FTN:

Re: [kvm-devel] [Qemu-devel] Merging KVM QEMU changes upstream

2008-01-25 Thread Anthony Liguori
Paul Brook wrote: Is this a reasonable merge strategy? We won't introduce regressions but I can't guarantee these new things will work cross-architecture. I think it depends to some extent whether things will need rewriting to be made cross-architecture. In particular if this requires

Re: [Qemu-devel] Merging KVM QEMU changes upstream

2008-01-25 Thread Paul Brook
Is this a reasonable merge strategy? We won't introduce regressions but I can't guarantee these new things will work cross-architecture. I think it depends to some extent whether things will need rewriting to be made cross-architecture. In particular if this requires interface changes. This

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Paul Brook
Why don't you just put your custom flags in CFLAGS, not CPPFLAGS? The former is deliberately left for the user to override. Several (but not all AFAICT) of the target subdirectory Makefiles set CFLAGS. Really? Which ones? Paul

Re: [Qemu-devel] [PATCH] Allow AF_UNIX sockets to be disabled on non-Windows

2008-01-25 Thread Ian Jackson
Johannes Schindelin writes (Re: [Qemu-devel] [PATCH] Allow AF_UNIX sockets to be disabled on non-Windows): Yes, that is very ugly. But changing it to #ifndef NO_AF_UNIX_SOCKETS it actually gives you a bit of documentation what the code does, in addition to controlling what is compiled and

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Ian Jackson
Paul Brook writes (Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target): Really? Which ones? tests/Makefile and tests/cris/Makefile do. Not that they're particularly important. I also saw Makefile.target's if'd out change to CFLAGS near at the bottom by the audio .o's, but of course that's

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Laurent Vivier
Le vendredi 25 janvier 2008 à 09:18 -0600, Anthony Liguori a écrit : Laurent Vivier wrote: Hi, this patch allows to mount qemu disk images on the host. Sorry, I didn't see you did a similar work 19 months ago. Note, the general problem with this approach is that mounting a NBD

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Paul Brook
What I mean is: if you want for any reason to build qemu in a weird way then you're going to have to edit config-host.mak (or somewhere similar) in any case. You probably want to set some CPPFLAGS as well as various other things. If you do this at the moment then you have to reproduce all of

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Anthony Liguori
Laurent Vivier wrote: Hi, this patch allows to mount qemu disk images on the host. Note, the general problem with this approach is that mounting a NBD device locally with write access can lead to dead locks. If you look through the mailing list archives, you'll find a number of

Re: [Qemu-devel] Slow clock in guest OS

2008-01-25 Thread Sergey Bychkov
- Original Message - From: Mulyadi Santosa [EMAIL PROTECTED] To: qemu-devel@nongnu.org Sent: 25.01.2008 14:02 Yes, it helps, in some extent. With rtc/max-user-freq set to 1024 and -clock rtc option VM now works like in 0.8.2 version. Clock is slower than in host, but Windows Time

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Alexander Graf
On Jan 25, 2008, at 1:58 PM, Laurent Vivier wrote: Le vendredi 25 janvier 2008 à 12:48 +, Johannes Schindelin a écrit : Hi, On Fri, 25 Jan 2008, Laurent Vivier wrote: this patch allows to mount qemu disk images on the host. This patch has an awful lot of #ifdef __linux__ in it. But

[Qemu-devel] [PATCH] Remove clone-and-hack code from qemu-img

2008-01-25 Thread Ian Jackson
qemu-img.c has copies of qemu_malloc et al, which are already provided in osdep.c. The attached patch removes these from qemu-img.c and adds osdep.o to BLOCK_OBJS. (It wants to be in BLOCK_OBJS rather than just in qemu-img to support my next patch.) Regards, Ian. Index: Makefile

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Laurent Vivier
Le vendredi 25 janvier 2008 à 12:48 +, Johannes Schindelin a écrit : Hi, On Fri, 25 Jan 2008, Laurent Vivier wrote: this patch allows to mount qemu disk images on the host. This patch has an awful lot of #ifdef __linux__ in it. But I imagine that you could use it on a non-linux

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Johannes Schindelin
Hi, On Fri, 25 Jan 2008, Laurent Vivier wrote: this patch allows to mount qemu disk images on the host. This patch has an awful lot of #ifdef __linux__ in it. But I imagine that you could use it on a non-linux host, too, for example with yet another qemu instance running Linux... Or

Re: [Qemu-devel] [PATCH] hw/sun4m.c fix power addresses

2008-01-25 Thread Robert Reif
Blue Swirl wrote: On 1/24/08, Robert Reif [EMAIL PROTECTED] wrote: diff -p -u -r1.81 sun4m.c This breaks my tests, so I guess a fix is also needed for OpenBIOS. Probably, they were tested using ss5/170 and ss10 openboot images.

Re: [Qemu-devel] [PATCH] hw/slavio_timer.c user timer mode change fix

2008-01-25 Thread Blue Swirl
On 1/23/08, Robert Reif [EMAIL PROTECTED] wrote: Change ptimer limit only when mode changes. Update timer configuration register user timer bits properly. The patch does not apply.

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Laurent Vivier
Le vendredi 25 janvier 2008 à 14:37 +0100, Alexander Graf a écrit : On Jan 25, 2008, at 1:58 PM, Laurent Vivier wrote: Le vendredi 25 janvier 2008 à 12:48 +, Johannes Schindelin a écrit : Hi, On Fri, 25 Jan 2008, Laurent Vivier wrote: this patch allows to mount qemu disk

[Qemu-devel] [PATCH] check return value from read() and write() properly

2008-01-25 Thread Ian Jackson
The system calls read and write may return less than the whole amount requested for a number of reasons. So the idioms if (read(fd, object, sizeof(object)) != sizeof(object)) goto fail; and even worse if (read(fd, object, sizeof(object)) 0) goto fail; are wrong. Additionally, read and

[Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Ian Jackson
Saying CPPFLAGS+= is much more convenient if for any reason the external build environment would like to pass unusual CPPFLAGS. Regards, Ian. Index: Makefile.target === RCS file: /sources/qemu/qemu/Makefile.target,v retrieving

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Paul Brook
Saying CPPFLAGS+= is much more convenient if for any reason the external build environment would like to pass unusual CPPFLAGS. No. This doesn't do what you thing it does. The most common way of overriding these variables is to pass them on the commandline, i.e. make CPPFLAGS=-blah. This

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Ian Jackson
Paul Brook writes (Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target): No. This doesn't do what you thing it does. The most common way of overriding these variables is to pass them on the commandline, i.e. make CPPFLAGS=-blah. This overrides all assignments to that variable including

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Ian Jackson
iwj writes (Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target): Paul Brook writes (Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target): No. This doesn't do what you thing it does. The most common way of overriding these variables is to pass them on the commandline, i.e. make

[Qemu-devel] [PATCH] Allow AF_UNIX sockets to be disabled on non-Windows

2008-01-25 Thread Ian Jackson
The patch below makes it possible to disable AF_UNIX (unix-domain) sockets in host environments which do not define _WIN32, by adding -DNO_UNIX_SOCKETS to the compiler flags. This is useful in the effectively-embedded qemu host which are going to be using for device emulation in Xen. Ian.

Re: [Qemu-devel] [PATCH] Allow AF_UNIX sockets to be disabled on non-Windows

2008-01-25 Thread Anthony Liguori
Ian Jackson wrote: The patch below makes it possible to disable AF_UNIX (unix-domain) sockets in host environments which do not define _WIN32, by adding -DNO_UNIX_SOCKETS to the compiler flags. This is useful in the effectively-embedded qemu host which are going to be using for device emulation

Re: [Qemu-devel] [PATCH][RFC] To mount qemu disk image on the host

2008-01-25 Thread Anthony Liguori
Laurent Vivier wrote: Hi, this patch allows to mount qemu disk images on the host. It is based on the Network Block Device protocol and allows qemu-img to become an NBD server (Yes, Anthony, userspace block device is the right way to do that... :-P ). FYI, I've been maintaining qemu-nbd

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Ian Jackson
Paul Brook writes (Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target): On Friday 25 January 2008, Ian Jackson wrote: What circumstances ? CPPFLAGS+= overrides (discards) values in the environment as well as ones from the command line. [ demonstration ] Oh, err, looks like I messed

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Ian Jackson
Paul Brook writes (Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target): In that case you should always provide a definition in config-host.mak. Under some circumstances make may inherit initial values from elsewhere. What circumstances ? CPPFLAGS+= overrides (discards) values in the

Re: [Qemu-devel] [PATCH] CPPFLAGS+= in Makefile.target

2008-01-25 Thread Paul Brook
Providing a definition in config-host.mak involves duplicating the value, which can't be right. Huh? No it doesn't. config-host.mak contains CPPFLAGS= then Makefile.target contains CPPFLAGS+=whatever If there's no other way to do it then there should be a reference to USER_CPPFLAGS or

[Qemu-devel] Merging KVM QEMU changes upstream

2008-01-25 Thread Anthony Liguori
Hi, As most probably know, the KVM project has been maintaining a QEMU tree for some time now. Beyond support for the KVM kernel interface, the tree also contains a number of useful features like live migration, virtio, and extboot. Some of these things have been posted to qemu-devel