[Qemu-devel] [RFC PATCH 08/20] Introduce RAMSaveIO and use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-04-20 Thread Yoshiaki Tamura
Introduce RAMSaveIO to use writev for saving ram blocks, and modifies ram_save_block() and ram_save_remaining() to use cpu_physical_memory_get_dirty_range() to check multiple dirty and non-dirty pages at once. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- vl.c | 221

[Qemu-devel] [RFC PATCH 04/20] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-04-20 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 | 26 +- 2 files changed, 27 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 05131a0..fc9ed29 100644 ---

[Qemu-devel] [RFC PATCH 19/20] Insert do_event_tap() to virtio-{blk, net}, comment out assert() on cpu_single_env temporally.

2010-04-20 Thread Yoshiaki Tamura
do_event_tap() is inserted to functions which actually fire outputs. By synchronizing VMs before outputs are fired, we can failover to the receiver upon failure. To save VM continuously, comment out assert() on cpu_single_env temporally. Signed-off-by: Yoshiaki Tamura --- hw/virtio-blk.c |2

[Qemu-devel] [RFC PATCH 10/20] Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header.

2010-04-20 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- migration-exec.c |2 +- migration-fd.c |2 +- migration-tcp.c |2 +- migration-unix.c |2 +- savevm.c | 25 ++--- sysemu.h |2 +- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/migrat

[Qemu-devel] [RFC PATCH 01/20] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty.

2010-04-20 Thread Yoshiaki Tamura
Replaces byte-based phys_ram_dirty bitmap with four (MASTER, VGA, CODE, MIGRATION) bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. It uses ffs() to convert DIRTY_FLAG to DIRTY_IDX. Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_r

[Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-20 Thread Yoshiaki Tamura
Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Although advanced approaches in the TODO lists are fascinating, we would l

[Qemu-devel] [RFC PATCH 11/20] Introduce some socket util functions.

2010-04-20 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- osdep.c | 13 + qemu-char.c | 25 - qemu_socket.h |4 3 files changed, 41 insertions(+), 1 deletions(-) diff --git a/osdep.c b/osdep.c index 3bab79a..63444e7 100644 --- a/osdep.c +++ b/osdep.c @@ -201,6 +

[Qemu-devel] [RFC PATCH 15/20] Introduce FT mode support to configure.

2010-04-20 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- configure |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 046c591..f0682d4 100755 --- a/configure +++ b/configure @@ -298,6 +298,7 @@ bsd_user="no" guest_base="" uname_release="" io_thread="no" +ft_m

[Qemu-devel] [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops().

2010-04-20 Thread Yoshiaki Tamura
QEMUFile currently doesn't support writev(). For sending multiple data, such as pages, using writev() should be more efficient. Signed-off-by: Yoshiaki Tamura --- buffered_file.c |2 +- hw/hw.h | 16 savevm.c| 43 +

[Qemu-devel] [RFC PATCH 18/20] Modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2010-04-20 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() receives 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. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 36

[Qemu-devel] [RFC PATCH 02/20] Introduce cpu_physical_memory_get_dirty_range().

2010-04-20 Thread Yoshiaki Tamura
It checks the first row and puts dirty addr in the array. If the first row is empty, it skips to the first non-dirty row or the end addr, and put the length in the first entry of the array. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- cpu-all.h |4 +++ exec.c| 67

[Qemu-devel] [RFC PATCH 06/20] Introduce iovec util functions, qemu_iovec_to_vector() and qemu_iovec_to_size().

2010-04-20 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- cutils.c | 12 qemu-common.h |2 ++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/cutils.c b/cutils.c index be99b21..1d35590 100644 --- a/cutils.c +++ b/cutils.c @@ -238,3 +238,15 @@ void qemu_iovec_from_buffer(QEMUIOVec

[Qemu-devel] [RFC PATCH 12/20] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2010-04-20 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] [RFC PATCH 17/20] Modify migrate_fd_put_ready() when ft_mode is on.

2010-04-20 Thread Yoshiaki Tamura
When ft_mode is on, migrate_fd_put_ready() would open ft_transaction file and turn on event_tap. To end or cancel ft_transaction, ft_mode and event_tap is turned off. Signed-off-by: Yoshiaki Tamura --- migration.c | 36 +--- 1 files changed, 33 insertions(+), 3

[Qemu-devel] [RFC PATCH 13/20] Introduce util functions to control ft_transaction from savevm layer.

2010-04-20 Thread Yoshiaki Tamura
To utilize ft_transaction function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 + savevm.c | 41 + 2 files changed, 46 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 10e6dda..fcee66

[Qemu-devel] [RFC PATCH 14/20] Upgrade QEMU_FILE_VERSION from 3 to 4, and introduce qemu_savevm_state_all().

2010-04-20 Thread Yoshiaki Tamura
Make a 32bit entry after QEMU_VM_FILE_VERSION to recognize whether the transfered data is QEMU_VM_FT_MODE or QEMU_VM_LIVE_MIGRATION_MODE. Signed-off-by: Yoshiaki Tamura --- savevm.c | 76 - sysemu.h |1 + 2 files changed, 75 inser

[Qemu-devel] [RFC PATCH 03/20] Use cpu_physical_memory_set_dirty_range() to update phys_ram_dirty.

2010-04-20 Thread Yoshiaki Tamura
Modifies kvm_get_dirty_pages_log_range to use cpu_physical_memory_set_dirty_range() to update the row of the bit-based phys_ram_dirty bitmap at once. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- qemu-kvm.c | 19 +++ 1 files changed, 7 insertions(+), 12 deletion

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

2010-04-20 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 --- migration.c |3 +++ qemu-monitor.hx |7 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index c81

[Qemu-devel] [RFC PATCH 16/20] Introduce event_tap fucntions and ft_tranx_ready().

2010-04-20 Thread Yoshiaki Tamura
event_tap controls when to start ft transaction. do_event_tap() should be instered to the device emulators. ft_tranx_ready() kicks the transaction. Signed-off-by: Yoshiaki Tamura --- migration.c | 77 + migration.h |2 + qemu-com

Re: [Qemu-devel] [GSoC 2010] Pass-through filesystem support.

2010-04-20 Thread Mohammed Gamal
On Tue, Apr 20, 2010 at 8:36 PM, jvrao wrote: ... ... >> This'd be something interesting to do. I wonder if that would fit in >> the GSoC timeframe, or whether it'd be a little too short. So how long >> you'd estimate something like that would take? > > I think it would take ~3PM for someone wi

[Qemu-devel] [PATCH] ehci: minor updates/bugfixes to debug statements

2010-04-20 Thread David Ahern
Minor updates/bugfixes to debug statements. Signed-off-by: David Ahern --- hw/usb-ehci.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 218d590..c91a6b5 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -899

Re: [Qemu-devel] Problem with QEMU on KVM

2010-04-20 Thread Jamie Lokier
Gerhard Wiesinger wrote: > Any ideas from which change this might come (PS/2 mouse code seems to be > stable only keyboard LEDs added by Gerd)? No, but you might find it with "git bisect" since you have a working and non-working version. -- Jamie

[Qemu-devel] Re: sparc32 FPU SP Invalid CEXC Test

2010-04-20 Thread Artyom Tarasenko
2010/4/16 Artyom Tarasenko : > 2010/4/15 Artyom Tarasenko : >> 2010/4/15 Blue Swirl : >>> On 4/15/10, Artyom Tarasenko wrote: 2010/4/15 Artyom Tarasenko : > One of LX's tests crashes pretty hard, causing qemu abort.  > I've tried to look how does the execution flow works with -

[Qemu-devel] Re: [PATCH 12/22] QError: New QERR_STATEVM_SAVE_FAILED

2010-04-20 Thread Luiz Capitulino
On Tue, 20 Apr 2010 23:31:22 +0200 Juan Quintela wrote: > Luiz Capitulino wrote: > > Signed-off-by: Luiz Capitulino > > VMState already used for two things in qemu, but I think that changing > to StateVM _only_ on the error messages is wrong. Leave it as vmstate, > and if rest of things get e

[Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM

2010-04-20 Thread Luiz Capitulino
On Tue, 20 Apr 2010 23:28:23 +0200 Juan Quintela wrote: > Luiz Capitulino wrote: > > do_loadvm(), which implements the 'loadvm' Monitor command, pauses > > the emulation to load the saved VM, however it will only resume > > it if the loading succeeds. > > > > In other words, if the user issues '

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG

2010-04-20 Thread Jamie Lokier
Ian Molton wrote: > I've merely implemented one solution in qemu that other hypervisors > *AND* the kernel already support, and that users want. I think that's a good reason to include virtio-rng support in some form. I suspect Paul's objection may have been due to an impression that virtio-rng w

[Qemu-devel] Re: [RFC 00/22]: QMP: Convert savevm/loadvm/delvm

2010-04-20 Thread Juan Quintela
Luiz Capitulino wrote: > Hi there, > > Libvirt has a new snapshot API which uses savevm, loadvm and delvm, so we > need to convert them to QMP. > > I thought this wouldn't be difficult, but while doing and testing this work > I hit a number of problems and had to made not so easy decisions. > >

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG

2010-04-20 Thread Ian Molton
Jamie Lokier wrote: > Ian Molton wrote: >> Jamie Lokier wrote: >>> What do the other hypervisors supporting virtio-rng do? >> Um. support it? Im not sure what you mean there. > > Do the other hypervisors do anything special to support EGD, or is it > just treated as another kind of serial port co

[Qemu-devel] Re: [PATCH 12/22] QError: New QERR_STATEVM_SAVE_FAILED

2010-04-20 Thread Juan Quintela
Luiz Capitulino wrote: > Signed-off-by: Luiz Capitulino VMState already used for two things in qemu, but I think that changing to StateVM _only_ on the error messages is wrong. Leave it as vmstate, and if rest of things get ever changed, change just everything? > --- > qerror.c |4 >

[Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM

2010-04-20 Thread Juan Quintela
Luiz Capitulino wrote: > do_loadvm(), which implements the 'loadvm' Monitor command, pauses > the emulation to load the saved VM, however it will only resume > it if the loading succeeds. > > In other words, if the user issues 'loadvm' and it fails, the > end result will be an error message and a

[Qemu-devel] [PATCH 22/22] savevm: Convert do_loadvm() to QObject

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- monitor.c |7 +-- qemu-monitor.hx |3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index 542c858..32f0396 100644 --- a/monitor.c +++ b/monitor.c @@ -2465,18 +2465,21 @@ static int do_closefd(Monitor *

[Qemu-devel] [PATCH 21/22] savevm: Convert do_loadvm() to QError

2010-04-20 Thread Luiz Capitulino
Note that the current code (switch statement) reports errors and warnings. In QMP though, only errors can be reported. To fix this we introduce two functions: load_vmstate_warn() and load_vmstate_error(). So that we maintain the user monitor behavior, and do the right thing for QMP. Signed-off-by

[Qemu-devel] [PATCH 20/22] savevm: Convert do_savevm() to QObject

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qemu-monitor.hx |3 ++- savevm.c|7 +-- sysemu.h|2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 71cb1a2..9a699d4 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -

[Qemu-devel] [PATCH 16/22] savevm: Convert delete_snapshot() to QError

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- savevm.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/savevm.c b/savevm.c index 3ccb246..55cf848 100644 --- a/savevm.c +++ b/savevm.c @@ -1628,12 +1628,11 @@ static int delete_snapshot(Monitor *mon, BlockDriverState *bs, i

[Qemu-devel] [PATCH 19/22] savevm: Convert do_savevm() to QError

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- savevm.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/savevm.c b/savevm.c index 031eeff..8a9e9d1 100644 --- a/savevm.c +++ b/savevm.c @@ -1682,7 +1682,7 @@ void do_savevm(Monitor *mon, const QDict *qdict) bs = get_bs_sna

[Qemu-devel] [PATCH 18/22] savevm: Convert do_delvm() to QObject, QError

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qemu-monitor.hx |3 ++- savevm.c| 14 ++ sysemu.h|2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 5ea5748..71cb1a2 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor

[Qemu-devel] [PATCH 17/22] savevm: delete_snapshot(): Remove unused parameter

2010-04-20 Thread Luiz Capitulino
The parameter 'mon' is unused after the conversion to QError, done by the previous commit. Signed-off-by: Luiz Capitulino --- savevm.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/savevm.c b/savevm.c index 55cf848..643273e 100644 --- a/savevm.c +++ b/savevm.

[Qemu-devel] [PATCH 13/22] QError: New QERR_STATEVM_LOAD_FAILED

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 95c1a95..b0cd7b1 100644 --- a/qerror.c +++ b/qerror.c @@ -201,6 +201,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 14/22] QError: New QERR_DEVICE_NO_SNAPSHOT

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index b0cd7b1..078fc43 100644 --- a/qerror.c +++ b/qerror.c @@ -101,6 +101,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 15/22] QError: New QERR_SNAPSHOT_NOT_FOUND

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 078fc43..c8e9393 100644 --- a/qerror.c +++ b/qerror.c @@ -105,6 +105,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 11/22] QError: New QERR_SNAPSHOT_ACTIVATE_FAILED

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index e0df25f..aa6892d 100644 --- a/qerror.c +++ b/qerror.c @@ -181,6 +181,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 10/22] QError: New QERR_SNAPSHOT_CREATE_FAILED

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 347ff36..e0df25f 100644 --- a/qerror.c +++ b/qerror.c @@ -181,6 +181,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 12/22] QError: New QERR_STATEVM_SAVE_FAILED

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index aa6892d..95c1a95 100644 --- a/qerror.c +++ b/qerror.c @@ -197,6 +197,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 08/22] QError: New QERR_SNAPSHOT_NO_DEVICE

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 034c7de..648d438 100644 --- a/qerror.c +++ b/qerror.c @@ -181,6 +181,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 09/22] QError: New QERR_SNAPSHOT_DELETE_FAILED

