Re: [Qemu-devel] [PATCH] linux-user: Fix possible realloc memory leak

2011-01-18 Thread Stefan Weil
Am 18.01.2011 18:51, schrieb Markus Armbruster: Stefan Weil writes: Am 18.01.2011 09:26, schrieb Markus Armbruster: Stefan Weil writes: Extract from "man realloc": "If realloc() fails the original block is left untouched; it is not freed or moved." Fix a possible memory

Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API

2011-01-18 Thread Venkateswararao Jujjuri (JV)
On 1/17/2011 11:14 PM, Stefan Hajnoczi wrote: > On Tue, Jan 18, 2011 at 6:46 AM, Arun R Bharadwaj > wrote: >> * Stefan Hajnoczi [2011-01-18 06:31:34]: >> >>> On Tue, Jan 18, 2011 at 4:43 AM, Arun R Bharadwaj >>> wrote: * Stefan Hajnoczi [2011-01-17 09:56:58]: > On Thu, Jan 13, 201

Re: [Qemu-devel] Changing the content of target cpu registers

2011-01-18 Thread Stefano Bonifazi
On 01/18/2011 06:17 PM, Blue Swirl wrote: On Tue, Jan 18, 2011 at 9:29 AM, Stefano Bonifazi wrote: Hi all! I am working on qemu-user (qemu-ppc). I'd like to edit the values of target registers during the execution. Can I do that by simply changing the content of env->gpr[] or do these only c

Re: [Qemu-devel] [PATCH] linux-user: Fix possible realloc memory leak

2011-01-18 Thread Peter Maydell
On 18 January 2011 17:51, Markus Armbruster wrote: > Stefan Weil writes: >> Am 18.01.2011 09:26, schrieb Markus Armbruster: >>> Stefan Weil writes: Extract from "man realloc": "If realloc() fails the original block is left untouched; it is not freed or moved." >>> Sidestep the pr

[Qemu-devel] Re: [PATCH V2 1/3] Introduce log_start/log_stop in CPUPhysMemoryClient

2011-01-18 Thread Jan Kiszka
Send patch updates always with proper "[PATCH]" tag, they may get lost otherwise. On 2011-01-18 13:25, anthony.per...@citrix.com wrote: > From: Anthony PERARD > > In order to use log_start/log_stop with Xen as well in the vga code, > this two operations have been put in CPUPhysMemoryClient. > >

Re: [Qemu-devel] paravirtual mouse/tablet

2011-01-18 Thread Alexander Graf
On 17.01.2011, at 08:48, Gerd Hoffmann wrote: >>> There are three cases: >>> >>> (1) no pressure supported (i.e. your mouse moving around in the vnc >>> window and qemu reporting this as tablet coordinates). >>> (2) just pen/finger present/not present supported. pressure jumps >>> between 0 and

[Qemu-devel] [RFC PATCH] Fake machine for scalability testing

2011-01-18 Thread Markus Armbruster
The problem: you want to do serious scalability testing (1000s of VMs) of your management stack. If each guest eats up a few 100MiB and competes for CPU, that requires a serious host machine. Which you don't have. You also don't want to modify the management stack at all, if you can help it. Th

Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement

2011-01-18 Thread Anthony Liguori
On 01/18/2011 10:53 AM, Eric Blake wrote: On 01/18/2011 09:50 AM, Anthony Liguori wrote: @@ -324,26 +324,26 @@ ssize_t strtosz_suffix(const char *nptr, char **end, const char default_suffix) } } switch (toupper(d)) { BTW, a useful change would be to accept

Re: [Qemu-devel] [RFC] Propose the Fast Virtual Disk (FVD) image format that outperforms QCOW2 by 249%

2011-01-18 Thread Chunqiang Tang
> > Here are the unique features you've described beyond what qemu-io, > > blkdebug, and blkverify do: > > > > 1. New functionality > > * Control over ordering of I/O request submission and completion. > > * Random I/O generator (probably as new qemu-io command). > > > > 2. Enhancements to existi

Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement

2011-01-18 Thread Jes Sorensen
On 01/18/11 21:30, Anthony Liguori wrote: > On 01/18/2011 10:53 AM, Eric Blake wrote: >> On 01/18/2011 09:50 AM, Anthony Liguori wrote: >> > @@ -324,26 +324,26 @@ ssize_t strtosz_suffix(const char *nptr, char > **end, const char default_suffix) >} >} >

