[Qemu-devel] Re: [QEMU-KVM]: Megasas + TCM_Loop + SG_IO into Windows XP guests

2010-05-14 Thread Hannes Reinecke
Nicholas A. Bellinger wrote: > Greetings Hannes and co, > > I have been spending a bit of time trying Megasas HBA emulation + > TCM_Loop + SG_IO with a Windows XP SP2 KVM guests.. So far, I noticed > that hw/scsi-generic.c:execute_command_run() using bdev_aio_ioctl() > appears to be broken for XP

[Qemu-devel] [PATCH 1/2] megasas: Use MFI interface definitions from mfi.h

2010-05-14 Thread Hannes Reinecke
The megasas driver was using it's own definitions. Remove them. Signed-off-by: Hannes Reinecke --- hw/megasas.c | 68 +++-- hw/mfi.h |5 ++- 2 files changed, 21 insertions(+), 52 deletions(-) diff --git a/hw/megasas.c b/hw/megasas.c

[Qemu-devel] [PATCH 2/2] megasas: Error checking for cpu_physical_memory_map()

2010-05-14 Thread Hannes Reinecke
cpu_physical_memory_map() can fail, so we really should check for errors here. Plus a fix for a small casting error. Signed-off-by: Hannes Reinecke --- hw/megasas.c | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/hw/megasas.c b/hw/megasas.c index

[Qemu-devel] [PATCH 11/26] pc: make pc_init1() not refer ferr_irq directly.

2010-05-14 Thread Isaku Yamahata
By introducing a registering function, make pc_init1() not refer to ferr_irq directly in order to make ferr_irq piix independent. Later pc_init1() will be split out into another file keeping ferr_irq static. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c |8 +++- hw/p

[Qemu-devel] [PATCH 15/26] pc: split out basic device init from pc_init1() into pc_basic_device_init()

2010-05-14 Thread Isaku Yamahata
Split out basic device, i.e. legacy devices like floppy, initialization from pc_init1() into pc_basic_device_init(). Later it will be used. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c | 86 +++--- 1 files changed, 4

[Qemu-devel] [PATCH 00/26] split out piix specific part from pc emulator and some clean ups

2010-05-14 Thread Isaku Yamahata
patch series description: This patch series is for spliting out piix specific part from pc emulator to make it easier to implement other pc chipset emulator. I observed that make was confused not to rebuild files sometimes due to splitting up a file into files. It results in duplicated/undefined s

[Qemu-devel] [PATCH 07/26] pc: make an unnecessary global variable, pit, local.

2010-05-14 Thread Isaku Yamahata
remove unnecessary global static variables, pit. Make it local. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 691803f..b23684e 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -67,7 +67,6

[Qemu-devel] [PATCH 01/26] acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c

2010-05-14 Thread Isaku Yamahata
Split out piix4 smbus routines from acpi.c into pm_smbus.c and use it. The split out smbus emulation will be used later. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann Cc: Aurelien Jarno --- changes v11 -> v12 - switch the prefix, pc to pm since this is used by not only pc, but also m

[Qemu-devel] [PATCH 02/26] acpi: split out apm register emulation from acpi.c

2010-05-14 Thread Isaku Yamahata
Split out apm register emulation for acpi.c into apm.c. The apm emulation will be used later. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann Cc: Aurelien Jarno --- changes v11 -> v12 - drop pc prefix as this is used by not only pc, but also mips. including filenames and symbol names -

[Qemu-devel] [PATCH 04/26] acpi: split acpi.c into the common part and the piix4 part.