2010-04-20 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 648d438..347ff36 100644 --- a/qerror.c +++ b/qerror.c @@ -181,6 +181,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 04/22] savevm: do_loadvm(): Always resume the VM

2010-04-20 Thread Luiz Capitulino
do_loadvm(), which implements the 'loadvm' Monitor command, pauses the emulation to load the saved VM, however it will only resume it if the loading succeeds. In other words, if the user issues 'loadvm' and it fails, the end result will be an error message and a paused VM. This seems an undesirab

[Qemu-devel] [PATCH 06/22] savevm: load_vmstate(): Improve error check

2010-04-20 Thread Luiz Capitulino
We should fail if something goes wrong in the call to bdrv_snapshot_find(). Currently, we only fail if 'sn.vm_state_size' is not what we expect it to be. Signed-off-by: Luiz Capitulino --- savevm.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c

[Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string()

2010-04-20 Thread Luiz Capitulino
There are error handling functions in QEMU which print errno codes to the user. While it's debatable if this is good from a user perspective, sometimes it's the best you can do because it's what system calls return and this is also useful for debugging. So, we need a way to expose those codes in Q

[Qemu-devel] [PATCH 1/2] io: Add CPUIOMemoryOps and use it.

2010-04-20 Thread Richard Henderson
Transition the core i/o bits away from a couple of flat arrays to use a structure naming the read/write callbacks. For now, retain the flat array interface for the drivers. Signed-off-by: Richard Henderson --- cpu-common.h | 14 ++- exec-all.h |3 +- exec.c | 32

[Qemu-devel] [PATCH 05/22] savevm: load_vmstate(): Return 'ret' on error

2010-04-20 Thread Luiz Capitulino
When looping to restore the snapshot on all drives, load_vmstate() will return 0 if bdrv_snapshot_goto() returns an error. This seems a trick to avoid the call to vm_start() in do_loadvm(), however it brings two problems: 1. The call to load_vmstate() from main() will succeed 2. In QMP, it's jus

[Qemu-devel] [PATCH 2/2] io: Add readq/writeq hooks and use them.

2010-04-20 Thread Richard Henderson
If the device provides full 64-bit i/o routines, use them instead of forcing the i/o to be split into two 32-bit i/o calls. Signed-off-by: Richard Henderson --- cpu-common.h |5 ++ exec.c | 144 ++-- softmmu_template.h |8

[Qemu-devel] [PATCH 03/22] savevm: Introduce delete_snapshot() and use it

2010-04-20 Thread Luiz Capitulino
del_existing_snapshots() and do_delvm() can share some code as the two call bdrv_snapshot_delete() and print a message to the user if an error has happened. This commit introduces a new function to share this code. Please, note that while do_delvm() should stay the same, del_existing_snapshots()

[Qemu-devel] [PATCH 02/22] savevm: Don't check the return of qemu_fopen_bdrv()

2010-04-20 Thread Luiz Capitulino
It never fails. Signed-off-by: Luiz Capitulino --- savevm.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/savevm.c b/savevm.c index 086c92a..254f9fc 100644 --- a/savevm.c +++ b/savevm.c @@ -1705,10 +1705,6 @@ void do_savevm(Monitor *mon, const QDict *qdict)

[Qemu-devel] [PATCH 0/2] [RFC] 64-bit io paths

2010-04-20 Thread Richard Henderson
Step 1 to implementing alpha-softmmu is to properly handle 64-bit I/O operations. Tristan Gingold managed a hack where he buffered half of the I/O operation in the host bridge; I think that's not something we want to encourage. I'm a bit confused about IO_MEM_SUBWIDTH and subpage_register, and wh

[Qemu-devel] [RFC 00/22]: QMP: Convert savevm/loadvm/delvm

2010-04-20 Thread Luiz Capitulino
Hi there, Libvirt has a new snapshot API which uses savevm, loadvm and delvm, so we need to convert them to QMP. I thought this wouldn't be difficult, but while doing and testing this work I hit a number of problems and had to made not so easy decisions. Most of the time, the problem is that

[Qemu-devel] [PATCH 01/22] QMP: Introduce RESUME event

2010-04-20 Thread Luiz Capitulino
It's emitted when the Virtual Machine resumes execution. This is needed because next patches will convert savevm/loadvm to QMP and they call vm_stop() (which causes QMP to emit the STOP event) and vm_start() (which doesn't emit any event). Clients will get confused with a STOP event without a mat

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG

2010-04-20 Thread Jamie Lokier
Ian Molton wrote: > Jamie Lokier wrote: > > Hi :-) > > > Ian Molton wrote: > >> One last and quite important point - where should the EGD protocol > >> implementation go? really it needs to work as kind-of a line discipline, > >> but AFAICT thats not supported? it would be a mistake to put rate >

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG

2010-04-20 Thread Blue Swirl
On 4/20/10, Ian Molton wrote: > Jamie Lokier wrote: > > Hi :-) > > > Ian Molton wrote: > >> One last and quite important point - where should the EGD protocol > >> implementation go? really it needs to work as kind-of a line discipline, > >> but AFAICT thats not supported? it would be a mista

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG

2010-04-20 Thread Ian Molton
Jamie Lokier wrote: Hi :-) > Ian Molton wrote: >> One last and quite important point - where should the EGD protocol >> implementation go? really it needs to work as kind-of a line discipline, >> but AFAICT thats not supported? it would be a mistake to put rate >> limiting in the chardev layer an

Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN

2010-04-20 Thread Gerd Hoffmann
On 04/20/10 14:28, Paul Brook wrote: I sent out this series as a "feeler" to see if the approach was acceptable. Paul didn't reply to my reply addressing his concern, so I take that as he's OK with the approach as well :-) I'd probably exposed this as an asyncronous write rather than nonblocki