Re: [Qemu-devel] [PATCH 2/2] strtosz(): Use suffix macros in switch() statement

2011-01-18 Thread Anthony Liguori
On 01/18/2011 02:36 PM, Jes Sorensen wrote: On 01/18/11 21:30, Anthony Liguori wrote: On 01/18/2011 10:53 AM, Eric Blake wrote: On 01/18/2011 09:50 AM, Anthony Liguori wrote: @@ -324,26 +324,26 @@ ssize_t strtosz_suffix(const char *nptr, char **end, const char default_suffix

[Qemu-devel] [PATCH] pcibus_get_dev_path: correct pci device path construction

2011-01-18 Thread Igor V. Kovalenko
From: Igor V. Kovalenko - fix snprintf off by one pci domain and slot number formatting snprintf calls require extra space for trailing null character without this change devices are assigned the same path name which triggers assertion in vmstate_register_with_alias_id - while iterating

[Qemu-devel] [PATCH 1/2] prep: Remove bogus BIOS size check

2011-01-18 Thread Hervé Poussineau
From: Andreas Färber r3480 added this check to account for the entry vector 0xfff00100 to be available for CPUs that need it. Today however, the NIP is not yet initialized at this point (zero), so the check always triggers. Moreover, BIOS size check is already done previously, so this part can b

[Qemu-devel] [PATCH 2/2] prep: Disable second IDE channel, as long as ISA IDE emulation doesn't support same irq for both channels

2011-01-18 Thread Hervé Poussineau
Cc: Andreas Färber Signed-off-by: Hervé Poussineau --- hw/ppc_prep.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index 6b22122..6c1499a 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -690,7 +690,7 @@ static void ppc_prep_init (ram_ad

Re: [Qemu-devel] [sparc] Floating point exception issue

2011-01-18 Thread Blue Swirl
On Tue, Jan 18, 2011 at 6:00 PM, Mateusz Loskot wrote: > On 18/01/11 17:36, Blue Swirl wrote: >> >> On Tue, Jan 18, 2011 at 3:27 PM, Mateusz Loskot >>  wrote: >>> >>> Hi, >>> >>> Recently, I have reported mysterious issues on NetBSD 5.1 >>> emulated on SPARC. The whole first thread is here: >>> >>

Re: [Qemu-devel] [RFC] Propose the Fast Virtual Disk (FVD) image format that outperforms QCOW2 by 249%

2011-01-18 Thread Jamie Lokier
Chunqiang Tang wrote: > Doing both fault injection and verification together introduces some > subtlety. For example, even under the random failure mode, two disk writes > triggered by one VM-issued write must either fail together or succeed > together. Otherwise, the truth image and the test im

Re: [Qemu-devel] [RFC] Propose the Fast Virtual Disk (FVD) image format that outperforms QCOW2 by 249%

2011-01-18 Thread Jamie Lokier
Chunqiang Tang wrote: > > Based on my limited understanding, I think FVD shares a > > lot in common with the COW format (block/cow.c). > > > > But I think most of the advantages you mention could be considered as > > additions to either qcow2 or qed. At any rate, the right way to have > > that

[Qemu-devel] unknown keycodes

2011-01-18 Thread Henry Grebler
qemu -cdrom /dev/acd1 -hda kwinxp.img -m 512 -boot d -localtime unknown keycodes `sun(type6_usb)_aliases(qwerty)', please report to qemu-devel@nongnu.org uname -a FreeBSD freew.t-s-f.com.au 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009 r...@almeida.cse.bu

Re: [Qemu-devel] unknown keycodes

2011-01-18 Thread Anthony Liguori
On 01/18/2011 07:22 PM, Henry Grebler wrote: qemu -cdrom /dev/acd1 -hda kwinxp.img -m 512 -boot d -localtime unknown keycodes `sun(type6_usb)_aliases(qwerty)', please report to qemu-devel@nongnu.org Thanks, you can work around this by using -k en-us. Regards, Anthony Liguori

[Qemu-devel] [PATCH 13/19] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-01-18 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 9ba5be2..1176124 100644 --- a/net.c +++ b/net.c @@ -36,6 +36,7 @@ #include "qemu-common.h" #include "qe

[Qemu-devel] [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin, commit}.

2011-01-18 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura --- savevm.c | 93 ++ sysemu.h |2 + 2 files changed, 95 inser

[Qemu-devel] [PATCH 06/19] virtio: decrement last_avail_idx with inuse before saving.

2011-01-18 Thread Yoshiaki Tamura
For regular migration inuse == 0 always as requests are flushed before save. However, event-tap log when enabled introduces an extra queue for requests which is not being flushed, thus the last inuse requests are left in the event-tap queue. Move the last_avail_idx value sent to the remote back to

[Qemu-devel] [PATCH 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-18 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15 insertions(+), 13 deletions(-)

[Qemu-devel] [PATCH 12/19] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-01-18 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 49c28b1..4a171cc 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h" #include "kvm.h

[Qemu-devel] [PATCH 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-18 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0292184..8bbb785 100644 ---

[Qemu-devel] [PATCH 14/19] block: insert event-tap to bdrv_aio_writev() and bdrv_aio_flush().

2011-01-18 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests sent from device emulators. Signed-off-by: Yoshiaki Tamura --- block.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..85bd8b8 100644 --- a/block.c +++ b/block.c @@

[Qemu-devel] [PATCH 04/19] qemu-char: export socket_set_nodelay().

2011-01-18 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index edc9ad6..737d347 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2116,7 +2116,7 @@ static void tcp_chr_telnet_init(int

[Qemu-devel] [PATCH 18/19] Introduce -k option to enable FT migration mode (Kemari).

2011-01-18 Thread Yoshiaki Tamura
When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). Signed-off-by: Yoshiaki Tamura --- hmp-commands.hx |7 --- migration.c |4 qmp-commands.hx |7 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/h

[Qemu-devel] [PATCH 08/19] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-01-18 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 149 ++ 2 files changed, 154 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h ind

[Qemu-devel] [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-18 Thread Yoshiaki Tamura
The option looks like, -incoming ::,ft_mode Signed-off-by: Yoshiaki Tamura --- migration.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 11bbdf8..7275f02 100644 --- a/migration.c +++ b/migration.c @@ -45,6 +45,12 @@ int qemu_start_i

[Qemu-devel] [PATCH 17/19] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-01-18 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() sets ft_trans_incoming() as a callback, and call qemu_file_get_notify() to receive FT transaction iteratively. We also need a hack no to close fd before moving to ft_transaction mode, so that we can reuse the fd for it. vm_change_

[Qemu-devel] [PATCH 01/19] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-01-18 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 163a683..a506688 100644 --- a/hw/

[Qemu-devel] [PATCH 11/19] ioport: insert event_tap_ioport() to ioport_write().

2011-01-18 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index aa4188a..74aebf5 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "ioport.h" #include

[Qemu-devel] [PATCH 10/19] Call init handler of event-tap at main() in vl.c.

2011-01-18 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8bbb785..9faeb27 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h

[Qemu-devel] [PATCH 09/19] Introduce event-tap.

2011-01-18 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.targe

[Qemu-devel] [PATCH 02/19] Introduce read() to FdMigrationState.

2011-01-18 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 13 + migration.h |3 +++ 3 files changed, 31 insertions(+), 0 d

[Qemu-devel] [PATCH 07/19] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-01-18 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[Qemu-devel] [PATCH 00/19] Kemari for KVM v0.2.6

2011-01-18 Thread Yoshiaki Tamura
Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post. The current code is based on qemu.git d03d11260ee2d55579e8b76116e35ccdf5031833. The changes from v0.2.5 -> v0.2.6 are: - use qemu_{put,get}_be32() to save/load niov in event-tap The chan

[Qemu-devel] [PATCH 16/19] migration: introduce migrate_ft_trans_{put, get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-18 Thread Yoshiaki Tamura
Introduce migrate_ft_trans_put_ready() which kicks the FT transaction cycle. When ft_mode is on, migrate_fd_put_ready() would open ft_trans_file and turn on event_tap. To end or cancel FT transaction, ft_mode and event_tap is turned off. migrate_ft_trans_get_ready() is called to receive ack from

Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API

2011-01-18 Thread Stefan Hajnoczi
On Tue, Jan 18, 2011 at 6:10 PM, Venkateswararao Jujjuri (JV) wrote: > On 1/17/2011 11:14 PM, Stefan Hajnoczi wrote: >> On Tue, Jan 18, 2011 at 6:46 AM, Arun R Bharadwaj >> wrote: >>> * Stefan Hajnoczi [2011-01-18 06:31:34]: >>> On Tue, Jan 18, 2011 at 4:43 AM, Arun R Bharadwaj wrote:

<    1   2