Re: [Qemu-devel] [RFC 7/9] virtio-scsi: Start/stop vhost

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 00:34, Nicholas A. Bellinger ha scritto: > From: Stefan Hajnoczi > > This patch starts and stops vhost as the virtio device transitions > through its status phases. Vhost can only be started once the guest > reports its driver has successfully initialized, which means the > virtque

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > iohandler/bh/timer may use DeviceState when its refcnt=0, > postpone the reclaimer till they have done with it. > > Signed-off-by: Liu Ping Fan > --- > include/qemu/object.h |2 +- > main-loop.c |4 +

Re: [Qemu-devel] [RFC 7/9] virtio-scsi: Start/stop vhost

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 09:01, Paolo Bonzini ha scritto: >> > From: Stefan Hajnoczi >> > >> > This patch starts and stops vhost as the virtio device transitions >> > through its status phases. Vhost can only be started once the guest >> > reports its driver has successfully initialized, which means the >>

Re: [Qemu-devel] [RFC 6/9] virtio-scsi: Open and initialize /dev/vhost-scsi

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 00:34, Nicholas A. Bellinger ha scritto: > From: Stefan Hajnoczi > > Begin adding vhost support by opening /dev/vhost-scsi. > > (v2: Drop legacy ->vhost_vqs[] usage) > > Signed-off-by: Stefan Hajnoczi > Signed-off-by: Zhi Yong Wu > Cc: Michael S. Tsirkin > Cc: Paolo Bonzini >

Re: [Qemu-devel] [PATCH 5/5] e1000: using new interface--unmap to unplug

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > Signed-off-by: Liu Ping Fan > --- > hw/e1000.c | 15 +-- > 1 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/hw/e1000.c b/hw/e1000.c > index 4573f13..4c1e141 100644 > --- a/hw/e1000.c >

Re: [Qemu-devel] [PATCH v2 1/2] accomodate OpenFirmware device paths in sufficient storage

2012-07-25 Thread Peter Maydell
On 25 July 2012 01:19, Laszlo Ersek wrote: > > Signed-off-by: Laszlo Ersek > --- > hw/qdev.c | 54 +++--- > 1 files changed, 43 insertions(+), 11 deletions(-) Yuck. Just redo qdev_get_fw_dev_path along the lines I suggested please. This is way t

[Qemu-devel] [RFC][PATCH v4 0/3] tcg: enhance code generation quality for qemu_ld/st IRs