[Qemu-devel] [PATCH] hw: better i440 emulation

2010-04-20 Thread Bernhard M. Wiedemann
updated version of an old patch http://xenon.stanford.edu/~eswierk/misc/qemu-linuxbios/qemu-piix-ram-size.patch that together with http://www.mail-archive.com/linuxb...@linuxbios.org/msg02390.html (which is already in coreboot trunk) allows coreboot to autodetect the amount of RAM within qemu/kvm

Re: [Qemu-devel] [GSoC 2010] Pass-through filesystem support.

2010-04-20 Thread jvrao
Mohammed Gamal wrote: > On Tue, Apr 20, 2010 at 12:54 AM, jvrao wrote: >> Mohammed Gamal wrote: >>> On Tue, Apr 13, 2010 at 9:08 PM, jvrao wrote: jvrao wrote: > Alexander Graf wrote: >> On 12.04.2010, at 13:58, Jamie Lokier wrote: >> >>> Mohammed Gamal wrote: On Mon,

[Qemu-devel] [PATCH] [S390] Add firmware code

2010-04-20 Thread Alexander Graf
This patch adds a firmware blob to the S390 target. The blob is a simple implementation of a virtio client that tries to read the second stage bootloader from sectors described as of offset 0x20 in the MBR. In combination with an updated zipl this allows for booting from virtio block devices. This