2010-05-14 Thread Isaku Yamahata
Split acpi.c into the common part and the piix4 specific part. The common part will be used later. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- Makefile.target |4 +- hw/acpi.c | 562 --- hw/{acpi.c => acpi_

[Qemu-devel] [PATCH 10/26] pc: introduce a function to allocate cpu irq.

2010-05-14 Thread Isaku Yamahata
Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq in order to make pic_irq_request() piix independent. Later piix code will be split out to another file keeping pic_irq_request() static. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c |7 ++- 1 files cha

[Qemu-devel] [PATCH 05/26] pc: initialize ioapic before use.

2010-05-14 Thread Isaku Yamahata
The changeset of 2c8d9340203c7f19265fd4cb2341f568217a3af6 prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic. However it would be better to initialize the member before reference. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c |6 +++--- 1 files changed,

[Qemu-devel] [PATCH 13/26] pc: split out memory allocation from pc_init1() into pc_memory_init()

2010-05-14 Thread Isaku Yamahata
Split out memory allocation and rom/bios loading which doesn't depend on piix from pc_init1() into pc_memory_init(). Later it will be used. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c | 73 ++ 1 files changed, 4

[Qemu-devel] [PATCH 08/26] pc: remove a global variable, floppy_controller.

2010-05-14 Thread Isaku Yamahata
Remove a global variable, floppy_controller. Since it is unnecessarily global, make it local and pass it as a function argument. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/pc.c b/hw/pc.c in

[Qemu-devel] [PATCH 09/26] pc: remove global variable rtc_state by using qemu_irq.

2010-05-14 Thread Isaku Yamahata
Remove the reference to the global variable, rtc_state, by passing function argument to cmos_init_hd(), cmos_init(). Signed-off-by: Isaku Yamahata Cc: Paolo Bonzini Acked-by: Gerd Hoffmann Cc: Blue Swirl --- Changes v12 -> v13 Blue already converted the CMOS S3 to use qemu_irq by the change s

[Qemu-devel] [PATCH 14/26] pc: split out vga initialization from pc_init1() into pc_vga_init().

2010-05-14 Thread Isaku Yamahata
Split out vga initialization which is independent of piix from pc_init1() as pc_vga_init(). Later it will be used. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c | 41 +++-- 1 files changed, 23 insertions(+), 18 deletions(-) diff --git a

[Qemu-devel] [PATCH 06/26] pc, i440fx: Make smm enable/disable function i440fx independent.

2010-05-14 Thread Isaku Yamahata
make cpu_smm_update() generic to be independent on i440fx by registering a callback. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c | 18 +++--- hw/pc.h |4 +++- hw/piix_pci.c |5 - 3 files changed, 22 insertions(+), 5 deletions(-) diff

[Qemu-devel] Re: [PATCH] Fix docs for block stats monitor command

2010-05-14 Thread Kevin Wolf
Am 13.05.2010 12:30, schrieb Daniel P. Berrange: > The 'parent' field in the 'query-blockstats' monitor command is > part of the top level block device QDict, not part of the 2nd > level 'stats' QDict. > > * block.c: Fix docs for 'parent' field in block stats monitor > command output > > Signed

[Qemu-devel] [PATCH 24/26] acpi_piix4: remove #ifdef DEBUG.

2010-05-14 Thread Isaku Yamahata
removed #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/acpi_piix4.c | 55 ++- 1 files changed, 18 insertions(+), 37 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index bb3d094..fdef69

[Qemu-devel] [PATCH 21/26] pci hotplug: add argument to pci hot plug callback.

2010-05-14 Thread Isaku Yamahata
Add argument, DeviceState*, to pci hot plug callback. The argument will be used later to remove global variable. Signed-off-by: Blue Swirl Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- changes v10 -> v11: - change callback argument from void* to DeviceState*. --- hw/acpi_piix4.c |

Re: [Qemu-devel] [RFC PATCH 0/2] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread Kevin Wolf
Am 13.05.2010 16:03, schrieb MORITA Kazutaka: > To support snapshot in a protocol, I'd like to call the hander of the > protocol driver in the following functions in block.c: > > bdrv_snapshot_create > bdrv_snapshot_goto > bdrv_snapshot_delete > bdrv_snapshot_list > bdrv_save_v

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-14 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 13 May 2010 19:23:11 +0300 > Avi Kivity wrote: > >> On 05/13/2010 06:01 PM, Daniel P. Berrange wrote: >> > >> >> Yes, we do and it's used by libvirt iirc. >> >> >> > This command has been in QEMU for quite a long time now (0.9.x IIRC). >> > >> >> It

[Qemu-devel] [PATCH 18/26] pc: move rtc declarations from pc.h into a dedicated header file.

2010-05-14 Thread Isaku Yamahata
Move rtc_xxx declarations from pc.h into mc146818rtc.h. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/mc146818rtc.h | 10 ++ hw/pc.h |9 + 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 hw/mc146818rtc.h diff --git a/hw/mc1468

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-14 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 13 May 2010 16:48:13 +0300 > Avi Kivity wrote: > >> On 05/05/2010 10:11 PM, Luiz Capitulino wrote: >> > One of the most important missing feature in QMP today is its >> > supported commands documentation. >> > >> > The plan is to make it part of self-description

[Qemu-devel] [PATCH 25/26] apm: remove #ifdef DEBUG.

2010-05-14 Thread Isaku Yamahata
remove #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/apm.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/apm.c b/hw/apm.c index d20db3d..3cbde43 100644 --- a/hw/apm.c +++ b/hw/apm.c @@ -23,6 +23,12 @@ //#d

[Qemu-devel] [PATCH 26/26] mc146818rtc: remove #ifdef DEBUG_CMOS.

2010-05-14 Thread Isaku Yamahata
remove #ifdef DEBUG_CMOS by using macro. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/mc146818rtc.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index cd5e0d7..bf648e5 100644 --- a/hw/mc146818rtc.c

[Qemu-devel] [PATCH 03/26] acpi: add acpi constants from linux header files and use them.

2010-05-14 Thread Isaku Yamahata
add acpi constants from linux header files and replace the old constants with them. The acpi constants will be used by other file. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/acpi.c | 56 +++ hw/acpi.h | 78 +++

[Qemu-devel] [PATCH 12/26] pc: split out cpu initialization from pc_init1() into pc_cpus_init().

2010-05-14 Thread Isaku Yamahata
split out cpu initialization which is piix independent from pc_init1() into pc_cpus_init(). Later it will be used. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c | 31 +++ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/pc.c b

[Qemu-devel] [PATCH 20/26] acpi_piix4: qdevfy.

2010-05-14 Thread Isaku Yamahata
qdevfy acpi_piix4. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- changes v10 -> v11: - pass DeviceState of piix4-pm to pc_smbus_init(). Now info qtree shows smbus. --- hw/acpi_piix4.c | 61 +- 1 files changed, 46 insertions(+)

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-14 Thread Markus Armbruster
Avi Kivity writes: > On 05/05/2010 10:11 PM, Luiz Capitulino wrote: >> One of the most important missing feature in QMP today is its >> supported commands documentation. >> >> The plan is to make it part of self-description support, however >> self-description is a big task we have been postponin

[Qemu-devel] [PATCH 16/26] pc: split out pci device init from pc_init1() into pc_pci_device_init()

2010-05-14 Thread Isaku Yamahata
Split out pci device initialization from pc_init1() into pc_pci_device_init(). and removed unnecessary braces. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pc.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index d8

[Qemu-devel] [PATCH 23/26] pm_smbus: remove #ifdef DEBUG.

2010-05-14 Thread Isaku Yamahata
remove #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/pm_smbus.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/pm_smbus.c b/hw/pm_smbus.c index 6ef6b9e..9929d72 100644 --- a/hw/pm_smbus.c +++ b/hw/pm_s

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-14 Thread Markus Armbruster
Avi, thanks a lot for reviewing this!

[Qemu-devel] [PATCH 17/26] pc: split out piix specific part from pc.c into pc_piix.c

2010-05-14 Thread Isaku Yamahata
Finally, we can safely split out the piix specific part from pc.c into pc_piix.c. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- Makefile.target |2 +- hw/fdc.h|5 + hw/pc.c | 351 --- hw/pc.h | 33

[Qemu-devel] [PATCH 19/26] rtc: make rtc_xxx accept/return ISADevice instead of RTCState.

2010-05-14 Thread Isaku Yamahata
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice instead of RTCState. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/mc146818rtc.c | 26 +++--- hw/mc146818rtc.h |8 hw/mips_jazz.c |1 + hw/mips_malta.c |3 ++- hw/mi

[Qemu-devel] [PATCH 22/26] pci hotadd, acpi_piix4: remove global variables

2010-05-14 Thread Isaku Yamahata
remove global variables, gpe and pci0_status by moving them into PIIX4PMState. Signed-off-by: Blue Swirl Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- Changes v12 -> v13: - minor style clean up Changes v10 -> v11: - change callback argument of hotplug from void* to DeviceState*. -

[Qemu-devel] Re: [PATCH 2/3] target-sparc: Simplify ICC generation.

2010-05-14 Thread Artyom Tarasenko
2010/5/12 Richard Henderson : > Use int32 types instead of target_ulong when computing ICC.  This > simplifies the generated code for 32-bit host and 64-bit guest. > Use the same simplified expressions for ICC as were already used > for XCC in carry flag generation. > > Simplify the ADD carry gener

Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive

2010-05-14 Thread Markus Armbruster
Christoph Hellwig writes: [...] > Markus was looking into separating the block device state in host/ > guest portions lately, and splitting cache= would help with this. > Driver cache enabled or not (fsync means enabled, O_DSYNC disabled, > and none probably disabled given that we don't care), wh

[Qemu-devel] Re: qemu-kvm hangs if multipath device is queing

2010-05-14 Thread Kevin Wolf
Hi Peter, Am 12.05.2010 16:01, schrieb Peter Lieven: > Hi Kevin, > > here we go. I created a blocking multipath device (interrupted all > paths). qemu-kvm hangs with 100% cpu. > also monitor is not responding. > > If I restore at least one path, the vm is continueing. > > BR, > Peter This see

[Qemu-devel] [RFC PATCH v2 1/3] close all the block drivers before the qemu process exits

2010-05-14 Thread MORITA Kazutaka
This patch calls the close handler of the block driver before the qemu process exits. This is necessary because the sheepdog block driver releases the lock of VM images in the close handler. Signed-off-by: MORITA Kazutaka --- block.c |9 + block.h |1 + vl.c|1 + 3 files

[Qemu-devel] [RFC PATCH v2 2/3] block: call the snapshot handlers of the protocol drivers

2010-05-14 Thread MORITA Kazutaka
When snapshot handlers of the format driver is not defined, it is better to call the ones of the protocol driver. This enables us to implement snapshot support in the protocol driver. Signed-off-by: MORITA Kazutaka --- block.c | 48 ++-- 1 files cha

[Qemu-devel] [RFC PATCH v2 0/3] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread MORITA Kazutaka
Hi all, This patch adds a block driver for Sheepdog distributed storage system. Changes from v1 to v2 are: - rebase onto git://repo.or.cz/qemu/kevin.git block - modify the sheepdog driver as a protocol driver - add new patch to call the snapshot handler of the protocol One issue still remain

[Qemu-devel] [RFC PATCH v2 3/3] block: add sheepdog driver for distributed storage support

2010-05-14 Thread MORITA Kazutaka
Sheepdog is a distributed storage system for QEMU. It provides highly available block level storage volumes to VMs like Amazon EBS. This patch adds a qemu block driver for Sheepdog. Sheepdog features are: - No node in the cluster is special (no metadata node, no control node, etc) - Linear scal

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, May 13, 2010 at 10:32:52AM +0200, jes.soren...@redhat.com wrote: >> From: Jes Sorensen >> >> Add -version-simple argument for QEMU, printing just the version >> number, without any supporting text. >> >> This makes it simpler for other apps, such as libvi

[Qemu-devel] Re: [QEMU-KVM]: Megasas + TCM_Loop + SG_IO into Windows XP guests

2010-05-14 Thread Nicholas A. Bellinger
On Fri, 2010-05-14 at 09:22 +0200, Hannes Reinecke wrote: > Nicholas A. Bellinger wrote: > > Greetings Hannes and co, > > > > > So, I ended up needing requiring the following quick hack for > > hw/scsi-generic.c:execute_command_run() to make SG_IO function > > synchronously using bdrv_ioctl(), w

Re: [Qemu-devel] [RFC] New Monitor command: 'info netdevices'

2010-05-14 Thread Markus Armbruster
Luiz Capitulino writes: > Hi there, > > Miguel is working on converting 'info network' to QMP, but turns out that > it's > been quite difficult to maintain the exact same output. > > The main problem seems to be the usage of the 'info_str' string, which some > drivers (like tap, xen, vde, soc

Re: [Qemu-devel] [RFC PATCH 0/2] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread MORITA Kazutaka
At Fri, 14 May 2010 10:32:26 +0200, Kevin Wolf wrote: > > Am 13.05.2010 16:03, schrieb MORITA Kazutaka: > > To support snapshot in a protocol, I'd like to call the hander of the > > protocol driver in the following functions in block.c: > > > > bdrv_snapshot_create > > bdrv_snapshot_goto

Re: [Qemu-devel] [RFC PATCH 0/2] Sheepdog: distributed storage system for QEMU

2010-05-14 Thread Kevin Wolf
Am 14.05.2010 11:54, schrieb MORITA Kazutaka: >>> There is another problem to make the sheepdog driver be a protocol; >>> how to deal with protocol specific create_options? >>> >>> For example, sheepdog supports cloning images as a format driver: >>> >>> $ qemu-img create -f sheepdog dst -b sheep

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 11:42:57AM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Thu, May 13, 2010 at 10:32:52AM +0200, jes.soren...@redhat.com wrote: > >> From: Jes Sorensen > >> > >> Add -version-simple argument for QEMU, printing just the version > >> number, withou

Re: [Qemu-devel] [PATCH] ahci: convert enum to #define

2010-05-14 Thread Sebastian Herbszt
Nathan Froyd wrote: On Thu, May 13, 2010 at 07:19:30PM +0200, Sebastian Herbszt wrote: Convert enum to #define. This doesn't buy you anything except code churn. It actually makes things worse at usual debug levels, too, because the debugger understands enums, but not #define. -Nathan Alex

[Qemu-devel] Re: [RFC PATCH v2 3/3] block: add sheepdog driver for distributed storage support

2010-05-14 Thread Kevin Wolf
Am 14.05.2010 11:51, schrieb MORITA Kazutaka: > Sheepdog is a distributed storage system for QEMU. It provides highly > available block level storage volumes to VMs like Amazon EBS. This > patch adds a qemu block driver for Sheepdog. > > Sheepdog features are: > - No node in the cluster is specia

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Fri, May 14, 2010 at 11:42:57AM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: [...] >> > It would also be nice to avoid having to parse the -help output to >> > determine >> > ARGV supported too. I wonder if it would be a good idea to just pro

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-14 Thread Kevin Wolf
Am 12.05.2010 23:17, schrieb Luiz Capitulino: > On Wed, 12 May 2010 18:48:38 +0200 > Markus Armbruster wrote: > >>> +query-block >>> +--- >>> + >>> +Show the block devices. >>> + >>> +Each block device information is stored in a json-object and the returned >>> value >>> +is a json-array

Re: [Qemu-devel] [PATCH] use qemu_free() instead of free()

2010-05-14 Thread Kevin Wolf
Am 13.05.2010 23:14, schrieb Bruce Rogers: > There is a call to free() where qemu_free() should instead be used. > > Signed-off-by: Bruce Rogers > > diff --git a/block.c b/block.c > index 48305b7..1a9d72d 100644 > --- a/block.c > +++ b/block.c > @@ -2073,7 +2073,7 @@ int bdrv_aio_multiwrite(Bloc

Re: [Qemu-devel] [RFC] New Monitor command: 'info netdevices'

2010-05-14 Thread Miguel Di Ciurcio Filho
On Fri, May 14, 2010 at 6:46 AM, Markus Armbruster wrote: > > There's also > > 3. Convert it anyway.  Clean up the mess.  Change the output. > I agree. It seams to me that no one is concerned with any Monitor output change with this particular command. Plus, no one have shown any concerns about

[Qemu-devel] Re: [RFC PATCH v2 2/3] block: call the snapshot handlers of the protocol drivers

2010-05-14 Thread Kevin Wolf
Am 14.05.2010 11:51, schrieb MORITA Kazutaka: > When snapshot handlers of the format driver is not defined, it is > better to call the ones of the protocol driver. > > This enables us to implement snapshot support in the protocol driver. > > Signed-off-by: MORITA Kazutaka > int bdrv_snapshot_g

Re: [Qemu-devel] [PATCH] linux-user: use default mmap_min_addr 65536 when /proc/sys/vm/mmap_min_addr cannot be read

2010-05-14 Thread Richard Henderson
On 05/13/2010 12:26 PM, Martin Jansa wrote: > BTW: I noticed that qemu-arm works ok when mmap_min_addr is low enough > (and doesn't have to be zero). > > my box had mmap_min_addr 4096 and qemu-arm worked fine even without > reading it Paul Brook's c581deda322080e8beb88b2e468d4af54454e4b3 had the

[Qemu-devel] Re: [PATCH 1/2] Add no-op aio emulation stub

2010-05-14 Thread Kevin Wolf
Am 13.05.2010 01:36, schrieb Alexander Graf: > We need to be able to do nothing in AIO fashion. Since I suspect this > could be useful for more cases than the non flushing, I figured I'd > create a new function that does everything AIO-like, but doesn't do > anything. > > Signed-off-by: Alexander

[Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Anthony Liguori
On 05/12/2010 03:48 PM, Cole Robinson wrote: On 05/12/2010 04:38 PM, Jes Sorensen wrote: On 05/12/10 22:29, Cole Robinson wrote: Commit f75ca1ae205f24dae296c82d534c37746f87232f changed the version string from: QEMU PC Emulator version x.yy.z to QEMU Emulator version x.yy.z libvirt

[Qemu-devel] [PATCH 1/8] qdev: Allow device addressing via 'driver.instance'

2010-05-14 Thread Jan Kiszka
Extend qbus_find_dev to allow addressing of devices without an unique id via an optional instance number. The new formats are 'driver.instance' and 'alias.instance'. Signed-off-by: Jan Kiszka --- hw/qdev.c | 23 ++- 1 files changed, 18 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [PATCH 5/8] qmp: Teach basic capability negotiation to python example

2010-05-14 Thread Jan Kiszka
As sending "qmp_capabilities" on session start became mandatory, both python examples were broken. Signed-off-by: Jan Kiszka --- QMP/qmp-shell |1 + QMP/vm-info |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/QMP/qmp-shell b/QMP/qmp-shell index f89b9af..a5b72d1 100

[Qemu-devel] [PATCH 7/8] Add QLIST_INSERT_TAIL

2010-05-14 Thread Jan Kiszka
As the QLIST has not tail pointer, this requires list walking. Still useful when lists are short or insertion time doesn't matter. Signed-off-by: Jan Kiszka --- qemu-queue.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/qemu-queue.h b/qemu-queue.h index 1d07745

[Qemu-devel] [PATCH 4/8] monitor: Add basic device state visualization

2010-05-14 Thread Jan Kiszka
This introduces device_show, a monitor command that saves the vmstate of a qdev device and visualizes it. QMP is also supported. Buffers are cut after 16 byte by default, but the full content can be requested via '-f'. To pretty-print sub-arrays, vmstate is extended to store the start index name.

[Qemu-devel] [PATCH 6/8] qmp: Fix python helper /wrt long return strings

2010-05-14 Thread Jan Kiszka
Remove the arbitrary limitation of 1024 characters per return string and read complete lines instead. Required for device_show. Signed-off-by: Jan Kiszka --- QMP/qmp.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/QMP/qmp.py b/QMP/qmp.py index d9da603..b8f1741 100644

[Qemu-devel] [PATCH 0/8] Basic device state visualization

2010-05-14 Thread Jan Kiszka
While recently fixing the SCSI reset issues, I once again had the need for displaying the state of involved devices. So far the common approach is to attach gdb to qemu (or even inject some printf). But that time I hacked up a 30-minute patch to dump the vmstate of any (fully converted) qdev device

[Qemu-devel] [PATCH 8/8] qdev: Add new devices/buses at the tail

2010-05-14 Thread Jan Kiszka
Cosmetic change to align the instance number assignment with bus ordering. The current ordering is a bit annoying when you dump the qtree or address devices via 'driver.instance'. Signed-off-by: Jan Kiszka --- hw/qdev.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/

[Qemu-devel] [PATCH 2/8] Add base64 encoder/decoder

2010-05-14 Thread Jan Kiszka
Will be used by QBuffer. Signed-off-by: Jan Kiszka --- Makefile.objs |2 +- base64.c | 202 + base64.h | 18 + 3 files changed, 221 insertions(+), 1 deletions(-) create mode 100644 base64.c create mode 100644 base64.h

Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 08:17:50AM -0500, Anthony Liguori wrote: > On 05/12/2010 03:48 PM, Cole Robinson wrote: > >On 05/12/2010 04:38 PM, Jes Sorensen wrote: > > > >>On 05/12/10 22:29, Cole Robinson wrote: > >> > >>>Commit f75ca1ae205f24dae296c82d534c37746f87232f changed the version > >>>s

[Qemu-devel] [PATCH 3/8] Add QBuffer

2010-05-14 Thread Jan Kiszka
This introduces a buffer object for use with QMP. As a buffer is not natively encodable in JSON, we encode it as a base64 string. To decode this kind of strings back to a QBuffer, the receiving side has to be aware of their semantic, which is normally no problem within QMP. The first use case of t

[Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Anthony Liguori
On 05/13/2010 08:07 AM, Jes Sorensen wrote: On 05/13/10 15:04, Cole Robinson wrote: On 05/13/2010 04:35 AM, Jes Sorensen wrote: On 05/12/10 22:48, Cole Robinson wrote: I think rather than 1, it would be better to add a patch to libvirt to catch both formats. I know Chris Lalancette al

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Anthony Liguori
On 05/13/2010 08:33 AM, Daniel P. Berrange wrote: On Thu, May 13, 2010 at 10:32:52AM +0200, jes.soren...@redhat.com wrote: From: Jes Sorensen Add -version-simple argument for QEMU, printing just the version number, without any supporting text. This makes it simpler for other apps, such as

[Qemu-devel] Re: [RFC] New Monitor command: 'info netdevices'

2010-05-14 Thread Anthony Liguori
On 05/13/2010 09:18 AM, Luiz Capitulino wrote: Hi there, Miguel is working on converting 'info network' to QMP, but turns out that it's been quite difficult to maintain the exact same output. The main problem seems to be the usage of the 'info_str' string, which some drivers (like tap, xe

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 08:27:54AM -0500, Anthony Liguori wrote: > On 05/13/2010 08:33 AM, Daniel P. Berrange wrote: > >On Thu, May 13, 2010 at 10:32:52AM +0200, jes.soren...@redhat.com wrote: > > > >>From: Jes Sorensen > >> > >>Add -version-simple argument for QEMU, printing just the version >

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 01:24:44PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Fri, May 14, 2010 at 11:42:57AM +0200, Markus Armbruster wrote: > >> "Daniel P. Berrange" writes: > [...] > >> > It would also be nice to avoid having to parse the -help output to > >> > d

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Anthony Liguori
On 05/14/2010 05:06 AM, Daniel P. Berrange wrote: On Fri, May 14, 2010 at 11:42:57AM +0200, Markus Armbruster wrote: "Daniel P. Berrange" writes: On Thu, May 13, 2010 at 10:32:52AM +0200, jes.soren...@redhat.com wrote: From: Jes Sorensen Add -version-simple argument for QE

Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 08:24:09AM -0500, Anthony Liguori wrote: > On 05/13/2010 08:07 AM, Jes Sorensen wrote: > >On 05/13/10 15:04, Cole Robinson wrote: > > > >>On 05/13/2010 04:35 AM, Jes Sorensen wrote: > >> > >>>On 05/12/10 22:48, Cole Robinson wrote: > >>>I think rather than 1, it woul

[Qemu-devel] Re: [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Anthony Liguori
On 05/13/2010 03:32 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen Add -version-simple argument for QEMU, printing just the version number, without any supporting text. I'm not a huge fan of the name. But what information are we trying to convey? Just major/minor number or would

Re: [Qemu-devel] Re: [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Chris Lalancette
On 05/14/2010 09:21 AM, Anthony Liguori wrote: > On 05/13/2010 03:32 AM, jes.soren...@redhat.com wrote: >> From: Jes Sorensen >> >> Add -version-simple argument for QEMU, printing just the version >> number, without any supporting text. >> > > I'm not a huge fan of the name. > > But what info

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 08:48:58AM -0500, Anthony Liguori wrote: > On 05/14/2010 05:06 AM, Daniel P. Berrange wrote: > >On Fri, May 14, 2010 at 11:42:57AM +0200, Markus Armbruster wrote: > > > >>"Daniel P. Berrange" writes: > >> > >> > >>>On Thu, May 13, 2010 at 10:32:52AM +0200, jes.soren

[Qemu-devel] Re: [PATCH] Fix docs for block stats monitor command

2010-05-14 Thread Luiz Capitulino
On Fri, 14 May 2010 10:15:32 +0200 Kevin Wolf wrote: > Am 13.05.2010 12:30, schrieb Daniel P. Berrange: > > The 'parent' field in the 'query-blockstats' monitor command is > > part of the top level block device QDict, not part of the 2nd > > level 'stats' QDict. > > > > * block.c: Fix docs for '

[Qemu-devel] Re: [PATCH 10/12] kvm: enable smp > 1

2010-05-14 Thread Alexander Graf
On 12.05.2010, at 23:25, Marcelo Tosatti wrote: > Process INIT/SIPI requests and enable -smp > 1. Does this enable real SMP or does it still only allow one vcpu to run at a time? Alex

Re: [Qemu-devel] [RFC] New Monitor command: 'info netdevices'

2010-05-14 Thread Luiz Capitulino
On Fri, 14 May 2010 09:38:58 -0300 Miguel Di Ciurcio Filho wrote: > On Fri, May 14, 2010 at 6:46 AM, Markus Armbruster wrote: > > > > There's also > > > > 3. Convert it anyway.  Clean up the mess.  Change the output. > > > > I agree. > > It seams to me that no one is concerned with any Monitor

Re: [Qemu-devel] Re: [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 08:21:55AM -0500, Anthony Liguori wrote: > On 05/13/2010 03:32 AM, jes.soren...@redhat.com wrote: > >From: Jes Sorensen > > > >Add -version-simple argument for QEMU, printing just the version > >number, without any supporting text. > > > > I'm not a huge fan of the name.

[Qemu-devel] [PATCH] [S390] [KVM] Enable SIGP Initial Reset

2010-05-14 Thread Alexander Graf
For SMP to work with KVM, we need to properly emulate the SIGP Initial Reset Command. Recent (2.6.32) kernels issue that before the SIGP Reset command that actually wakes up the vcpu. This patch makes -smp work on S390x. Signed-off-by: Alexander Graf --- target-s390x/kvm.c | 17 ++

[Qemu-devel] Re: [PATCH] Fix docs for block stats monitor command

2010-05-14 Thread Kevin Wolf
Am 14.05.2010 16:05, schrieb Luiz Capitulino: > On Fri, 14 May 2010 10:15:32 +0200 > Kevin Wolf wrote: > >> Am 13.05.2010 12:30, schrieb Daniel P. Berrange: >>> The 'parent' field in the 'query-blockstats' monitor command is >>> part of the top level block device QDict, not part of the 2nd >>> le

Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Anthony Liguori
On 05/14/2010 08:54 AM, Daniel P. Berrange wrote: On Fri, May 14, 2010 at 08:24:09AM -0500, Anthony Liguori wrote: On 05/13/2010 08:07 AM, Jes Sorensen wrote: On 05/13/10 15:04, Cole Robinson wrote: On 05/13/2010 04:35 AM, Jes Sorensen wrote: On 05/12/10 22:48, C

Re: [Qemu-devel] [PATCH 1/1] Add -version-simple argument, printing only version number.

2010-05-14 Thread Markus Armbruster
Anthony Liguori writes: > Can we do this all via the monitor? IOW, can libvirt invoke qemu > blindly and strictly interact with the monitor? I think that's exactly where should be heading longer term. It's not a practical immediate solution, e.g. because device_add can't cold-plug, yet.

Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 09:22:55AM -0500, Anthony Liguori wrote: > On 05/14/2010 08:54 AM, Daniel P. Berrange wrote: > >On Fri, May 14, 2010 at 08:24:09AM -0500, Anthony Liguori wrote: > > > >>On 05/13/2010 08:07 AM, Jes Sorensen wrote: > >> > >>>On 05/13/10 15:04, Cole Robinson wrote: > >>

Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Anthony Liguori
On 05/14/2010 09:42 AM, Daniel P. Berrange wrote: It is preferable to query the explicit capability wanted, because version numbers are useless when distros backport features, Unless distros add their own release number to the version information and libvirt learns about the features they add

Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Daniel P. Berrange
On Fri, May 14, 2010 at 09:52:53AM -0500, Anthony Liguori wrote: > On 05/14/2010 09:42 AM, Daniel P. Berrange wrote: > > > >It is preferable to query the explicit capability wanted, because > >version numbers are useless when distros backport features, > > Unless distros add their own release numb

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-14 Thread Luiz Capitulino
On Fri, 14 May 2010 10:39:29 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Thu, 13 May 2010 16:48:13 +0300 > > Avi Kivity wrote: > > > >> On 05/05/2010 10:11 PM, Luiz Capitulino wrote: > >> > One of the most important missing feature in QMP today is its > >> > supported com

Re: [Qemu-devel] Re: [PATCH] Revive -version 'QEMU PC Emulator...'

2010-05-14 Thread Anthony Liguori
On 05/14/2010 10:02 AM, Daniel P. Berrange wrote: On Fri, May 14, 2010 at 09:52:53AM -0500, Anthony Liguori wrote: On 05/14/2010 09:42 AM, Daniel P. Berrange wrote: It is preferable to query the explicit capability wanted, because version numbers are useless when distros backport feat

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-14 Thread Avi Kivity
On 05/14/2010 11:50 AM, Markus Armbruster wrote: + +{ "execute": "migrate_set_speed", "arguments": { "value": 1024 } } Oh, we do have more. Please document the units for this value (bits per second)? bytes per second? Bandwidth is typically measured in bits per second.

[Qemu-devel] Re: [PATCH 10/12] kvm: enable smp > 1

2010-05-14 Thread Avi Kivity
On 05/14/2010 05:06 PM, Alexander Graf wrote: On 12.05.2010, at 23:25, Marcelo Tosatti wrote: Process INIT/SIPI requests and enable -smp> 1. Does this enable real SMP or does it still only allow one vcpu to run at a time? The realest ever. Still doesn't use in-kernel irqchip

[Qemu-devel] Re: [PATCH 10/12] kvm: enable smp > 1

2010-05-14 Thread Alexander Graf
On 14.05.2010, at 17:48, Avi Kivity wrote: > On 05/14/2010 05:06 PM, Alexander Graf wrote: >> On 12.05.2010, at 23:25, Marcelo Tosatti wrote: >> >> >>> Process INIT/SIPI requests and enable -smp> 1. >>> >> Does this enable real SMP or does it still only allow one vcpu to run at a >> ti

[Qemu-devel] Re: [PATCH 10/12] kvm: enable smp > 1

2010-05-14 Thread Jan Kiszka
Alexander Graf wrote: > On 14.05.2010, at 17:48, Avi Kivity wrote: > >> On 05/14/2010 05:06 PM, Alexander Graf wrote: >>> On 12.05.2010, at 23:25, Marcelo Tosatti wrote: >>> >>> Process INIT/SIPI requests and enable -smp> 1. >>> Does this enable real SMP or does it still only al

[Qemu-devel] Re: [PATCH 10/12] kvm: enable smp > 1

2010-05-14 Thread Alexander Graf
On 14.05.2010, at 17:54, Jan Kiszka wrote: > Alexander Graf wrote: >> On 14.05.2010, at 17:48, Avi Kivity wrote: >> >>> On 05/14/2010 05:06 PM, Alexander Graf wrote: On 12.05.2010, at 23:25, Marcelo Tosatti wrote: > Process INIT/SIPI requests and enable -smp> 1. >

[Qemu-devel] Re: [PATCH] char: Flush read buffer in mux_chr_can_read

2010-05-14 Thread Alexander Graf
On 12.05.2010, at 20:51, Jan Kiszka wrote: > Alexander Graf wrote: >> Jan Kiszka wrote: >>> Alexander Graf wrote: >>> Jan Kiszka wrote: > Move the buffer flush from mux_chr_read to mux_chr_can_read. While the > latter is called periodically, the former will only be invoked whe

[Qemu-devel] Re: [PATCH 0/8] Basic device state visualization

2010-05-14 Thread Avi Kivity
On 05/14/2010 04:20 PM, Jan Kiszka wrote: While recently fixing the SCSI reset issues, I once again had the need for displaying the state of involved devices. So far the common approach is to attach gdb to qemu (or even inject some printf). But that time I hacked up a 30-minute patch to dump the

[Qemu-devel] Re: [PATCH] char: Flush read buffer in mux_chr_can_read

2010-05-14 Thread Jan Kiszka
Alexander Graf wrote: > On 12.05.2010, at 20:51, Jan Kiszka wrote: > >> Alexander Graf wrote: >>> Jan Kiszka wrote: Alexander Graf wrote: > Jan Kiszka wrote: > >> Move the buffer flush from mux_chr_read to mux_chr_can_read. While the >> latter is called periodically, the

  1   2   >