2012-07-25 Thread Yeongkyoon Lee
Hi, all. Here is the 4th version of the series optimizing TCG qemu_ld/st code generation. v4: - Remove CONFIG_SOFTMMU pre-condition from configure - Instead, add some CONFIG_SOFTMMU condition to TCG sources - Remove some unnecessary comments v3: - Support CONFIG_TCG_PASS_AREG0 (expec

[Qemu-devel] [RFC][PATCH v4 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization

2012-07-25 Thread Yeongkyoon Lee
Enable CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization only when a host is i386 or x86_64. Signed-off-by: Yeongkyoon Lee --- configure |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/configure b/configure index cef0a71..d5b69de 100755 --- a/configure +

[Qemu-devel] [RFC][PATCH v4 2/3] tcg: Add declarations and templates of extended MMU helpers

2012-07-25 Thread Yeongkyoon Lee
Add declarations and templates of extended MMU helpers. An extended helper takes an additional argument of the host address accessing a guest memory which differs from the address of the call site to the helper because helper call sites locate at the end of a generated code block. Signed-off-by: Y

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 09:03, Stefan Hajnoczi ha scritto: > From: Liu Ping Fan > > iohandler/bh/timer may use DeviceState when its refcnt=0, It's not clear how to me. The only reference to devices from an iohandler/bh/timer can be in the opaque. Now, if you have a iohandler/bh/timer whose opaque is a De

Re: [Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote: > @@ -3396,13 +3420,25 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, > uint8_t *buf, > uint32_t val; > target_phys_addr_t page; > MemoryRegionSection *section; > +Object *bk; > > while (len > 0) { > pa

[Qemu-devel] [RFC][PATCH v4 3/3] tcg: Optimize qemu_ld/st by generating slow paths at the end of a block

2012-07-25 Thread Yeongkyoon Lee
Add optimized TCG qemu_ld/st generation which locates the code of TLB miss cases at the end of a block after generating the other IRs. Currently, this optimization supports only i386 and x86_64 hosts. Signed-off-by: Yeongkyoon Lee --- tcg/i386/tcg-target.c | 475 +++-

Re: [Qemu-devel] interrupt mitigation for e1000

2012-07-25 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 5:58 PM, Luigi Rizzo wrote: > I noticed that the various NIC modules in qemu/kvm do not implement > interrupt mitigation, which is very beneficial as it dramatically > reduces exits from the hypervisor. > > As a proof of concept i tried to implement it for the e1000 driver

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-25 Thread Wenchao Xia
于 2012-7-24 2:15, Blue Swirl 写道: On Wed, Jul 18, 2012 at 8:51 AM, Wenchao Xia wrote: Hi, following is API draft, prototypes were taken from qemu/block.h, and the API prefix is changed frpm bdrv to qbdrvs, to declare related object is BlockDriverState, not BlockDriver. One issue here is it ma

Re: [Qemu-devel] [PATCH v2 1/2] accomodate OpenFirmware device paths in sufficient storage

2012-07-25 Thread Markus Armbruster
Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH V2 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Use the dedicated counting function in qmp_query_block in order to propagate the backing file count to HMP. Signed-off-by: Benoit Canet --- block.c |2 ++ qapi-schema.json |9 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/block.c b

[Qemu-devel] [PATCH V2 0/3] Show backing file ancestors count in HMP

2012-07-25 Thread benoit . canet
From: Benoît Canet In some setups many backing files and snapshot are chained. This lead to the formation of huge trees of snapshots all depending on a common ancestor. Hence if something bad happen to this common ancestor all the snapshot of the tree will be broken. This patch add an easy way

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-25 Thread Masami Hiramatsu
(2012/07/25 5:26), Blue Swirl wrote:> >> The following patch set provides a low-overhead system for collecting kernel >> tracing data of guests by a host in a virtualization environment. >> >> A guest OS generally shares some devices with other guests or a host, so >> reasons of any problems occurr

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:37 PM, Paolo Bonzini wrote: > Il 25/07/2012 09:03, Stefan Hajnoczi ha scritto: >> From: Liu Ping Fan >> >> iohandler/bh/timer may use DeviceState when its refcnt=0, > > It's not clear how to me. The only reference to devices from an > iohandler/bh/timer can be in the op

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:03 PM, Stefan Hajnoczi wrote: > On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote: >> From: Liu Ping Fan >> >> iohandler/bh/timer may use DeviceState when its refcnt=0, >> postpone the reclaimer till they have done with it. >> >> Signed-off-by: Liu Ping Fan >> --- >>

Re: [Qemu-devel] [PATCH 4/5] qom: delay DeviceState's reclaim to main-loop

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 10:16, liu ping fan ha scritto: > > It's not clear how to me. The only reference to devices from an > > iohandler/bh/timer can be in the opaque. Now, if you have a > > iohandler/bh/timer whose opaque is a DeviceState, you should bump the > > refcount before setting it up, and unref

Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-07-25 Thread Kevin Wolf
Am 25.07.2012 05:41, schrieb Corey Bryant: >>> diff --git a/block/raw-posix.c b/block/raw-posix.c >>> index a172de3..5d0a801 100644 >>> --- a/block/raw-posix.c >>> +++ b/block/raw-posix.c >>> @@ -271,7 +271,7 @@ static int raw_open_common(BlockDriverState *bs, const >>> char *filename, >>> out_f

Re: [Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread liu ping fan
On Wed, Jul 25, 2012 at 3:43 PM, Stefan Hajnoczi wrote: > On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote: >> @@ -3396,13 +3420,25 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, >> uint8_t *buf, >> uint32_t val; >> target_phys_addr_t page; >> MemoryRegionSection *sect

[Qemu-devel] [PATCH V2 1/3] block: create bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Create bdrv_get_backing_file_ancestors_count() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet --- block.c | 13 + block.h |1 + 2 files changed, 14 insertions(+) diff --git a/

[Qemu-devel] [PATCH V2 3/3] hmp: show the backing file ancestors count

2012-07-25 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- hmp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 6b72a64..19dcb65 100644 --- a/hmp.c +++ b/hmp.c @@ -227,6 +227,8 @@ void hmp_info_block(Monitor *mon) if (info->value->inserted->has_backing_file) {

[Qemu-devel] [Bug 1021649] Re: qemu 1.1.0 waits for a keypress at boot

2012-07-25 Thread Michael Tokarev
Jamie Heilman (the debian bug #680719 reporter) bisected this issue to this commit: 7c7db75576bd5a31508208f153c5aada64b2c8df is the first bad commit commit 7c7db75576bd5a31508208f153c5aada64b2c8df Author: Stefano Stabellini Date: Fri Apr 13 19:35:04 2012 +0100 main_loop_wait: block indefin

Re: [Qemu-devel] interrupt mitigation for e1000

2012-07-25 Thread Avi Kivity
On 07/24/2012 07:58 PM, Luigi Rizzo wrote: > I noticed that the various NIC modules in qemu/kvm do not implement > interrupt mitigation, which is very beneficial as it dramatically > reduces exits from the hypervisor. > > As a proof of concept i tried to implement it for the e1000 driver > (patch

Re: [Qemu-devel] [PATCH v2] qxl: add QXL_IO_MONITORS_CONFIG_ASYNC

2012-07-25 Thread Yonit Halperin
Hi, I think you should save the monitor configuration as part of the vmstate, and recall spice_qxl_monitors_config_async in qxl_post_load. Regards, Yonit. On 07/23/2012 07:33 PM, Alon Levy wrote: bumps spice-protocol to 0.12.0 for new IO. revision bumped to 4 for new IO support, enabled for s

Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 05:31, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > rwlock: > qemu_device_tree_mutex > > rd side: > --device_del(destruction of device will be postphoned until unplug > ack from guest), > --pci hot-unplug > --iteration (qdev_reset_all) > > wr side: > --device_ad

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-25 Thread Yoshihiro YUNOMAE
Hi Stefan, (2012/07/24 22:41), Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 12:19 PM, Yoshihiro YUNOMAE wrote: Are you using text formatted ftrace? No, currently using raw format, but we'd like to reformat it in text. Capturing the info necessary to translate numbers into symbols is one o

Re: [Qemu-devel] [PATCH 10/27] Separate migration bitmap

2012-07-25 Thread Avi Kivity
On 07/24/2012 09:36 PM, Juan Quintela wrote: > This patch creates a migration bitmap, which is periodically kept in > sync with the qemu bitmap. A separate copy of the dirty bitmap for the > migration limits the amount of concurrent access to the qemu bitmap > from iothread and migration thread (wh

Re: [Qemu-devel] [PULL] pci,msi,virtio

2012-07-25 Thread Andreas Färber
Am 25.07.2012 03:56, schrieb Alexey Kardashevskiy: > On 24/07/12 21:32, Andreas Färber wrote: >> My pci-host branch [1] is updated with mst's requested spapr_pci.c code >> movement, so I just need to know whether to rebase on some other branch >> and when to re-post. Soft Freeze is in three weeks i

Re: [Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 10:12, liu ping fan ha scritto: >>> >> +qemu_rwlock_rdlock_devtree(); >>> >> section = phys_page_find(page >> TARGET_PAGE_BITS); >>> >> +if (!(memory_region_is_ram(section->mr) || >>> >> +memory_region_is_romd(section->mr)) && !is_write) { >>> >> +

Re: [Qemu-devel] vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-07-25 Thread Jan Kiszka
On 2012-07-24 22:20, Nicholas A. Bellinger wrote: > On Tue, 2012-07-24 at 09:57 +0200, Jan Kiszka wrote: >> On 2012-07-24 09:42, Nicholas A. Bellinger wrote: >>> Hi Anthony, Stefan & QEMU folks, >>> > > > >>> However, thus far I've not been able to get virtio-scsi <-> tcm_vhost >>> I/O to actual

Re: [Qemu-devel] interrupt mitigation for e1000

2012-07-25 Thread Luigi Rizzo
On Wed, Jul 25, 2012 at 11:53:29AM +0300, Avi Kivity wrote: > On 07/24/2012 07:58 PM, Luigi Rizzo wrote: > > I noticed that the various NIC modules in qemu/kvm do not implement > > interrupt mitigation, which is very beneficial as it dramatically > > reduces exits from the hypervisor. > > > > As a

Re: [Qemu-devel] [PATCH V6 3/3] linux-user: make host_to_target_cmsg support SO_TIMESTAMP cmsg_type

2012-07-25 Thread Peter Maydell
On 25 July 2012 01:01, Jing Huang wrote: > > Signed-off-by: Jing Huang Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [RFC 00/27] Migration thread (WIP)

2012-07-25 Thread Orit Wasserman
Hi, I started with some performance testing , the results look very good, one of the workload that wasn't converging with upstream version (migration completed only when I stopped the workload) seems to converge. I used FC16 guest with 1G ram , default speed and downtime workload upstream t

Re: [Qemu-devel] interrupt mitigation for e1000

2012-07-25 Thread Avi Kivity
On 07/25/2012 12:56 PM, Luigi Rizzo wrote: >> Indeed. But please drop the #ifdef MITIGATIONs. > > Thanks for the comments. The #ifdef block MITIGATION was only temporary to > point out the differences and run the performance comparisons. Ok. In a patch, the '+' in front of a line serves that,

Re: [Qemu-devel] interrupt mitigation for e1000

2012-07-25 Thread Paolo Bonzini
Il 25/07/2012 11:56, Luigi Rizzo ha scritto: > On Wed, Jul 25, 2012 at 11:53:29AM +0300, Avi Kivity wrote: >> On 07/24/2012 07:58 PM, Luigi Rizzo wrote: >>> I noticed that the various NIC modules in qemu/kvm do not implement >>> interrupt mitigation, which is very beneficial as it dramatically >>>

Re: [Qemu-devel] [Bug 1021649] Re: qemu 1.1.0 waits for a keypress at boot

2012-07-25 Thread Michael Tokarev
Stefano, Paul, can you take a look please? https://bugs.launchpad.net/bugs/1021649 Thanks, /mjt On 25.07.2012 12:25, Michael Tokarev wrote: > Jamie Heilman (the debian bug #680719 reporter) bisected this issue to > this commit: > > 7c7db75576bd5a31508208f153c5aada64b2c8df is the first bad comm

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Avi Kivity
On 07/25/2012 06:57 AM, Benjamin Herrenschmidt wrote: > Hi folks ! > > Would there be any objection to adding a second MMIO BAR to qemu-vga > which mirrors the bochs magic VBE ports ? > > Support for IO space is optional in PCIe and can be problematic on some > architectures, it would be nice to

Re: [Qemu-devel] interrupt mitigation for e1000

2012-07-25 Thread Luigi Rizzo
On Wed, Jul 25, 2012 at 12:12:55PM +0200, Paolo Bonzini wrote: > Il 25/07/2012 11:56, Luigi Rizzo ha scritto: > > On Wed, Jul 25, 2012 at 11:53:29AM +0300, Avi Kivity wrote: > >> On 07/24/2012 07:58 PM, Luigi Rizzo wrote: > >>> I noticed that the various NIC modules in qemu/kvm do not implement > >

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Benjamin Herrenschmidt
On Wed, 2012-07-25 at 13:27 +0300, Avi Kivity wrote: > On 07/25/2012 06:57 AM, Benjamin Herrenschmidt wrote: > > Hi folks ! > > > > Would there be any objection to adding a second MMIO BAR to qemu-vga > > which mirrors the bochs magic VBE ports ? > > > > Support for IO space is optional in PCIe a

Re: [Qemu-devel] [PATCH V2 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread Kevin Wolf
Am 25.07.2012 10:11, schrieb benoit.ca...@gmail.com: > From: Benoît Canet > > Use the dedicated counting function in qmp_query_block in order to > propagate the backing file count to HMP. > > Signed-off-by: Benoit Canet > --- > block.c |2 ++ > qapi-schema.json |9 ++--- >

Re: [Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Avi Kivity
On 07/25/2012 06:31 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > acquire device's refcnt with qemu_device_tree_mutex rwlock, so we > can safely handle it when mmio dispatch. > > If in radix-tree, leaf is subpage, then move further step to acquire > opaque which is the type --DeiveState. > >

Re: [Qemu-devel] [PATCH 3/5] hotplug: introduce qdev_unplug_ack() to remove device from views

2012-07-25 Thread Avi Kivity
On 07/25/2012 06:31 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > When guest confirm the removal of device, we should > --unmap from MemoryRegion view > --isolated from device tree view > > + > +void qdev_unplug_ack(DeviceState *dev, Error **errp) > +{ > +qemu_rwlock_wrlock_devtree(); > +

Re: [Qemu-devel] [PATCH V2 3/3] hmp: show the backing file ancestors count

2012-07-25 Thread Kevin Wolf
Am 25.07.2012 10:11, schrieb benoit.ca...@gmail.com: > From: Benoît Canet > > Signed-off-by: Benoit Canet > --- > hmp.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hmp.c b/hmp.c > index 6b72a64..19dcb65 100644 > --- a/hmp.c > +++ b/hmp.c > @@ -227,6 +227,8 @@ void hmp_info_bl

[Qemu-devel] [PATCH v2] vl.c: Fix max_cpus

2012-07-25 Thread riegamaths
From: Dunrong Huang The VCPU count limit in kernel now is 254, defined by KVM_MAX_VCPUS in kernel's header files. But the count limit in QEMU is 255, so QEMU will failed to start if user passes "-enable-kvm" and "-smp 255" to it. Exit QEMU with an error if KVM is enabled and number of SMP cpus r

Re: [Qemu-devel] [Bug 1021649] Re: qemu 1.1.0 waits for a keypress at boot

2012-07-25 Thread Stefano Stabellini
On Wed, 25 Jul 2012, Michael Tokarev wrote: > Stefano, Paul, can you take a look please? > > https://bugs.launchpad.net/bugs/1021649 That is a very good bug triage that you did! However "main_loop_wait: block indefinitely" only increases the maximum select timeout of QEMU's main_loop. That mean

Re: [Qemu-devel] [PATCH V2 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread Benoît Canet
Le Wednesday 25 Jul 2012 à 12:57:05 (+0200), Kevin Wolf a écrit : > Am 25.07.2012 10:11, schrieb benoit.ca...@gmail.com: > > From: Benoît Canet > > > > Use the dedicated counting function in qmp_query_block in order to > > propagate the backing file count to HMP. > > > > Signed-off-by: Benoit Ca

Re: [Qemu-devel] [PATCH V2 3/3] hmp: show the backing file ancestors count

2012-07-25 Thread Kevin Wolf
Am 25.07.2012 13:17, schrieb Benoît Canet: > Le Wednesday 25 Jul 2012 à 12:59:00 (+0200), Kevin Wolf a écrit : >> Am 25.07.2012 10:11, schrieb benoit.ca...@gmail.com: >>> From: Benoît Canet >>> >>> Signed-off-by: Benoit Canet >>> --- >>> hmp.c |2 ++ >>> 1 file changed, 2 insertions(+) >>> >

Re: [Qemu-devel] [PATCH V2 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread Kevin Wolf
Am 25.07.2012 13:15, schrieb Benoît Canet: > Le Wednesday 25 Jul 2012 à 12:57:05 (+0200), Kevin Wolf a écrit : >> Am 25.07.2012 10:11, schrieb benoit.ca...@gmail.com: >>> From: Benoît Canet >>> >>> Use the dedicated counting function in qmp_query_block in order to >>> propagate the backing file co

Re: [Qemu-devel] [PATCH V2 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread Benoît Canet
Le Wednesday 25 Jul 2012 à 13:19:15 (+0200), Kevin Wolf a écrit : > Am 25.07.2012 13:15, schrieb Benoît Canet: > > Le Wednesday 25 Jul 2012 à 12:57:05 (+0200), Kevin Wolf a écrit : > >> Am 25.07.2012 10:11, schrieb benoit.ca...@gmail.com: > >>> From: Benoît Canet > >>> > >>> Use the dedicated coun

[Qemu-devel] Funny -m arguments can crash

2012-07-25 Thread Markus Armbruster
Asking for "funny" memory sizes sometimes crashes for me. For instance -m 0.8 or the equivalent -m 838860b. -m 0.7 appears to work. Should we round memory sizes? How? Where? $ gdb --args qemu-system-x86_64 -nodefaults --enable-kvm -S -vnc :0 -monitor stdio -m 0.8 [...] (gdb) r Starting pro

Re: [Qemu-devel] [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > > On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: > > > From: Nicholas Bellinger > > > > > > As requested by Anthony, here is a patch agai

Re: [Qemu-devel] [PATCH V2 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread Kevin Wolf
Am 25.07.2012 13:42, schrieb Benoît Canet: > Le Wednesday 25 Jul 2012 à 13:19:15 (+0200), Kevin Wolf a écrit : >> Am 25.07.2012 13:15, schrieb Benoît Canet: >>> Le Wednesday 25 Jul 2012 à 12:57:05 (+0200), Kevin Wolf a écrit : Am 25.07.2012 10:11, schrieb benoit.ca...@gmail.com: > From: Be

[Qemu-devel] [PATCH v2 0/7] qcow2: implement lazy refcounts optimization

2012-07-25 Thread Stefan Hajnoczi
This series aims to improve qcow2 performance with cache=writethrough and cache=directsync. In particular it reduces the impact of metadata updates for allocating writes. This optimization should help make qcow2 a good choice even for cache=writethrough and cache=directsync where QED has traditio

[Qemu-devel] [PATCH v2 2/7] qcow2: introduce dirty bit

2012-07-25 Thread Stefan Hajnoczi
This patch adds an incompatible feature bit to mark images that have not been closed cleanly. When a dirty image file is opened a consistency check and repair is performed. Update qemu-iotests 031 and 036 since the extension header size changes when we add feature bit table entries. Signed-off-b

[Qemu-devel] [PATCH v2 5/7] qcow2: implement lazy refcounts

2012-07-25 Thread Stefan Hajnoczi
Lazy refcounts is a performance optimization for qcow2 that postpones refcount metadata updates and instead marks the image dirty. In the case of crash or power failure the image will be left in a dirty state and repaired next time it is opened. Reducing metadata I/O is important for cache=writet

[Qemu-devel] [PATCH v2 4/7] qemu-iotests: ignore qemu-img create lazy_refcounts output

2012-07-25 Thread Stefan Hajnoczi
Hide the default lazy_refcounts=off output from qemu-img like we do with other image creation options. This ensures that existing golden outputs continue to pass despite the new option that has been added. Note that this patch applies before the one that actually introduces the lazy_refcounts=on|

[Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-25 Thread Stefan Hajnoczi
This tests establishes the basic post-conditions of the qcow2 lazy refcounts features: 1. If the image was closed normally, it is marked clean. 2. If an allocating write was performed and the image was not close normally, then it is marked dirty. a. Written data can be read back su

[Qemu-devel] [PATCH v2 6/7] qemu-io: add "abort" command to simulate program crash

2012-07-25 Thread Stefan Hajnoczi
Avoiding data loss and corruption is the top requirement for image file formats. The qemu-io "abort" command makes it possible to simulate program crashes and does not give the image format a chance to cleanly shut down. This command is useful for data integrity test cases. Signed-off-by: Stefan

[Qemu-devel] [PATCH v2 1/7] docs: add dirty bit to qcow2 specification

2012-07-25 Thread Stefan Hajnoczi
The dirty bit will make it possible to perform lazy refcount updates, where the image file is not kept consistent all the time. Upon opening a dirty image file, it is necessary to perform a consistency check and repair any incorrect refcounts. Therefore the dirty bit must be an incompatible featu

[Qemu-devel] [PATCH v2 3/7] docs: add lazy refcounts bit to qcow2 specification

2012-07-25 Thread Stefan Hajnoczi
The lazy refcounts bit indicates that this image can take advantage of the dirty bit and that refcount updates can be postponed. Signed-off-by: Stefan Hajnoczi --- docs/specs/qcow2.txt |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/

[Qemu-devel] [PATCH V3 0/3] Show backing file ancestors count in HMP

2012-07-25 Thread benoit . canet
From: Benoît Canet In some setups many backing files and snapshot are chained. This lead to the formation of huge trees of snapshots all depending on a common ancestor. Hence if something bad happen to this common ancestor all the snapshot of the tree will be broken. This patch add an easy way

Re: [Qemu-devel] [PATCH 4/8] qemu-option: add alias support

2012-07-25 Thread Luiz Capitulino
On Tue, 24 Jul 2012 18:01:12 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Tue, 24 Jul 2012 11:19:45 +0200 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > >> > >> > On Mon, 23 Jul 2012 20:33:52 +0200 > >> > Markus Armbruster wrote: > >> > > >> >> Luiz Cap

Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey

2012-07-25 Thread Luiz Capitulino
On Wed, 25 Jul 2012 01:55:14 -0400 (EDT) Amos Kong wrote: > > > - Original Message - > > On Thu, 5 Jul 2012 20:48:44 +0800 > > Amos Kong wrote: > > > > > Convert 'sendkey' to use QAPI. do_sendkey() depends on some > > > variables/functions in monitor.c, so reserve qmp_sendkey() > > >

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Avi Kivity
On 07/25/2012 01:53 PM, Benjamin Herrenschmidt wrote: > On Wed, 2012-07-25 at 13:27 +0300, Avi Kivity wrote: >> On 07/25/2012 06:57 AM, Benjamin Herrenschmidt wrote: >> > Hi folks ! >> > >> > Would there be any objection to adding a second MMIO BAR to qemu-vga >> > which mirrors the bochs magic VB

[Qemu-devel] [PATCH V3 2/3] block: Use bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Use the dedicated counting function in qmp_query_block in order to propagate the backing file count to HMP. Signed-off-by: Benoit Canet --- block.c |3 +++ qapi-schema.json |9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/block.c

Re: [Qemu-devel] [Bug 1021649] Re: qemu 1.1.0 waits for a keypress at boot

2012-07-25 Thread Avi Kivity
On 07/25/2012 02:12 PM, Stefano Stabellini wrote: > On Wed, 25 Jul 2012, Michael Tokarev wrote: >> Stefano, Paul, can you take a look please? >> >> https://bugs.launchpad.net/bugs/1021649 > > That is a very good bug triage that you did! > > However "main_loop_wait: block indefinitely" only incre

[Qemu-devel] [PATCH V3 1/3] block: create bdrv_get_backing_file_ancestors_count()

2012-07-25 Thread benoit . canet
From: Benoît Canet Create bdrv_get_backing_file_ancestors_count() in order to be able to show in QMP and HMP how many ancestors backing an image a block device have. Signed-off-by: Benoit Canet --- block.c | 13 + block.h |1 + 2 files changed, 14 insertions(+) diff --git a/

[Qemu-devel] [PATCH V3 3/3] hmp: show the backing file ancestors count

2012-07-25 Thread benoit . canet
From: Benoît Canet Signed-off-by: Benoit Canet --- hmp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp.c b/hmp.c index 6b72a64..19dcb65 100644 --- a/hmp.c +++ b/hmp.c @@ -227,6 +227,8 @@ void hmp_info_block(Monitor *mon) if (info->value->inserted->has_backing_file) {

Re: [Qemu-devel] [PATCH 13/22] Add migration capabilities

2012-07-25 Thread Orit Wasserman
On 07/24/2012 09:17 PM, Luiz Capitulino wrote: > On Tue, 24 Jul 2012 20:06:06 +0300 > Orit Wasserman wrote: > >> On 07/24/2012 03:50 PM, Luiz Capitulino wrote: >>> On Tue, 24 Jul 2012 09:25:11 +0300 >>> Orit Wasserman wrote: >>> On 07/23/2012 09:23 PM, Luiz Capitulino wrote: > On Fri, 1

Re: [Qemu-devel] [PATCH 13/22] Add migration capabilities

2012-07-25 Thread Luiz Capitulino
On Wed, 25 Jul 2012 16:05:10 +0300 Orit Wasserman wrote: > On 07/24/2012 09:17 PM, Luiz Capitulino wrote: > > On Tue, 24 Jul 2012 20:06:06 +0300 > > Orit Wasserman wrote: > > > >> On 07/24/2012 03:50 PM, Luiz Capitulino wrote: > >>> On Tue, 24 Jul 2012 09:25:11 +0300 > >>> Orit Wasserman wrote

Re: [Qemu-devel] [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Avi Kivity
On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: >> > diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h >> > index e942df9..3d5378f 100644 >> > --- a/drivers/vhost/tcm_vhost.h >> > +++ b/drivers/vhost/tcm_vhost.h >> > @@ -80,7 +80,17 @@ struct tcm_vhost_tport { >> > >> > #i

Re: [Qemu-devel] [PATCH v2 00/16] net: Move legacy QEMU VLAN code into net/hub.c

2012-07-25 Thread Laszlo Ersek
On 07/24/12 17:35, Stefan Hajnoczi wrote: > v2: > * Change int64_t and unsigned int mess to int which is what VLAN IDs are > today [Laszlo] > * Remove bogus error_set() -> qerror_report() merge artifact [Laszlo] > * Use net_hub_id_for_client(nc, NULL) == 0 instead of adding > net_hub_port_pee

[Qemu-devel] [PATCH 2/6] kvm: Rename kvm_irqchip_set_irq to kvm_inject_async_irq

2012-07-25 Thread Peter Maydell
Rename the function kvm_irqchip_set_irq() to kvm_inject_async_irq(), since it can be used for asynchronous interrupt injection whether there is a full irqchip model in the kernel or not. Signed-off-by: Peter Maydell --- hw/kvm/i8259.c |2 +- hw/kvm/ioapic.c |2 +- kvm-all.c |6

[Qemu-devel] [PATCH 0/6] split out uses of kvm_irqchip_in_kernel()

2012-07-25 Thread Peter Maydell
This patch series removes all uses of kvm_irqchip_in_kernel() from architecture-independent code, by creating a set of more specific functions instead to test for the particular aspects of behaviour that the calling code is actually interested in. The uses in x86-specific code could in theory be f

[Qemu-devel] [PATCH 6/6] kvm: Add documentation comment for kvm_irqchip_in_kernel()

2012-07-25 Thread Peter Maydell
Now we've cleared out the architecture-independent uses of kvm_irqchip_in_kernel(), we can add a doc comment describing what it means. Signed-off-by: Peter Maydell --- kvm.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/kvm.h b/kvm.h index 1449795..ae9df2d 1

Re: [Qemu-devel] [PATCH 13/22] Add migration capabilities

2012-07-25 Thread Orit Wasserman
On 07/25/2012 04:11 PM, Luiz Capitulino wrote: > On Wed, 25 Jul 2012 16:05:10 +0300 > Orit Wasserman wrote: > >> On 07/24/2012 09:17 PM, Luiz Capitulino wrote: >>> On Tue, 24 Jul 2012 20:06:06 +0300 >>> Orit Wasserman wrote: >>> On 07/24/2012 03:50 PM, Luiz Capitulino wrote: > On Tue, 2

[Qemu-devel] [PATCH 5/6] kvm: Don't assume irqchip implies MSI routing via irqfds

2012-07-25 Thread Peter Maydell
Decouple another x86-specific assumption about what irqchips imply. Signed-off-by: Peter Maydell --- hw/virtio-pci.c |4 ++-- kvm-all.c |3 ++- kvm-stub.c|1 + kvm.h | 12 target-i386/kvm.c |4 +++- 5 files changed, 20 insertions(+), 4

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Benjamin Herrenschmidt
On Wed, 2012-07-25 at 15:48 +0300, Avi Kivity wrote: > >> If not, we can add a second BAR, but it should disappear when running an > >> older machine type. > > > > Well, the IO ports in legacy space are still there. We can also make the > > "register BAR" exist in both mode or we can add a second

[Qemu-devel] [PATCH 3/6] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-25 Thread Peter Maydell
kvm_allows_irq0_override() is a totally x86 specific concept: move it to the target-specific source file where it belongs. This means we need a new header file for the prototype: kvm_i386.h, in line with the existing kvm_ppc.h. Signed-off-by: Peter Maydell --- hw/pc.c |1 +

[Qemu-devel] [PATCH 4/6] kvm: Don't assume irqchip-in-kernel implies irqfds

2012-07-25 Thread Peter Maydell
Instead of assuming that we can use irqfds if and only if kvm_irqchip_in_kernel(), add a bool to the KVMState which indicates this, and is set only on x86 and only if the irqchip is in the kernel. The kernel documentation implies that the only thing you need to use KVM_IRQFD is that KVM_CAP_IRQFD

[Qemu-devel] [PATCH 1/6] kvm: Decouple 'interrupt injection is async' from 'kernel irqchip'

2012-07-25 Thread Peter Maydell
On x86 interrupt injection is asynchronous (and therefore VCPU idle management is done in the kernel) if and only if there is an in-kernel irqchip. On other architectures this isn't necessarily true (they may always do asynchronous injection), so define a new kvm_async_interrupt_injection() functio

Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey

2012-07-25 Thread Amos Kong
- Original Message - > On Wed, 25 Jul 2012 01:55:14 -0400 (EDT) > Amos Kong wrote: > > > > > > > - Original Message - > > > On Thu, 5 Jul 2012 20:48:44 +0800 > > > Amos Kong wrote: > > > > > > > Convert 'sendkey' to use QAPI. do_sendkey() depends on some > > > > variables/fun

Re: [Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching

2012-07-25 Thread Avi Kivity
On 07/25/2012 01:58 PM, Avi Kivity wrote: >> while (len > 0) { >> page = addr & TARGET_PAGE_MASK; >> l = (page + TARGET_PAGE_SIZE) - addr; >> if (l > len) >> l = len; >> + >> +qemu_rwlock_rdlock_devtree(); >> section = phys_page_find(pag

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Avi Kivity
On 07/25/2012 04:41 PM, Benjamin Herrenschmidt wrote: > On Wed, 2012-07-25 at 15:48 +0300, Avi Kivity wrote: >> >> If not, we can add a second BAR, but it should disappear when running an >> >> older machine type. >> > >> > Well, the IO ports in legacy space are still there. We can also make the >

Re: [Qemu-devel] [RFC][PATCH v4 3/3] tcg: Optimize qemu_ld/st by generating slow paths at the end of a block

2012-07-25 Thread Richard Henderson
On 07/25/2012 12:35 AM, Yeongkyoon Lee wrote: > +#if defined(CONFIG_QEMU_LDST_OPTIMIZATION) && defined(CONFIG_SOFTMMU) > +/* Macros/structures for qemu_ld/st IR code optimization: > + TCG_MAX_HELPER_LABELS is defined as same as OPC_BUF_SIZE in exec-all.h. */ > +#define TCG_MAX_QEMU_LDST 640

Re: [Qemu-devel] SeaBIOS, FW_CFG_NUMA, and FW_CFG_MAX_CPUS

2012-07-25 Thread Gleb Natapov
On Fri, Jul 20, 2012 at 05:00:25PM -0300, Eduardo Habkost wrote: > Hi, > > While working at the CPU index vs APIC ID changes, I stumbled upon > another not-very-well-defined interface between SeaBIOS and QEMU, and I > would like to clarify the semantics and constraints of some FW_CFG > entries. >

Re: [Qemu-devel] SeaBIOS, FW_CFG_NUMA, and FW_CFG_MAX_CPUS

2012-07-25 Thread Eduardo Habkost
On Wed, Jul 25, 2012 at 05:47:36PM +0300, Gleb Natapov wrote: > On Fri, Jul 20, 2012 at 05:00:25PM -0300, Eduardo Habkost wrote: > > Hi, > > > > While working at the CPU index vs APIC ID changes, I stumbled upon > > another not-very-well-defined interface between SeaBIOS and QEMU, and I > > would

[Qemu-devel] [PATCH 00/11] Migration next v6

2012-07-25 Thread Orit Wasserman
Those are the latest XBZRLE patches (part of the migration next branch). changes from v5: Add query-migrate-parameters that display the migration parameters (currently only capabilities I will add the other parameters separately). Remove capabilities from query-migrate. Please review. Juan Quint

[Qemu-devel] [PATCH 01/11] Add migration capabilities

2012-07-25 Thread Orit Wasserman
Add migration capabilities that can be queried by the management. The management can query the source QEMU and the destination QEMU in order to verify both support some migration capability (currently only XBZRLE). Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- hmp-commands.hx

[Qemu-devel] [PATCH 02/11] Add migrate_set_parameter and query-migrate-parameters

2012-07-25 Thread Orit Wasserman
The management can enable/disable a capability for the next migration by using migrate_set_parameter command. The management can query the current migration capabilities using query-migrate-parameters Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- hmp-commands.hx | 16 +++

[Qemu-devel] [PATCH 03/11] Add XBZRLE documentation

2012-07-25 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- docs/xbzrle.txt | 136 +++ 1 files changed, 136 insertions(+), 0 deletions(-) create mode 100644 docs/xbzrle.txt diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt new file mode 100644 index 000..f70e851 ---

[Qemu-devel] [PATCH 05/11] Add uleb encoding/decoding functions

2012-07-25 Thread Orit Wasserman
Implement Unsigned Little Endian Base 128. Signed-off-by: Orit Wasserman --- cutils.c | 33 + qemu-common.h |8 2 files changed, 41 insertions(+), 0 deletions(-) diff --git a/cutils.c b/cutils.c index b0bdd4b..700f943 100644 --- a/cutils.c +++

[Qemu-devel] [PATCH 11/11] Restart optimization on stage3 update version

2012-07-25 Thread Orit Wasserman
From: Juan Quintela Signed-off-by: Juan Quintela --- arch_init.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/arch_init.c b/arch_init.c index f484bd5..f555c27 100644 --- a/arch_init.c +++ b/arch_init.c @@ -279,7 +279,7 @@ static void save_bloc

Re: [Qemu-devel] [PATCH] Support 'help' as a synonym for '?' in command line options

2012-07-25 Thread Peter Maydell
Ping? There doesn't seem to have been any decision about whether changing the -help output was OK or not. Patchwork url: http://patchwork.ozlabs.org/patch/169798/ -- PMM On 9 July 2012 12:52, Peter Maydell wrote: > For command line options which permit '?' meaning 'please list the > permitted v

Re: [Qemu-devel] [Qemu-discuss] qemu-kvm: -netdev user: Parameter 'id' is missing

2012-07-25 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 8:02 PM, anatoly techtonik wrote: > On Tue, Jul 24, 2012 at 1:23 PM, Stefan Hajnoczi wrote: >> On Mon, Jul 23, 2012 at 10:41 PM, anatoly techtonik >> wrote: >>> Forwarding per discussion in qemu-discuss. >>> Please CC. >>> >>> -- Forwarded message -- >>>

Re: [Qemu-devel] [PATCH] target-arm: kvm: use KVM_SET_SREGS to set target to Cortex A15

2012-07-25 Thread Peter Maydell
On 25 July 2012 07:17, Rusty Russell wrote: > On Tue, 17 Jul 2012 19:19:16 +0100, Peter Maydell > wrote: >> So I can't see anything better than "complain and return failure >> from kvm_arch_init_vcpu() if the guest CPU isn't going to work". > > OK, here's what I have for kvm. It matches the ker

  1   2   3   >