[Qemu-devel] Re: [PATCH v2] pci: fix pci_find_bus().

2010-04-20 Thread Blue Swirl
Thanks, applied. On 4/12/10, Isaku Yamahata wrote: > When looking down child bus, it should look parent bridge's > bus number, not child bus's. > > Optimized tail recursion and style fix. > > > Cc: Blue Swirl > Cc: "Michael S. Tsirkin" > Signed-off-by: Isaku Yamahata > --- > > hw/pci.c |

[Qemu-devel] [PATCH] [S390] Add firmware code

2010-04-20 Thread Alexander Graf
This patch adds a firmware blob to the S390 target. The blob is a simple implementation of a virtio client that tries to read the second stage bootloader from sectors described as of offset 0x20 in the MBR. In combination with an updated zipl this allows for booting from virtio block devices. This

[Qemu-devel] Re: sparc: potentially incorrect if dynamic npc?

2010-04-20 Thread Blue Swirl
On 4/20/10, Artyom Tarasenko wrote: > 2010/4/20 Blue Swirl : > > > On 4/20/10, Artyom Tarasenko wrote: > >> /* XXX: potentially incorrect if dynamic npc */ > >> static void do_branch > >> > >> There are few comments like this in target-sparc/translate.c . > >> In what case is it incorrect

[Qemu-devel] [PATCH] [S390] Add firmware code

2010-04-20 Thread Alexander Graf
This patch adds a firmware blob to the S390 target. The blob is a simple implementation of a virtio client that tries to read the second stage bootloader from sectors described as of offset 0x20 in the MBR. In combination with an updated zipl this allows for booting from virtio block devices. This

[Qemu-devel] [PATCH] [RESEND] Make char muxer more robust wrt small FIFOs

2010-04-20 Thread Alexander Graf
Virtio-Console can only process one character at a time. Using it on S390 gave me strage "lags" where I got the character I pressed before when pressing one. So I typed in "abc" and only received "a", then pressed "d" but the guest received "b" and so on. While the stdio driver calls a poll functi

Re: [Qemu-devel] [PATCH 1/1] hw: better i440 emulation

2010-04-20 Thread Andreas Färber
Am 19.04.2010 um 17:47 schrieb Bernhard M. Wiedemann: attached is a tested 0.12.3-version of an old patch http://xenon.stanford.edu/~eswierk/misc/qemu-linuxbios/qemu-piix-ram-size.patch that together with http://www.mail-archive.com/linuxb...@linuxbios.org/msg02390.html (which is already in core

[Qemu-devel] Re: sparc: potentially incorrect if dynamic npc?

2010-04-20 Thread Artyom Tarasenko
2010/4/20 Blue Swirl : > On 4/20/10, Artyom Tarasenko wrote: >> /* XXX: potentially incorrect if dynamic npc */ >> static void do_branch >> >> There are few comments like this in target-sparc/translate.c . >> In what case is it incorrect? >> >> Can do_branch functions be called with dynamic np

