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

2014-07-31 Thread Tiejun Chen
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 * Test: boot with a preinstalled ubuntu 14.04

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

2014-07-31 Thread Tiejun Chen
We'd like to split i440fx_init and then we can share something with other stuff. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/pci-host/piix.c | 91 -- 1 file changed, 75 insertions(+), 16 deletions(-) v2: * New patch to separate

[Qemu-devel] [v2][PATCH 1/5] 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 tiejun.c...@intel.com --- hw/i386/pc_piix.c | 117 +++--- 1 file changed, 93 insertions(+), 24 deletions(-) v2: * Fix some coding style diff

[Qemu-devel] [v2][PATCH 3/5] 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 tiejun.c...@intel.com --- hw/pci-host/piix.c | 42 ++ 1 file changed,

[Qemu-devel] [v2][PATCH 5/5] 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 tiejun.c...@intel.com --- hw/i386/pc_piix.c | 105 ++ 1 file changed, 105 insertions(+) v2: *

[Qemu-devel] [v2][PATCH 4/5] xen:hw:pci-host:piix: introduce xen_igd_passthrough_i440fx_init

2014-07-31 Thread Tiejun Chen
This is almost same as an original i440fx_init but just work with that xen igd host bridge to passthrough. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/pci-host/piix.c | 32 include/hw/i386/pc.h | 11 +++ 2 files changed, 43 insertions(+)

Re: [Qemu-devel] [RFC PATCH v2 16/49] target: save cpu state fields

2014-07-31 Thread Andreas Färber
Am 17.07.2014 13:03, schrieb Pavel Dovgalyuk: This patch adds interrupt fields to VMState for correct saving the CPU state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-arm/machine.c |5 - target-i386/machine.c |5 - 2 files changed, 8 insertions(+),

Re: [Qemu-devel] [PATCH] exec: save exception_index field

2014-07-31 Thread Andreas Färber
Hi, Am 31.07.2014 07:41, schrieb Pavel Dovgaluk: This patch adds subsection with exception_index field to the VMState for correct saving the CPU state. Without this patch simulator could miss the pending exception in the saved virtual machine state. Signed-off-by: Pavel Dovgalyuk

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 overcommiting of

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 pbonz...@redhat.com wrote: Il 30/07/2014 19:15, Ming Lei ha scritto: On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/07/2014 13:39, Ming Lei ha

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 fixes data loss

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 halt and qemu

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: [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 mre...@redhat.com --- qemu-img.c | 26 +++--- 1 file changed, 23 insertions(+), 3

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: Max

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 operation

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 about

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 mre...@redhat.com --- 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. However,

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 mre...@redhat.com --- tests/qemu-iotests/061 | 27 +++ tests/qemu-iotests/061.out | 32

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 pbonz...@redhat.com 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

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 like

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 pbonz...@redhat.com wrote: Il 30/07/2014 19:15, Ming Lei ha scritto: On Wed, Jul 30, 2014 at 9:45 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/07/2014 13:39, Ming Lei ha scritto: This patch introduces several APIs for supporting bypass qemu

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' when running

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

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 tiejun.c...@intel.com I think this is too much work for very little benefit. Just pass const char *type to i440fx_init. --

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 tiejun.c...@intel.com I think this is too much work for very little benefit.

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, but has

[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 a...@ozlabs.ru --- This went to Andreas's qom-next tree,

[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 a...@ozlabs.ru --- hw/ppc/spapr_pci_vfio.c | 75 + 1 file changed, 75 insertions(+) diff --git a/hw/ppc/spapr_pci_vfio.c

[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

[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

[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 a...@ozlabs.ru --- 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

[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

[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

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

2014-07-31 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- 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 ---

[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 a...@ozlabs.ru --- 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

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 pbonz...@redhat.com 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

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 peter.crosthwa...@xilinx.com --- memory.c | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git

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 is

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 foo[0].

[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

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 benoit.ca...@irqsave.net wrote: The Thursday 31 Jul 2014 à 11:55:28 (+0800), Ming Lei wrote : On Thu, Jul 31, 2014 at 7:37 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/07/2014 19:15, Ming Lei ha scritto: On Wed, Jul 30, 2014 at 9:45 PM,

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 arei.gong...@huawei.com 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 arei.gong...@huawei.com Signed-off-by: Chenliang chenlian...@huawei.com --- include/sysemu/sysemu.h | 1 + vl.c

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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 chenlian...@huawei.com

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Add HMP set-bootindex wrapper to allow setting devcie's bootindex via monitor. Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Chenliang chenlian...@huawei.com --- hmp-commands.hx | 15 +++ hmp.c | 13 + hmp.h

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

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

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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

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

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

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Add HMP info-bootindex command to getting devcie's bootindex via monitor. Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Chenliang chenlian...@huawei.com --- hmp-commands.hx | 2 ++ hmp.c | 20 hmp.h

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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 arei.gong...@huawei.com Signed-off-by:

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 freb...@gmail.com 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

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 pbonz...@redhat.com 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

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

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 QTAILQ as

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, or

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 shadowing

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

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 pbonz...@redhat.com wrote: This ensures that the children's unparent callback will still have a usable parent. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com --- qom/object.c | 2

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 pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 6 --

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 pbonz...@redhat.com This ensures that operations are completed after a reset Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/core.c | 4 +++- 1 file

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 pbonz...@redhat.com Drop the unused return value. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 +--- hw/ide/internal.h | 2 +- 2 files

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 pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 4 +---

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 pbonz...@redhat.com Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 6 --

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 pbonz...@redhat.com Make it optional and prepare for the next patches. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/atapi.c| 6 ++

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 pbonz...@redhat.com 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

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 pbonz...@redhat.com They are not used by AHCI, and should not be even available there. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/internal.h | 11

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 pbonz...@redhat.com It is now called only after the set_inactive callback. Put the two together. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c

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 pbonz...@redhat.com 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

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 pbonz...@redhat.com 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

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 pbonz...@redhat.com 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

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 stefa...@redhat.com 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

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 pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/core.c | 20 ++-- hw/ide/internal.h | 12 ++-- hw/ide/pci.c

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 pbonz...@redhat.com 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

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

[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 tiejun.c...@intel.com --- hw/pci-host/piix.c | 41 +

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 pbonz...@redhat.com These are defined twice, just use one set consistently. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com --- hw/ide/ahci.c | 6 +++---

[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 m...@redhat.com Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/i386/pc_piix.c| 4 +++- hw/pci-host/piix.c | 9 - include/hw/i386/pc.h

[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 tiejun.c...@intel.com --- hw/i386/pc_piix.c | 117 +++--- 1 file changed, 93 insertions(+), 24 deletions(-) v3: * Rebase v2: * Fix some

[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 tiejun.c...@intel.com --- hw/i386/pc_piix.c | 106 ++ 1 file changed, 106 insertions(+) v3: *

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 pbonz...@redhat.com This will provide a hook for sending the result of the command via the FIS receive area. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: John Snow js...@redhat.com ---

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 pbonz...@redhat.com 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:

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

[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 arei.gong...@huawei.com 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

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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,

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 +++

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 || !(pr-cmd

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 pbonz...@redhat.com 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

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

2014-07-31 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 device is

  1   2   3   >