Re: [Qemu-devel] [PATCH v2] po: Add Chinese translation

2014-07-31 Thread Amos Kong
On Thu, Jul 31, 2014 at 11:18:45AM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > > --- > v2: Fix typo for "_View". > --- > po/zh_CN.po | 86 > + > 1 file changed, 86 insertions(+) > create mode 100644 po/zh_CN.po Reviewed-by:

[Qemu-devel] [Bug 1350435] Re: tcg.c:1693: tcg fatal error

2014-07-31 Thread LocutusOfBorg
No, I did not test the patch, I don't think that I can push that patch in lp infrastructure, and I don't have my own one. Anyway Peter is right, we don't need to hide bugs, but to fix them ;) ** Changed in: qemu (Ubuntu) Status: Incomplete => New ** Tags removed: patch -- You received t

Re: [Qemu-devel] [PATCH v4 0/5] This series adds iotest case for IO throttling.

2014-07-31 Thread Fam Zheng
On Tue, 06/17 10:45, Fam Zheng wrote: > On Thu, 06/05 16:47, Fam Zheng wrote: > > There is a change in qemu-io sub-commands "aio_read" and "aio_write", which > > makes the aio requests accounted and the statistics reflected in blockstats. > > > > Note that IO throttling implementation allows overc

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Benoît Canet
The Thursday 31 Jul 2014 à 11:55:28 (+0800), Ming Lei wrote : > On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini wrote: > > Il 30/07/2014 19:15, Ming Lei ha scritto: > >> On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini wrote: > >>> Il 30/07/2014 13:39, Ming Lei ha scritto: > This patch introduc

Re: [Qemu-devel] [PATCH v2 1/2] block: fix overlapping multiwrite requests

2014-07-31 Thread Benoît Canet
The Wednesday 30 Jul 2014 à 09:53:30 (+0100), Stefan Hajnoczi wrote : > When request A is a strict superset of request B: > > > > > multiwrite_merge() merges them as follows: > > AA > > The tail of request A should have been included: > > AAAA > > This patch fi

Re: [Qemu-devel] [PATCH/RFC 4/5] s390x/kvm: test whether a cpu is STOPPED when checking "has_work"

2014-07-31 Thread David Hildenbrand
> > We have > > - wait (wait bit in PSW) > > - disabled wait (wait bit and interrupt fencing in PSW) > > - STOPPED (not related to PSW, state change usually handled via service > > processor or hypervisor) > > > > I think we have to differentiate between KVM/TCG. On KVM we always do in > > kernel

Re: [Qemu-devel] [PATCH v2 2/2] qemu-iotests: add multiwrite test cases

2014-07-31 Thread Benoît Canet
The Wednesday 30 Jul 2014 à 09:53:31 (+0100), Stefan Hajnoczi wrote : > This test case covers the basic bdrv_aio_multiwrite() scenarios: > 1. Single request > 2. Sequential requests (AABB) > 3. Superset overlapping requests (AABBAA) > 4. Subset overlapping requests (BBAABB) > 5. Head overlapping re

Re: [Qemu-devel] [PATCH alt 1/7] block: Add status callback to bdrv_amend_options()

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:05 (+0200), Max Reitz wrote : > Depending on the changed options and the image format, > bdrv_amend_options() may take a significant amount of time. In these > cases, a way to be informed about the operation's status is desirable. > > Since the operation is rather

Re: [Qemu-devel] [PATCH alt 2/7] qemu-img: Add progress output for amend

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:06 (+0200), Max Reitz wrote : > Now that bdrv_amend_options() supports a status callback, use it to > display a progress report. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 26 +++--- > 1 file changed, 23 insertions(+), 3 deletions(-) >

Re: [Qemu-devel] [PATCH alt 3/7] qemu-img: Fix insignifcant memleak

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:07 (+0200), Max Reitz wrote : > As soon as options is set in img_amend(), it needs to be freed before > the function returns. This leak is rather insignifcant, as qemu-img will > exit subsequently anyway, but there's no point in not fixing it. > > Signed-off-by: M

Re: [Qemu-devel] [PATCH alt 4/7] block/qcow2: Implement status CB for amend

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:08 (+0200), Max Reitz wrote : > The only really time-consuming operation potentially performed by > qcow2_amend_options() is zero cluster expansion when downgrading qcow2 > images from compat=1.1 to compat=0.10, so report status of that > operation and that operatio

Re: [Qemu-devel] [PATCH alt 1/7] block: Add status callback to bdrv_amend_options()

2014-07-31 Thread Benoît Canet
The Thursday 31 Jul 2014 à 09:51:05 (+0200), Benoît Canet wrote : > The Saturday 26 Jul 2014 à 21:22:05 (+0200), Max Reitz wrote : > > > Depending on the changed options and the image format, > > bdrv_amend_options() may take a significant amount of time. In these > > cases, a way to be informed a

