Re: [Qemu-devel] [PATCH V6 3/4] qmp, nmi: convert do_inject_nmi() to QObject

2011-02-27 Thread Markus Armbruster
Anthony Liguori writes: > On 02/25/2011 03:54 AM, Markus Armbruster wrote: >> Anthony Liguori writes: >> >> >>> On 02/24/2011 10:20 AM, Markus Armbruster wrote: >>> Anthony Liguori writes: > On 02/24/2011 02:33 AM, Markus Armbruster wrote: > >

Re: [Qemu-devel] Re: KVM call agenda for Jan 25

2011-02-27 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Sat, Feb 26, 2011 at 9:50 PM, Dushyant Bansal > wrote: >> Disk block size is usually 512 bytes and in qemu-img, sector size is also >> 512B. And, this change would  copy n sectors even if only one of them >> actually contains data (while cp checks and copies one bloc

Re: [Qemu-devel] Re: [PATCH] Split machine creation from the main loop

2011-02-27 Thread Anthony Liguori
On 02/27/2011 05:33 AM, Avi Kivity wrote: On 02/24/2011 07:25 PM, Anthony Liguori wrote: Is it really necessary? What's blocking us from initializing chardevs early? Well We initialize all chardevs at once right now and what set of chardevs there are depends on the machine (by the way

Re: [Qemu-devel] [PATCH] `qdev_free` when unplug a pci device

2011-02-27 Thread Wen Congyang
Hi Markus Armbruster At 02/23/2011 04:30 PM, Markus Armbruster Write: > Isaku Yamahata writes: > > > I don't think this patch is correct. Let me explain. > > Device hot unplug is *not* guaranteed to succeed. > > For some buses, such as USB, it always succeeds immediately, i.e. when > the

[Qemu-devel] [PATCH] fix build errors when we enable acpi_piix4 debug

2011-02-27 Thread Wen Congyang
I enable acpi_piix4 debug, and got the following build errors: # make CClibhw64/acpi_piix4.o cc1: warnings being treated as errors /home/wency/source/qemu/hw/acpi_piix4.c: In function ‘pm_ioport_write’: /home/wency/source/qemu/hw/acpi_piix4.c:193: error: format ‘%04x’ expects type ‘unsigned

[Qemu-devel] [PATCH v2] move eeprom init from reset function to init function

2011-02-27 Thread Wen Congyang
When we hot plug network pci devices, the mac address is still set to "00:00:00:00:00:00" on the guest machine. The reason is that the kernel does not reset the device and we init eeprom in reset function. move eeprom init from reset function into init function, as it is read only, and does not ne

Re: [Qemu-devel] GSoC 2011 project ideas

2011-02-27 Thread Natalia Portillo
Hi there, El 23/02/2011, a las 20:42, Luiz Capitulino escribió: > Hi there, > > Google will begin accepting mentoring organizations applications next week, > but > we count only with three projects so far. > > Although there doesn't seem to exist a hard deadline associated with the ideas > pag

[Qemu-devel] [PATCH] spice/qxl: locking fix for qemu-kvm

2011-02-27 Thread Alon Levy
From: Gerd Hoffmann qxl needs to release the qemu lock before calling some libspice functions (and re-aquire it later). In upstream qemu qxl can just use qemu_mutex_{unlock,lock}_iothread. In qemu-kvm this doesn't work, qxl needs additionally save+restore the cpu_single_env pointer on unlock+lo

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sun, Feb 27, 2011 at 08:27:01PM +0100, Jan Kiszka wrote: > On 2011-02-27 20:16, Alon Levy wrote: > > On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: > >> On 2011-02-27 20:03, Alon Levy wrote: > >>> On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: > On 2011-02-26 12:43

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sun, Feb 27, 2011 at 08:27:01PM +0100, Jan Kiszka wrote: > On 2011-02-27 20:16, Alon Levy wrote: > > On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: > >> On 2011-02-27 20:03, Alon Levy wrote: > >>> On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: > On 2011-02-26 12:43

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Jan Kiszka
On 2011-02-27 20:16, Alon Levy wrote: > On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: >> On 2011-02-27 20:03, Alon Levy wrote: >>> On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: On 2011-02-26 12:43, xming wrote: > When trying to start X (and it loads qxl driver)

[Qemu-devel] [PATCH] w32: Add support for curses

2011-02-27 Thread Stefan Weil
MinGW optionally includes pdcurses, so add support for it. Signed-off-by: Stefan Weil --- configure |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 47779b6..ca15632 100755 --- a/configure +++ b/configure @@ -1562,7 +1562,11 @@ fi #

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sun, Feb 27, 2011 at 08:11:26PM +0100, Jan Kiszka wrote: > On 2011-02-27 20:03, Alon Levy wrote: > > On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: > >> On 2011-02-26 12:43, xming wrote: > >>> When trying to start X (and it loads qxl driver) the kvm process just > >>> crashes. > >

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Jan Kiszka
On 2011-02-27 20:03, Alon Levy wrote: > On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: >> On 2011-02-26 12:43, xming wrote: >>> When trying to start X (and it loads qxl driver) the kvm process just >>> crashes. > > This is fixed by Gerd's attached patch (taken from rhel repository, d

Re: [Qemu-devel] Re: kvm crashes with spice while loading qxl

2011-02-27 Thread Alon Levy
On Sat, Feb 26, 2011 at 01:29:01PM +0100, Jan Kiszka wrote: > On 2011-02-26 12:43, xming wrote: > > When trying to start X (and it loads qxl driver) the kvm process just > > crashes. This is fixed by Gerd's attached patch (taken from rhel repository, don't know why it wasn't pushed to qemu-kvm up

[Qemu-devel] Re: [PATCH] simpletrace: Thread-safe tracing

2011-02-27 Thread Paolo Bonzini
On 02/27/2011 06:02 PM, Stefan Hajnoczi wrote: On Sun, Feb 27, 2011 at 3:13 PM, Paolo Bonzini wrote: On 02/27/2011 03:58 PM, Stefan Hajnoczi wrote: + * Trace records are written out by a dedicated thread. The thread waits for + * records to become available, writes them out, and then waits a

[Qemu-devel] [PATCH 3/3] osdep: Remove conditional compilation (fixes w32 compilation)

2011-02-27 Thread Stefan Weil
sys/time.h also exists for MinGW, and it is needed because it declares struct timeval (needed by latest vnc code). Signed-off-by: Stefan Weil --- osdep.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/osdep.h b/osdep.h index 27eedcf..5a667b4 100644 --- a/osdep.h +++ b/

[Qemu-devel] [PATCH 2/3] w32: Add macro timersub to sys/time.h

2011-02-27 Thread Stefan Weil
timersub is needed by the latest vnc code. Signed-off-by: Stefan Weil --- hosts/w32/include/sys/time.h | 24 1 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 hosts/w32/include/sys/time.h diff --git a/hosts/w32/include/sys/time.h b/hosts/w32/includ

[Qemu-devel] [PATCH 1/3] w32: Add new directory hierarchy for MinGW extensions

2011-02-27 Thread Stefan Weil
This is a first step which will reduce the number of conditional compilations caused by MinGW. Include files will be added to hosts/w32/include. Signed-off-by: Stefan Weil --- configure|1 + hosts/w32/README |1 + 2 files changed, 2 insertions(+), 0 deletions(-) create mode 100

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Anthony Liguori
On 02/27/2011 09:31 AM, Avi Kivity wrote: On 02/27/2011 04:00 PM, Anthony Liguori wrote: On 02/27/2011 03:10 AM, Avi Kivity wrote: On 02/24/2011 07:58 PM, Anthony Liguori wrote: If you move the cdrom to a different IDE channel, you have to update the stateful non-config file. Whereas if you

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Anthony Liguori
On 02/27/2011 10:02 AM, Dor Laor wrote: On 02/27/2011 03:49 PM, Anthony Liguori wrote: On 02/27/2011 03:55 AM, Dor Laor wrote: What about a simpler approach were QMP events will be written to a event-log-file (or even named pipe). The management tool can just use a small daemon that does noth

Re: [Qemu-devel] [PATCH] simpletrace: Thread-safe tracing

2011-02-27 Thread Stefan Hajnoczi
On Sun, Feb 27, 2011 at 4:14 PM, Avi Kivity wrote: > On 02/27/2011 04:58 PM, Stefan Hajnoczi wrote: >> >> Trace events outside the global mutex cannot be used with the simple >> trace backend since it is not thread-safe.  There is no check to prevent >> them being enabled so people sometimes learn

Re: [Qemu-devel] Re: [PATCH] simpletrace: Thread-safe tracing

2011-02-27 Thread Stefan Hajnoczi
On Sun, Feb 27, 2011 at 3:13 PM, Paolo Bonzini wrote: > On 02/27/2011 03:58 PM, Stefan Hajnoczi wrote: >> >> + * Trace records are written out by a dedicated thread.  The thread waits >> for >> + * records to become available, writes them out, and then waits again. >> + */ >> +static pthread_mutex

Re: [Qemu-devel] Stupid question?

2011-02-27 Thread Stefan Hajnoczi
kpartx is easier than losetup for getting at individual partitions inside a raw image. http://linux.die.net/man/8/kpartx Stefan

Re: [Qemu-devel] Stupid question?

2011-02-27 Thread Avi Kivity
On 02/27/2011 08:22 AM, Amos Kong wrote: On Sun, Feb 27, 2011 at 6:22 AM, Dushyant Bansal wrote: > On Sunday 27 February 2011 03:45 AM, Frans de Boer wrote: >> >> Hi all, >> >> This is the only QEMU list, so I put my question her. >> How can I copy the contents of a "*.raw" image to a real

Re: [Qemu-devel] [PATCH] simpletrace: Thread-safe tracing

2011-02-27 Thread Avi Kivity
On 02/27/2011 04:58 PM, Stefan Hajnoczi wrote: Trace events outside the global mutex cannot be used with the simple trace backend since it is not thread-safe. There is no check to prevent them being enabled so people sometimes learn this the hard way. This patch restructures the simple trace ba

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Dor Laor
On 02/27/2011 03:49 PM, Anthony Liguori wrote: On 02/27/2011 03:55 AM, Dor Laor wrote: What about a simpler approach were QMP events will be written to a event-log-file (or even named pipe). The management tool can just use a small daemon that does nothing other than write QMP events to a log.

Re: [Qemu-devel] Re: [PATCH 1/3] kvm-unit-tests: add x86 port io accessors

2011-02-27 Thread Avi Kivity
On 02/27/2011 04:01 PM, Anthony Liguori wrote: On 02/27/2011 06:44 AM, Avi Kivity wrote: On 02/24/2011 11:48 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguori diff --git a/lib/x86/io.h b/lib/x86/io.h new file mode 100644 index 000..bd6341c --- /dev/null +++ b/lib/x86/io.h @@ -0,0 +

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Avi Kivity
On 02/27/2011 04:00 PM, Anthony Liguori wrote: On 02/27/2011 03:10 AM, Avi Kivity wrote: On 02/24/2011 07:58 PM, Anthony Liguori wrote: If you move the cdrom to a different IDE channel, you have to update the stateful non-config file. Whereas if you do $ qemu-img create -f cd-tray -b ~/fo

[Qemu-devel] Re: [PATCH] simpletrace: Thread-safe tracing

2011-02-27 Thread Paolo Bonzini
On 02/27/2011 03:58 PM, Stefan Hajnoczi wrote: + * Trace records are written out by a dedicated thread. The thread waits for + * records to become available, writes them out, and then waits again. + */ +static pthread_mutex_t trace_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t trace_a

[Qemu-devel] Re: [PATCH v2 upstream 19/22] move blocking of signals to qemu_signalfd_init

2011-02-27 Thread Paolo Bonzini
On 02/27/2011 10:41 AM, Jan Kiszka wrote: > +#ifdef CONFIG_IOTHREAD > +/* SIGUSR2 used by posix-aio-compat.c */ > +sigemptyset(&set); > +sigaddset(&set, SIGUSR2); > +pthread_sigmask(SIG_UNBLOCK,&set, NULL); Didn't you want to rename the function for the sake of non-signalfd

[Qemu-devel] Re: [PATCH v2 upstream 07/22] add assertions on the owner of a QemuMutex

2011-02-27 Thread Paolo Bonzini
On 02/27/2011 10:33 AM, Jan Kiszka wrote: Now that we are left without any assertions, I start wondering about one of the original missions: enforce qemu_cond_signal/broadcast to be called under a mutex. What about extending those services with a mutex argument and applying the assert there? Th

[Qemu-devel] [PATCH] simpletrace: Thread-safe tracing

2011-02-27 Thread Stefan Hajnoczi
Trace events outside the global mutex cannot be used with the simple trace backend since it is not thread-safe. There is no check to prevent them being enabled so people sometimes learn this the hard way. This patch restructures the simple trace backend with a ring buffer suitable for multiple co

Re: [Qemu-devel] Re: [PATCH 1/3] kvm-unit-tests: add x86 port io accessors

2011-02-27 Thread Anthony Liguori
On 02/27/2011 06:44 AM, Avi Kivity wrote: On 02/24/2011 11:48 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguori diff --git a/lib/x86/io.h b/lib/x86/io.h new file mode 100644 index 000..bd6341c --- /dev/null +++ b/lib/x86/io.h @@ -0,0 +1,40 @@ +#ifndef IO_H +#define IO_H + +static in

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Anthony Liguori
On 02/27/2011 03:10 AM, Avi Kivity wrote: On 02/24/2011 07:58 PM, Anthony Liguori wrote: If you move the cdrom to a different IDE channel, you have to update the stateful non-config file. Whereas if you do $ qemu-img create -f cd-tray -b ~/foo.img ~/foo-media-tray.img $ qemu -cdrom ~/fo

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Anthony Liguori
On 02/27/2011 03:55 AM, Dor Laor wrote: What about a simpler approach were QMP events will be written to a event-log-file (or even named pipe). The management tool can just use a small daemon that does nothing other than write QMP events to a log. There's no real need for this code to live i

[Qemu-devel] Re: [PATCH 3/3] kvm-unit-tests: make I/O more friendly to existing QEMU hardware

2011-02-27 Thread Avi Kivity
On 02/24/2011 11:48 PM, Anthony Liguori wrote: Use the serial port for printf() and use the Bochs bios exit port if the testdev port isn't available. This unconditionally switches to use the serial port but tries to use the testdev exit port since that lets you pass an exit status. The only is

[Qemu-devel] Re: [PATCH 2/3] kvm-unit-tests: do not set level sensitive irq when initializing the PIC

2011-02-27 Thread Avi Kivity
On 02/24/2011 11:48 PM, Anthony Liguori wrote: I'm not sure if this was intentional but the QEMU i8259 does not support this flag. I haven't observed any issues with this but I'll happily admit that I'm not very aware of what I'm doing here. Signed-off-by: Anthony Liguori static u32 xapic_re

[Qemu-devel] Re: [PATCH 1/3] kvm-unit-tests: add x86 port io accessors

2011-02-27 Thread Avi Kivity
On 02/24/2011 11:48 PM, Anthony Liguori wrote: Signed-off-by: Anthony Liguori diff --git a/lib/x86/io.h b/lib/x86/io.h new file mode 100644 index 000..bd6341c --- /dev/null +++ b/lib/x86/io.h @@ -0,0 +1,40 @@ +#ifndef IO_H +#define IO_H + +static inline unsigned char inb(unsigned short port)

[Qemu-devel] [Bug 725991] [NEW] cpu-exec.c:766: handle_cpu_signal: Assertion failed.

2011-02-27 Thread Marat Radchenko
Public bug reported: qemu-user 0.14.0 Host: amd64 (Phenom X6) host, Gentoo Linux Guest: armv6l Gentoo Linux Full error message: cpu-exec.c:766: handle_cpu_signal: Assertion `({ unsigned long __guest = (unsigned long)(address) - guest_base; __guest < (1ul << 32); })' failed. Happened in gcc pro

Re: [Qemu-devel] Re: [PATCH] Split machine creation from the main loop

2011-02-27 Thread Avi Kivity
On 02/24/2011 07:25 PM, Anthony Liguori wrote: Is it really necessary? What's blocking us from initializing chardevs early? Well We initialize all chardevs at once right now and what set of chardevs there are depends on the machine (by the way defaults are applied). You could initiali

Re: [Qemu-devel] Re: KVM call agenda for Jan 25

2011-02-27 Thread Stefan Hajnoczi
On Sat, Feb 26, 2011 at 9:50 PM, Dushyant Bansal wrote: > Disk block size is usually 512 bytes and in qemu-img, sector size is also > 512B. And, this change would  copy n sectors even if only one of them > actually contains data (while cp checks and copies one block(=sector) at a > time). Therefor

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Dor Laor
On 02/27/2011 11:10 AM, Avi Kivity wrote: On 02/24/2011 07:58 PM, Anthony Liguori wrote: If you move the cdrom to a different IDE channel, you have to update the stateful non-config file. Whereas if you do $ qemu-img create -f cd-tray -b ~/foo.img ~/foo-media-tray.img $ qemu -cdrom ~/foo-media

[Qemu-devel] Re: [PATCH v2 uq/master 00/22] Win32 iothread support

2011-02-27 Thread Jan Kiszka
On 2011-02-26 16:39, Paolo Bonzini wrote: > After gathering the comments about the two series I sent separately, > here is the full series for Win32 iothread support, ready to be > applied to uq/master. > > Patches 1 to 5 are generic Win32 improvements, including the qemu-thread > implementation.

[Qemu-devel] Re: [PATCH v2 upstream 19/22] move blocking of signals to qemu_signalfd_init

2011-02-27 Thread Jan Kiszka
On 2011-02-26 16:40, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > cpus.c | 87 ++- > 1 files changed, 36 insertions(+), 51 deletions(-) > > diff --git a/cpus.c b/cpus.c > index 32e9352..8c440f1 100644 > --- a/cpus.c > +

[Qemu-devel] Re: [PATCH v2 upstream 07/22] add assertions on the owner of a QemuMutex

2011-02-27 Thread Jan Kiszka
On 2011-02-26 16:40, Paolo Bonzini wrote: > These are already present in the Win32 implementation, add them to > the pthread wrappers as well. Use PTHREAD_MUTEX_ERRORCHECK for mutex > operations, and track the owner separately for cond_signal/broadcast. > > Signed-off-by: Paolo Bonzini > --- >

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Avi Kivity
On 02/24/2011 07:45 PM, Anthony Liguori wrote: Yeah, it feels like we're introducing QEMU level RAID. We already did, with sheepdog (well the RAID code is really outside qemu itself). At what point are we going to add RAID5 support and not just RAID1. And it certainly begs the question o

Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy

2011-02-27 Thread Avi Kivity
On 02/24/2011 07:58 PM, Anthony Liguori wrote: If you move the cdrom to a different IDE channel, you have to update the stateful non-config file. Whereas if you do $ qemu-img create -f cd-tray -b ~/foo.img ~/foo-media-tray.img $ qemu -cdrom ~/foo-media-tray.img the cd-rom tray state wil