Re: [Qemu-devel] [PATCH] slirp: fix structure initialization in tcp_listen()

2010-04-20 Thread Blue Swirl
Thanks, applied. On 4/13/10, juha.riihim...@nokia.com wrote: > From: Juha Riihimäki > > A data structure of type sockaddr_in is allocated from stack but not > properly initialized. This may lead to a failure in the bind() call > later on. Fixed by filling the contents of the structure with ze

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG

2010-04-20 Thread Jamie Lokier
Ian Molton wrote: > One last and quite important point - where should the EGD protocol > implementation go? really it needs to work as kind-of a line discipline, > but AFAICT thats not supported? it would be a mistake to put rate > limiting in the chardev layer and leave the EGD protocol implementa

[Qemu-devel] Re: sparc: potentially incorrect if dynamic npc?

2010-04-20 Thread Blue Swirl
On 4/20/10, Artyom Tarasenko wrote: > /* XXX: potentially incorrect if dynamic npc */ > static void do_branch > > There are few comments like this in target-sparc/translate.c . > In what case is it incorrect? > > Can do_branch functions be called with dynamic npc? Maybe, if there are two bran

[Qemu-devel] sparc: potentially incorrect if dynamic npc?

2010-04-20 Thread Artyom Tarasenko
/* XXX: potentially incorrect if dynamic npc */ static void do_branch There are few comments like this in target-sparc/translate.c . In what case is it incorrect? Can do_branch functions be called with dynamic npc?

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG

2010-04-20 Thread Ian Molton
Paul Brook wrote: >> So, rather than bike-shedding, how about making some kind of decision? > > Ok, let me make this simple. Great! > Features such as rate limiting and EGD protocol translation should not be > part > of individual device emulation. They are part of the host interface, not the

[Qemu-devel] KVM call minutes for Apr 20

2010-04-20 Thread Chris Wright
call agenda - send out a bit earlier - cancel call if no agenda 0.12.4 - expect when Anthony is back online KVM Forum 2010 - call for papers is out...send in your proposals!

Re: [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH

2010-04-20 Thread Paul Brook
> Does this mean that virtio-blk supports all three combinations? > >1. FLUSH that isn't a barrier >2. FLUSH that is also a barrier >3. Barrier that is not a flush > > 1 is good for fsync-like operations; > 2 is good for journalling-like ordered operations. > 3 sounds like it doesn't

Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN

2010-04-20 Thread Amit Shah
On (Tue) Apr 20 2010 [13:28:48], Paul Brook wrote: > > It would be useful to have a debugging mode where the chardev layer > deliberately returns spurious EAGAIN and short writes. Otherwise you've got a > lot of very poorly tested device fallback code. I have low confidence in > getting this ri

Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN

2010-04-20 Thread Paul Brook
> I sent out this series as a "feeler" to see if the approach was > acceptable. > > Paul didn't reply to my reply addressing his concern, so I take that as > he's OK with the approach as well :-) I'd probably exposed this as an asyncronous write rather than nonblocking operation. However both ha