Re: [Qemu-devel] [PATCH alt 5/7] block/qcow2: Make get_refcount() global

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:09 (+0200), Max Reitz wrote : > Reading the refcount of a cluster is an operation which can be useful in > all of the qcow2 code, so make that function globally available. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 23 --- >

Re: [Qemu-devel] [PATCH alt 6/7] block/qcow2: Simplify shared L2 handling in amend

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:10 (+0200), Max Reitz wrote : > Currently, we have a bitmap for keeping track of which clusters have > been created during the zero cluster expansion process. This was > necessary because we need to properly increase the refcount for shared > L2 tables. > > Howeve

Re: [Qemu-devel] [PATCH alt 7/7] iotests: Expand test 061

2014-07-31 Thread Benoît Canet
The Saturday 26 Jul 2014 à 21:22:11 (+0200), Max Reitz wrote : > Add some tests for progress output to 061. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/061 | 27 +++ > tests/qemu-iotests/061.out | 32 > tests/qemu-iotests/g

Re: [Qemu-devel] [PATCH 14/15] hw/block/virtio-blk: create num_queues vqs if dataplane is enabled

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 05:47, Ming Lei ha scritto: > On Wed, Jul 30, 2014 at 11:25 PM, Paolo Bonzini wrote: >> Il 30/07/2014 17:12, Michael S. Tsirkin ha scritto: > > Dataplane must not be a change to the guest ABI. If you implement this > feature you have to implement it for both dataplane an