Re: [Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-20 Thread Alexander Graf
On 20.04.2010, at 13:38, Jan Kiszka wrote: > Alexander Graf wrote: >> On 20.04.2010, at 09:18, Jan Kiszka wrote: >> >>> Jun Koi wrote: Thank you for the explanation of this code. Qemu has a command named singlestep, which reduces the translated code block to be only one inst

Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN

2010-04-20 Thread Amit Shah
On (Tue) Apr 20 2010 [13:32:18], Gerd Hoffmann wrote: >> static void tcp_chr_connect(void *opaque) >> { > >> +chr->write_blocked = false; >> s->connected = 1; >> qemu_set_fd_handler2(s->fd, tcp_chr_read_poll, >> - tcp_chr_read, NULL, chr); >> +

Re: [Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-20 Thread Jan Kiszka
Alexander Graf wrote: > On 20.04.2010, at 09:18, Jan Kiszka wrote: > >> Jun Koi wrote: >>> Thank you for the explanation of this code. >>> >>> Qemu has a command named singlestep, which reduces the translated code >>> block to be only one instruction. >>> This new patch flushes TBs both when singl

Re: [Qemu-devel] [PATCH v3 2/4] char: Add ability to provide a callback when write won't return -EAGAIN

2010-04-20 Thread Gerd Hoffmann
static void tcp_chr_connect(void *opaque) { +chr->write_blocked = false; s->connected = 1; qemu_set_fd_handler2(s->fd, tcp_chr_read_poll, - tcp_chr_read, NULL, chr); + tcp_chr_read, tcp_chr_write_unblocked, chr); This is wron

Re: [Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-20 Thread Alexander Graf
On 20.04.2010, at 09:18, Jan Kiszka wrote: > Jun Koi wrote: >> Thank you for the explanation of this code. >> >> Qemu has a command named singlestep, which reduces the translated code >> block to be only one instruction. >> This new patch flushes TBs both when singlestep is on and off. >> >> Si

[Qemu-devel] Re: [PATCH v2] qcow2: Fix creation of large images

2010-04-20 Thread Juan Quintela
Kevin Wolf wrote: > qcow_create2 assumes that the new image will only need one cluster for its > refcount table initially. Obviously that's not true any more when the image is > big enough (exact value depends on the cluster size). > > This patch calculates the refcount table size dynamically. > >

[Qemu-devel] [PATCH] fix curses update

2010-04-20 Thread Bernhard Kauer
If a terminal is resized or the VGA model issues a full refresh, curses_update() is called, which uses mvwaddchnstr() to draw a full line of characters. Unfortunatelly this routine expects a null-terminated string and early aborts if a null is present in the line. When booting an OS that zeros

Re: [Qemu-devel] [PATCH 0/4]: QMP: Fix segfault in bad input

2010-04-20 Thread Markus Armbruster
Luiz Capitulino writes: > First, we do some QError usage cleanup in handle_qmp_command() and then > really fix the bug in the last patch. The bug is that we neglect to check that command object member "arguments" is an object before we access its members. Crashes when it's not an object. The

Re: [Qemu-devel] [PATCH 1/2] raw-posix: Use pread/pwrite instead of lseek+read/write

2010-04-20 Thread Kevin Wolf
Am 19.04.2010 14:34, schrieb Stefan Hajnoczi: > This patch combines the lseek+read/write calls to use pread/pwrite > instead. This will result in fewer system calls and is already used by > AIO. > > Thanks to Jan Kiszka for identifying excessive > lseek and Christoph Hellwig for confirming that

[Qemu-devel] Re: [PATCH v2] block: Cache total_sectors to reduce bdrv_getlength calls

2010-04-20 Thread Kevin Wolf
Am 19.04.2010 17:56, schrieb Stefan Hajnoczi: > The BlockDriver bdrv_getlength function is called from the I/O code path > when checking that the request falls within the device. Unfortunately > this involves an lseek system call in the raw protocol; every read or > write request will incur this l

Re: [Qemu-devel] [PATCH] Monitor: Return before exiting with 'quit'

2010-04-20 Thread Markus Armbruster
Luiz Capitulino writes: > The 'quit' Monitor command (implemented by do_quit()) calls > exit() directly, this is problematic under QMP because QEMU > exits before having a chance to send the ok response. > > Clients don't know if QEMU exited because of a problem or > because the 'quit' command ha

Re: [Qemu-devel] [PATCH v2] Write cmos hd data for ide drives using -device parm

2010-04-20 Thread Gerd Hoffmann
Hi, Not much traffic on this thread ;-) Indeed ;) I can see the usefulness of an init_late() to generalize post device setup issues. I assume then that you didn't have any other issues with my patch, other than general code structure concerns? Yes, that is the major one. I think it is

[Qemu-devel] Re: [PATCH] flush TB on singlestep command

2010-04-20 Thread Jan Kiszka
Jun Koi wrote: > Thank you for the explanation of this code. > > Qemu has a command named singlestep, which reduces the translated code > block to be only one instruction. > This new patch flushes TBs both when singlestep is on and off. > > Signed-off-by: Jun Koi > > > diff --git a/monitor.c b