Re: [Qemu-devel] [v2][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-07-31 Thread Michael S. Tsirkin
On Thu, Jul 31, 2014 at 02:31:34PM +0800, Tiejun Chen wrote: > v2: > > * Fix some coding style > * New patch to separate i440fx_init > * Just add prefix with XEN_IGD_PASSTHROUGH/xen_igd_passthrough > * Based on patch #2 to regenerate > * Unify prefix with XEN_IGD_PASSTHROUGH/xen_igd_passthrough li

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini wrote: > Il 30/07/2014 19:15, Ming Lei ha scritto: >> On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini wrote: >>> Il 30/07/2014 13:39, Ming Lei ha scritto: This patch introduces several APIs for supporting bypass qemu coroutine in case of bei

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 10:59, Ming Lei ha scritto: >> > No guesses please. Actually that's also my guess, but since you are >> > submitting the patch you must do better and show profiles where stack >> > switching disappears after the patches. > Follows the below hardware events reported by 'perf stat' whe

Re: [Qemu-devel] [PATCH 07/15] dataplane: use object pool to speed up allocation for virtio blk request

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 05:22, Ming Lei ha scritto: >> > >> > The problem is that g_slice here is not using the slab-style allocator >> > because the object is larger than roughly 500 bytes. One solution would >> > be to make virtqueue_pop/vring_pop allocate a VirtQueueElement of the >> > right size (and vi

Re: [Qemu-devel] [v2][PATCH 2/5] hw:pci-host:piix: split i440fx_init

2014-07-31 Thread Michael S. Tsirkin
On Thu, Jul 31, 2014 at 02:31:36PM +0800, Tiejun Chen wrote: > We'd like to split i440fx_init and then we can share something > with other stuff. > > Signed-off-by: Tiejun Chen I think this is too much work for very little benefit. Just pass const char *type to i440fx_init. --> i440fx: make ty

Re: [Qemu-devel] [v2][PATCH 2/5] hw:pci-host:piix: split i440fx_init

2014-07-31 Thread Chen, Tiejun
On 2014/7/31 17:10, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 02:31:36PM +0800, Tiejun Chen wrote: We'd like to split i440fx_init and then we can share something with other stuff. Signed-off-by: Tiejun Chen I think this is too much work for very little benefit. Just pass const char *

Re: [Qemu-devel] questions about host side of virtio-serial

2014-07-31 Thread Richard W.M. Jones
On Wed, Jul 30, 2014 at 12:52:41PM -0600, Chris Friesen wrote: > Hi, > > I'm working on a native user of virtio-serial (ie, not going via the > qemu guest agent). > > The information at "http://www.linux-kvm.org/page/Virtio-serial_API"; > does a good job of describing the guest side of things, bu

[Qemu-devel] [RFC PATCH 01/10] qom: Make object_child_foreach safe for objects removal

2014-07-31 Thread Alexey Kardashevskiy
Current object_child_foreach() uses QTAILQ_FOREACH() to walk through children and that makes children removal from the callback impossible. This makes object_child_foreach() use QTAILQ_FOREACH_SAFE(). Signed-off-by: Alexey Kardashevskiy --- This went to Andreas's qom-next tree, it is here for t

[Qemu-devel] [RFC PATCH 09/10] spapr_pci_vfio: Enable DDW

2014-07-31 Thread Alexey Kardashevskiy
This implements DDW for VFIO. Host kernel support is required for this. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci_vfio.c | 75 + 1 file changed, 75 insertions(+) diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index d

[Qemu-devel] [RFC PATCH 00/10] spapr: vfio: Enable Dynamic DMA windows (DDW)

2014-07-31 Thread Alexey Kardashevskiy
At the moment sPAPR PHB supports only a single 32bit window which is normally 1..2GB which is not enough for high performance devices. PAPR spec enables creating an additional window(s) to support 64bit DMA and bigger page sizes. This patchset adds DDW support for pseries. The host kernel changes

[Qemu-devel] [RFC PATCH 06/10] spapr_rtas: Add Dynamic DMA windows (DDW) RTAS calls support

2014-07-31 Thread Alexey Kardashevskiy
This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specification which allows to have additional DMA window(s) which can support page sizes other than 4K. The existing implementation of DDW in the guest tries to create one huge DMA window with 64K or 16MB pages and map the

[Qemu-devel] [RFC PATCH 08/10] spapr_pci: Enable DDW

2014-07-31 Thread Alexey Kardashevskiy
This implements DDW for emulated PHB. This advertises DDW in device tree. Signed-off-by: Alexey Kardashevskiy --- The DDW has not been tested as QEMU does not implement any 64bit DMA capable device and existing linux guests do not use DDW for 32bit DMA. --- hw/ppc/spapr_pci.c | 65 +++

[Qemu-devel] [RFC PATCH 02/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows

2014-07-31 Thread Alexey Kardashevskiy
The existing KVM_CREATE_SPAPR_TCE ioctl only support 4G windows max. We are going to add huge DMA windows support so this will create small window and unexpectedly fail later. This disables KVM_CREATE_SPAPR_TCE for windows bigger that 4GB. Since those windows are normally mapped at the boot time,

[Qemu-devel] [RFC PATCH 07/10] spapr: Add "ddw" machine option

2014-07-31 Thread Alexey Kardashevskiy
This adds a new "ddw" option for a machine to control presense of the Dynamic DMA window (DDW) feature. This option will be used by pseries to decide whether to put DDW RTAS tokens to PHB device tree nodes or not. This is not a PHB property because there is no way to change the emulated PHB prope

[Qemu-devel] [RFC PATCH 03/10] spapr_pci: Make find_phb()/find_dev() public

2014-07-31 Thread Alexey Kardashevskiy
This makes find_phb()/find_dev() public and changed its names to spapr_pci_find_phb()/spapr_pci_find_dev() as they are going to be used from other parts of QEMU such as VFIO DDW (dynamic DMA window) or VFIO PCI error injection or VFIO EEH handling - in all these cases there are RTAS calls which are

[Qemu-devel] [RFC PATCH 05/10] linux headers update for DDW

2014-07-31 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- linux-headers/linux/vfio.h | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 26c218e..f0aa97d 100644 --- a/linux-headers/linux/vfio.h +++ b

[Qemu-devel] [RFC PATCH 10/10] vfio: Enable DDW ioctls to VFIO IOMMU driver

2014-07-31 Thread Alexey Kardashevskiy
This enables DDW RTAS-related ioctls in VFIO. Signed-off-by: Alexey Kardashevskiy --- hw/misc/vfio.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 0b9eba0..e7b4d6e 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -4437,6 +4437,10 @@ int vfio_con

Re: [Qemu-devel] [PATCH 08/15] virtio: decrease size of VirtQueueElement

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 04:07, Ming Lei ha scritto: > On Wed, Jul 30, 2014 at 9:51 PM, Paolo Bonzini wrote: >> Il 30/07/2014 13:39, Ming Lei ha scritto: >>> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h >>> index a60104c..943e72f 100644 >>> --- a/include/hw/virtio/virtio.h >>> +++ b/i

Re: [Qemu-devel] [PATCH qom v1 2/2] memory: remove object_property_add_child_array

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 07:35, Peter Crosthwaite ha scritto: > Obsoleted by automatic object_property_add arrayification. > > Signed-off-by: Peter Crosthwaite > --- > > memory.c | 30 +- > 1 file changed, 5 insertions(+), 25 deletions(-) > > diff --git a/memory.c b/memory.c >

Re: [Qemu-devel] [PATCH v8 4/5] QMP: Add support for Archipelago

2014-07-31 Thread Stefan Hajnoczi
On Wed, Jul 30, 2014 at 08:59:09PM +0300, Chrysostomos Nanakos wrote: > Introduce new enum BlockdevOptionsArchipelago. > > @volume: #Name of the Archipelago volume image > > @mport: #'mport' is the port number on which mapperd is > listening. This

Re: [Qemu-devel] [PATCH qom v1 1/2] qom: object_property_add: Add automatic arrayification

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 07:34, Peter Crosthwaite ha scritto: > If "[*]" is given as the last part of a QOM property name, treat that > as an array property. The added property is given the first available > name, replacing the * with a decimal number counting from 0. > > First add with name "foo[*]" will be

[Qemu-devel] [RFC PATCH 04/10] spapr_iommu: Make spapr_tce_find_by_liobn() public

2014-07-31 Thread Alexey Kardashevskiy
At the moment spapr_tce_find_by_liobn() is used by H_PUT_TCE/... handlers to find an IOMMU by LIOBN. We are going to implement Dynamic DMA windows (DDW), new code will go to a new file and we will use spapr_tce_find_by_liobn() there too so let's make it public. Signed-off-by: Alexey Kardashevskiy

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 3:37 PM, Benoît Canet wrote: > The Thursday 31 Jul 2014 à 11:55:28 (+0800), Ming Lei wrote : >> On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini wrote: >> > Il 30/07/2014 19:15, Ming Lei ha scritto: >> >> On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini >> >> wrote: >> >>> I

Re: [Qemu-devel] [PATCH 5/9] nic: do not destroy memory regions in cleanup functions

2014-07-31 Thread Stefan Hajnoczi
On Wed, Jul 30, 2014 at 12:27:08PM +0200, Paolo Bonzini wrote: > The memory regions should be destroyed in the unrealize function; > since these NICs are not even qdev-ified, they cannot be unplugged > and they do not have to do anything to destroy their memory regions. > > Cc: stefa...@redhat.com

[Qemu-devel] [PATCH v4 2/8] bootindex: add del_boot_device_path function

2014-07-31 Thread arei.gonglei
From: Gonglei Introduce del_boot_device_path() to clean up fw_cfg content when hot-unplugging a device that refers to a bootindex. Signed-off-by: Gonglei Signed-off-by: Chenliang --- include/sysemu/sysemu.h | 1 + vl.c| 20 2 files changed, 21 inserti

[Qemu-devel] [PATCH v4 3/8] fw_cfg: add fw_cfg_machine_reset function

2014-07-31 Thread arei.gonglei
From: Gonglei We must assure that the changed bootindex can take effect when guest is rebooted. So we introduce fw_cfg_machine_reset(), which change the fw_cfg file's bootindex data using the new global fw_boot_order list. Signed-off-by: Chenliang Signed-off-by: Gonglei --- hw/nvram/fw_cfg.c

[Qemu-devel] [PATCH v4 1/8] bootindex: add modify_boot_device_path function

2014-07-31 Thread arei.gonglei
From: Gonglei When we want to change one device's bootindex, we should lookup the device and change the bootindex. it is simply that remove it from the global boot list, then re-add it, sorted by new bootindex. If the new bootindex has already used by another device just throw an error. Allow c

[Qemu-devel] [PATCH v4 6/8] qemu-monitor: HMP set-bootindex wrapper

2014-07-31 Thread arei.gonglei
From: Gonglei Add HMP set-bootindex wrapper to allow setting devcie's bootindex via monitor. Signed-off-by: Gonglei Signed-off-by: Chenliang --- hmp-commands.hx | 15 +++ hmp.c | 13 + hmp.h | 1 + 3 files changed, 29 insertions(+) diff --git a/hm

[Qemu-devel] [PATCH v4 7/8] qmp: add query-bootindex command

2014-07-31 Thread arei.gonglei
From: Gonglei Adds "query-bootindex" QMP command. Example QMP command: -> { "execute": "query-bootindex"} <- { "return":[ { "id":"ide0-0-0", "bootindex":1, "suffix":"/disk@0" }, { "id":"nic1", "bootinde

[Qemu-devel] [PATCH v4 0/8] modify boot order of guest, and take effect after rebooting

2014-07-31 Thread arei.gonglei
From: Gonglei Sometimes, we want to modify boot order of a guest, but no need to shutdown it. We can call dynamic changing bootindex of a guest, which can be assured taking effect just after the guest rebooting. For example, in P2V scene, we boot a guest and then attach a new system disk, for co

[Qemu-devel] [PATCH v4 4/8] bootindex: delete bootindex when device is removed

2014-07-31 Thread arei.gonglei
From: Gonglei Device should be removed from global boot list when it is hot-unplugged. Signed-off-by: Chenliang Signed-off-by: Gonglei --- hw/block/virtio-blk.c| 1 + hw/i386/kvm/pci-assign.c | 1 + hw/misc/vfio.c | 1 + hw/net/e1000.c | 1 + hw/net/eepro100.c|

[Qemu-devel] [PATCH v4 8/8] qemu-monitor: add HMP "info-bootindex" command

2014-07-31 Thread arei.gonglei
From: Gonglei Add HMP info-bootindex command to getting devcie's bootindex via monitor. Signed-off-by: Gonglei Signed-off-by: Chenliang --- hmp-commands.hx | 2 ++ hmp.c | 20 hmp.h | 1 + monitor.c | 7 +++ 4 files changed, 30 insertions(

[Qemu-devel] [PATCH v4 5/8] qmp: add set-bootindex command

2014-07-31 Thread arei.gonglei
From: Gonglei Adds "set-bootindex id=xx,bootindex=xx,suffix=xx" QMP command. Example QMP command: -> { "execute": "set-bootindex", "arguments": { "id": "ide0-0-1", "bootindex": 1, "suffix": "/disk@0"}} <- { "return": {} } Signed-off-by: Gonglei Signed-off-by: Chenliang --- qapi-schema.j

Re: [Qemu-devel] [v2][PATCH 2/5] hw:pci-host:piix: split i440fx_init

2014-07-31 Thread Michael S. Tsirkin
On Thu, Jul 31, 2014 at 05:26:41PM +0800, Chen, Tiejun wrote: > On 2014/7/31 17:10, Michael S. Tsirkin wrote: > >On Thu, Jul 31, 2014 at 02:31:36PM +0800, Tiejun Chen wrote: > >>We'd like to split i440fx_init and then we can share something > >>with other stuff. > >> > >>Signed-off-by: Tiejun Chen

Re: [Qemu-devel] [Spice-devel] qemu run crash when divice_add another qxl display card

2014-07-31 Thread Marc-André Lureau
On Tue, Jul 29, 2014 at 9:50 AM, zhou link wrote: > here hit an assertion: > > qemu-system-x86_64 -monitor stdio -vga qxl -spice > port=,disable-ticketing > (/home/brook/local/bin/qemu-system-x86_64:27280): Spice-Warning **: > reds.c:3295:spice_server_init: [07-29 23:41:47]ct: Jul 26 2014 00:

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Ming Lei
On Thu, Jul 31, 2014 at 5:15 PM, Paolo Bonzini wrote: > Il 31/07/2014 10:59, Ming Lei ha scritto: >>> > No guesses please. Actually that's also my guess, but since you are >>> > submitting the patch you must do better and show profiles where stack >>> > switching disappears after the patches. >>

Re: [Qemu-devel] [v2][PATCH 2/5] hw:pci-host:piix: split i440fx_init

2014-07-31 Thread Chen, Tiejun
On 2014/7/31 17:53, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 05:26:41PM +0800, Chen, Tiejun wrote: On 2014/7/31 17:10, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 02:31:36PM +0800, Tiejun Chen wrote: We'd like to split i440fx_init and then we can share something with other stuff

Re: [Qemu-devel] [PATCH 3/4] libqos: add a simple first-fit memory allocator

2014-07-31 Thread Stefan Hajnoczi
On Wed, Jul 30, 2014 at 06:28:28PM -0400, John Snow wrote: > +#define bitany(X, MASK) ((X) & (MASK)) > +#define bitset(X, MASK) (bitany((X), (MASK)) == (MASK)) This is subjective but macros like this should be avoided. This macro does not encapsulate anything substantial. It forces the reader to

Re: [Qemu-devel] [PATCH v2 0/4] libqos: add a simple first-fit memory allocator

2014-07-31 Thread Stefan Hajnoczi
On Wed, Jul 30, 2014 at 06:28:25PM -0400, John Snow wrote: > This set collects two patches by Marc Marí already on the mailing list, > but goes further by adding a simple memory allocator that allows us to > track and debug freed memory, and optionally keep track of any leaks. > > > v2: use QTAIL

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 11:47, Ming Lei ha scritto: >> Block mirroring of a device for example is done using coroutines. >> As block mirroring can be done on a raw device you need coroutines. > > If block layer knows the mirroring is in-progress, it still can enable > coroutine by ignoring bypass coroutine,

Re: [Qemu-devel] [PATCH 03/28] ide-test: add test for werror=stop

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:44PM -0400, John Snow wrote: > @@ -489,6 +490,72 @@ static void test_flush(void) > ide_test_quit(); > } > > +static void prepare_blkdebug_script(const char *debug_path, const char > *event) > +{ > +FILE *debug_file = fopen(debug_path, "w"); Please avoid s

Re: [Qemu-devel] latest rc: virtio-blk hangs forever after migration

2014-07-31 Thread Marcin Gibuła
Can you dump *env before and after the call to kvm_arch_get_registers? Yes, but it seems they are equal - I used memcmp() to compare them. Is there any other side effect that cpu_synchronize_all_states() may have? I think I found it. The reason for hang is, because when second call to kvm_ar

Re: [Qemu-devel] [PATCH 1/9] qom: object: delete properties before calling instance_finalize

2014-07-31 Thread Peter Crosthwaite
On Wed, Jul 30, 2014 at 8:27 PM, Paolo Bonzini wrote: > This ensures that the children's unparent callback will still > have a usable parent. > > Signed-off-by: Paolo Bonzini Reviewed-by: Peter Crosthwaite > --- > qom/object.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -

Re: [Qemu-devel] [PATCH 05/28] ide: simplify reset callbacks

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:46PM -0400, John Snow wrote: > From: Paolo Bonzini > > Drop the unused return value and make the callback optional. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/ahci.c | 6 -- > hw/ide/core.c | 5 +++-- > hw/ide/internal.

Re: [Qemu-devel] [PATCH 04/28] ide: stash aiocb for flushes

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:45PM -0400, John Snow wrote: > From: Paolo Bonzini > > This ensures that operations are completed after a reset > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-

Re: [Qemu-devel] [PATCH 07/28] ide: simplify async_cmd_done callbacks

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:48PM -0400, John Snow wrote: > From: Paolo Bonzini > > Drop the unused return value. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/ahci.c | 4 +--- > hw/ide/internal.h | 2 +- > 2 files changed, 2 insertions(+), 4 deletions(-) Re

Re: [Qemu-devel] [PATCH 08/28] ide: simplify start_transfer callbacks

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:49PM -0400, John Snow wrote: > From: Paolo Bonzini > > Drop the unused return value and make the callback optional. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/ahci.c | 4 +--- > hw/ide/core.c | 10 +++--- > hw/ide/inte

Re: [Qemu-devel] [PATCH 06/28] ide: simplify set_inactive callbacks

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:47PM -0400, John Snow wrote: > From: Paolo Bonzini > > Drop the unused return value and make the callback optional. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/ahci.c | 6 -- > hw/ide/core.c | 5 +++-- > hw/ide/internal.

Re: [Qemu-devel] [PATCH 09/28] ide: wrap start_dma callback

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:50PM -0400, John Snow wrote: > From: Paolo Bonzini > > Make it optional and prepare for the next patches. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/atapi.c| 6 ++ > hw/ide/core.c | 15 --- > hw/ide/interna

Re: [Qemu-devel] [PATCH 10/28] ide: remove wrong setting of BM_STATUS_INT

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:51PM -0400, John Snow wrote: > From: Paolo Bonzini > > Similar to the case removed in commit 69c38b8 (ide/core: Remove explicit > setting of BM_STATUS_INT, 2011-05-19), the only remaining use of > add_status(..., BM_STATUS_INT) is for short PRDs. The flag should > n

Re: [Qemu-devel] [PATCH 12/28] ide: move BM_STATUS bits to pci.[ch]

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:53PM -0400, John Snow wrote: > From: Paolo Bonzini > > They are not used by AHCI, and should not be even available there. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/internal.h | 11 --- > hw/ide/pci.c | 4 > hw/i

Re: [Qemu-devel] [PATCH 11/28] ide: fold add_status callback into set_inactive

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:52PM -0400, John Snow wrote: > From: Paolo Bonzini > > It is now called only after the set_inactive callback. Put the two together. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/ahci.c | 9 - > hw/ide/atapi.c| 2 +-

Re: [Qemu-devel] [PATCH 9/9] tpm_tis: remove instance_finalize callback

2014-07-31 Thread Peter Crosthwaite
On Wed, Jul 30, 2014 at 8:27 PM, Paolo Bonzini wrote: > It is never used, since ISA device are not hot-unpluggable. > Is it not good design practice though for the uninit to be correctly implemented regardless of whether there is current-day usage? This seems like the kind of patch that would get

Re: [Qemu-devel] [PATCH 4/9] vga: do not dynamically allocate chain4_alias

2014-07-31 Thread Peter Crosthwaite
On Wed, Jul 30, 2014 at 8:27 PM, Paolo Bonzini wrote: > Instead, add a boolean variable to indicate the presence of the region. > Patch is good. Can you add a sentence on why you are doing this though? Is it just the save on the repeated malloc and free (which is sane in its own right) or somethi

Re: [Qemu-devel] [PATCH 9/9] tpm_tis: remove instance_finalize callback

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 14:00, Peter Crosthwaite ha scritto: > On Wed, Jul 30, 2014 at 8:27 PM, Paolo Bonzini wrote: >> It is never used, since ISA device are not hot-unpluggable. >> > > Is it not good design practice though for the uninit to be correctly > implemented regardless of whether there is curren

Re: [Qemu-devel] [PATCH 5/9] nic: do not destroy memory regions in cleanup functions

2014-07-31 Thread Peter Crosthwaite
On Thu, Jul 31, 2014 at 7:46 PM, Stefan Hajnoczi wrote: > On Wed, Jul 30, 2014 at 12:27:08PM +0200, Paolo Bonzini wrote: >> The memory regions should be destroyed in the unrealize function; >> since these NICs are not even qdev-ified, they cannot be unplugged >> and they do not have to do anything

Re: [Qemu-devel] [PATCH 13/28] ide: move retry constants out of BM_STATUS_* namespace

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:54PM -0400, John Snow wrote: > From: Paolo Bonzini > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/core.c | 20 ++-- > hw/ide/internal.h | 12 ++-- > hw/ide/pci.c | 14 +++--- > 3 files changed, 2

Re: [Qemu-devel] [PATCH 4/9] vga: do not dynamically allocate chain4_alias

2014-07-31 Thread Paolo Bonzini
Il 31/07/2014 14:01, Peter Crosthwaite ha scritto: > On Wed, Jul 30, 2014 at 8:27 PM, Paolo Bonzini wrote: >> Instead, add a boolean variable to indicate the presence of the region. >> > > Patch is good. Can you add a sentence on why you are doing this > though? Is it just the save on the repeate

Re: [Qemu-devel] [v2][PATCH 2/5] hw:pci-host:piix: split i440fx_init

2014-07-31 Thread Chen, Tiejun
On 2014/7/31 18:12, Chen, Tiejun wrote: On 2014/7/31 17:53, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 05:26:41PM +0800, Chen, Tiejun wrote: On 2014/7/31 17:10, Michael S. Tsirkin wrote: On Thu, Jul 31, 2014 at 02:31:36PM +0800, Tiejun Chen wrote: We'd like to split i440fx_init and the

[Qemu-devel] [v3][PATCH 3/4] xen:hw:pci-host:piix: create host bridge to passthrough

2014-07-31 Thread Tiejun Chen
Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. This is based on http://patchwork.ozlabs.org/patch/363810/. Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 41 + include/hw/i386/pc.h | 2 ++ 2 file

Re: [Qemu-devel] [PATCH 14/28] ahci: remove duplicate PORT_IRQ_* constants

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:55PM -0400, John Snow wrote: > From: Paolo Bonzini > > These are defined twice, just use one set consistently. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/ahci.c | 6 +++--- > hw/ide/ahci.h | 21 - > 2 files cha

[Qemu-devel] [v3][PATCH 1/4] i440fx: make types configurable at run-time

2014-07-31 Thread Tiejun Chen
Xen wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c| 4 +++- hw/pci-host/piix.c | 9 - include/hw/i386/pc.h | 6 +- 3 files changed, 12 inse

[Qemu-devel] [v3][PATCH 0/5] xen: introduce new machine for IGD passthrough

2014-07-31 Thread Tiejun Chen
v3: * Drop patch #4 * Add one patch #1 from Michael * Rebase v2: * Fix some coding style * New patch to separate i440fx_init * Just add prefix with XEN_IGD_PASSTHROUGH/xen_igd_passthrough * Based on patch #2 to regenerate * Unify prefix with XEN_IGD_PASSTHROUGH/xen_igd_passthrough like patch #3

[Qemu-devel] [v3][PATCH 2/4] hw:i386:pc_piix: split pc_init1()

2014-07-31 Thread Tiejun Chen
We'd like to split pc_init1 and then we can share something with other stuff. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 117 +++--- 1 file changed, 93 insertions(+), 24 deletions(-) v3: * Rebase v2: * Fix some coding style diff --git

[Qemu-devel] [v3][PATCH 4/4] xen:hw:i386:pc_piix: introduce new machine for IGD passthrough

2014-07-31 Thread Tiejun Chen
Now we can introduce a new machine, xenigd, specific to IGD passthrough. This can avoid involving other common codes. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 106 ++ 1 file changed, 106 insertions(+) v3: * Rebase v2: * Unify pref

Re: [Qemu-devel] [PATCH 15/28] ide: stop PIO transfer on errors

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:56PM -0400, John Snow wrote: > From: Paolo Bonzini > > This will provide a hook for sending the result of the command via the > FIS receive area. > > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/core.c | 7 --- > 1 file changed, 4 in

Re: [Qemu-devel] [PATCH 16/28] ide: make all commands go through cmd_done

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:57PM -0400, John Snow wrote: > From: Paolo Bonzini > > AHCI has code to fill in the D2H FIS trigger the IRQ all over the place. > Centralize this in a single cmd_done callback by generalizing the existing > async_cmd_done callback. > > Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 1/7] usb: a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-audio.c | 2 +- hw/usb/dev-mtp.c | 4 ++-- hw/usb/hcd-ehci.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index bfebfe9..988f6cc 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/

[Qemu-devel] [PATCH for-2.2 0/7] a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Gonglei (7): usb: a trivial code change for more idiomatic writing style audio: a trivial code change for more idiomatic writing style isa-bus: a trivial code change for more idiomatic writing style a trivial code change for more idiomatic writing style spice: a trivial co

[Qemu-devel] [PATCH 5/7] spice: a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- ui/spice-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 7bb91e6..ff54dac 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -677,7 +677,7 @@ void qemu_spice_init(void) if (

[Qemu-devel] [PATCH 6/7] vl: a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- vl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index fe451aa..69f0f20 100644 --- a/vl.c +++ b/vl.c @@ -1136,7 +1136,7 @@ static int drive_init_func(QemuOpts *opts, void *opaque) static int drive_enable_snapsh

[Qemu-devel] [PATCH 7/7] vmxnet3: a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/net/vmxnet3.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 77bea6f..34c5aff 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1009,7 +1009,7 @@ vmxnet3_indicate_p

[Qemu-devel] [PATCH 4/7] a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- qdev-monitor.c | 2 +- qemu-char.c | 2 +- util/qemu-sockets.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index f87f3d8..3e30d38 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@

Re: [Qemu-devel] [PATCH 17/28] ahci: construct PIO Setup FIS for PIO commands

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:58PM -0400, John Snow wrote: > +static void ahci_write_fis_pio(AHCIDevice *ad, uint16_t len) > +{ > +AHCIPortRegs *pr = &ad->port_regs; > +uint8_t *pio_fis, *cmd_fis; > +uint64_t tbl_addr; > +dma_addr_t cmd_len = 0x80; > + > +if (!ad->res_fis || !(p

[Qemu-devel] [PATCH 3/7] isa-bus: a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/isa/isa-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index b28981b..851f953 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -50,7 +50,7 @@ ISABus *isa_bus_new(DeviceState *dev, M

Re: [Qemu-devel] [PATCH 6/9] ioport: split deletion and destruction

2014-07-31 Thread Peter Crosthwaite
On Wed, Jul 30, 2014 at 8:27 PM, Paolo Bonzini wrote: > Of the two functions portio_list_del and portio_list_destroy, > the latter is just freeing a memory area. However, portio_list_del > is the logical equivalent of memory_region_del_subregion so > destruction of memory regions does not belong

[Qemu-devel] [PATCH 2/7] audio: a trivial code change for more idiomatic writing style

2014-07-31 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/audio/gus.c | 2 +- hw/audio/hda-codec.c | 3 ++- hw/audio/sb16.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index bba6840..4a43ce7 100644 --- a/hw/audio/gus.c +++ b/hw/audio/g

Re: [Qemu-devel] [PATCH 18/28] q35: Enable the ioapic device to be seen by qtest.

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:17:59PM -0400, John Snow wrote: > Currently, the ioapic device can not be found in a qtest environment > when requesting "irq_interrupt_in ioapic" via the qtest socket. > > By mirroring how the ioapic is added in i44ofx (hw/i440/pc_piix.c), > as a child of "q35," the dev

Re: [Qemu-devel] [PATCH v2] po: Add Chinese translation

2014-07-31 Thread Dongsheng Song
On Thu, Jul 31, 2014 at 3:02 PM, Amos Kong wrote: > On Thu, Jul 31, 2014 at 11:18:45AM +0800, Fam Zheng wrote: >> Signed-off-by: Fam Zheng >> >> --- >> v2: Fix typo for "_View". >> --- >> po/zh_CN.po | 86 >> + >> 1 file changed, 86 in

Re: [Qemu-devel] [PATCH 19/28] qtest: Adding qtest_memset and qmemset.

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:18:00PM -0400, John Snow wrote: > Currently, libqtest allows for memread and memwrite, but > does not offer a simple way to zero out regions of memory. > This patch adds a simple function to do so. > > Signed-off-by: John Snow > --- > tests/libqtest.c | 12

Re: [Qemu-devel] [PATCH 21/28] libqtest: Correct small memory leak.

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:18:02PM -0400, John Snow wrote: > Fixes a small memory leak inside of libqtest. > After we produce a test path and glib copies the string > for itself, we should clean up our temporary copy. > > Signed-off-by: John Snow > --- > tests/libqtest.c | 1 + > 1 file changed,

Re: [Qemu-devel] [PATCH 20/28] libqos: Correct memory leak

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:18:01PM -0400, John Snow wrote: > Fix a small memory leak inside of libqos, in the pc_alloc_init routine. > > Signed-off-by: John Snow > --- > tests/libqos/malloc-pc.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Stefan Hajnoczi pgpcpqzaGHLgQ.pgp Descrip

Re: [Qemu-devel] [PATCH for-2.2 0/7] a trivial code change for more idiomatic writing style

2014-07-31 Thread Peter Maydell
On 31 July 2014 13:28, wrote: > From: Gonglei > > Gonglei (7): > usb: a trivial code change for more idiomatic writing style > audio: a trivial code change for more idiomatic writing style > isa-bus: a trivial code change for more idiomatic writing style > a trivial code change for more

Re: [Qemu-devel] [PATCH 22/28] libqos: Fixes a small memory leak.

2014-07-31 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 02:18:03PM -0400, John Snow wrote: > Allow users the chance to clean up the QPCIBusPC structure > by adding a small cleanup routine. Helps clear up small > memory leaks during setup/teardown, to allow for cleaner > debug output messages. > > Signed-off-by: John Snow > ---

  1   2   3   >