Re: [Qemu-devel] [vfio-users] [PATCH v2 1/3] input: add qemu_input_qcode_to_linux + qemu_input_linux_to_qcode

2016-01-05 Thread Jonathan Scruggs
I found the qemu user yesterday and added it to the input group. All is good now. The patches work great! Are they being added to the main code base soon? A small faq on the site detailing libvirt usage and adding qemu to the input group would be needed though. I notice no bugs as of yet. The mous

Re: [Qemu-devel] [PATCH v4 00/14] qemu-img map: Allow driver to return file of the allocated block

2016-01-05 Thread Fam Zheng
On Mon, 01/04 22:02, Max Reitz wrote: > On 24.12.2015 06:50, Fam Zheng wrote: > > v4: Rebase and resend, adding Eric's and Stefan's reviewed-by. > > > > Fix one typo in patch 13. > > > > Drop previous patch 14 for a later rework because it is not a hard > > requirement, but it is pend

[Qemu-devel] [PATCH v5 00/15] qemu-img map: Allow driver to return file of the allocated block

2016-01-05 Thread Fam Zheng
v5: Address Max's review comments: - "It's" -> "Its" in commit message in patch 1; - Retain the "bs->file" condition to unbreak iotest 102 in patch 1; - Fix comment of BDRV_BLOCK_OFFSET_VALID in patch 1; - Fix VMDK's compressed case in patch 11; - Add patch 12 in complement of p

[Qemu-devel] [PATCH v5 03/15] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index 7096a29..da74eb7 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1348,6 +1348,7 @@ static int64_t coroutine_fn qcow2_co_get_block_st

[Qemu-devel] [PATCH v5 01/15] block: Add "file" output parameter to block status query functions

2016-01-05 Thread Fam Zheng
The added parameter can be used to return the BDS pointer which the valid offset is referring to. Its value should be ignored unless BDRV_BLOCK_OFFSET_VALID in ret is set. Until block drivers fill in the right value, let's clear it explicitly right before calling .bdrv_get_block_status. The "bs->

Re: [Qemu-devel] [PATCH] macio: fix overflow in lba to offset conversion for ATAPI devices

2016-01-05 Thread Mark Cave-Ayland
On 04/01/16 21:03, John Snow wrote: > On 01/04/2016 03:54 PM, Mark Cave-Ayland wrote: >> On 04/01/16 20:36, John Snow wrote: >> >>> On 01/04/2016 02:15 PM, Mark Cave-Ayland wrote: On 04/01/16 19:04, P J P wrote: > +-- On Mon, 4 Jan 2016, Mark Cave-Ayland wrote --+ > | /* Cal

[Qemu-devel] [PATCH v5 02/15] qcow: Assign bs->file->bs to file in qcow_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow.c b/block/qcow.c index 558f443..b59383f 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -509,6 +509,7 @@ static int64_t coroutine_fn qco

[Qemu-devel] [PATCH v5 07/15] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qed.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/qed.c b/block/qed.c index a6bbd8b..03af9c1 100644 --- a/block/qed.c +++ b/block/qed.c @@ -692,6 +692,7 @@ typedef struct { uint64_t pos

[Qemu-devel] [PATCH v5 06/15] parallels: Assign bs->file->bs to file in parallels_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index d83246b..129668b 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -273,6 +273,7 @@ static

[Qemu-devel] [PATCH v5 08/15] sheepdog: Assign bs to file in sd_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/sheepdog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index 0f6789e..d5e7ff8 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2740,6 +2740,9 @@ sd_co_get_block_status(BlockDriv

[Qemu-devel] [PATCH v5 04/15] raw: Assign bs to file in raw_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/raw-posix.c | 1 + block/raw_bsd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index 6fc0b71..344272f 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c

[Qemu-devel] [PATCH v5 05/15] iscsi: Assign bs to file in iscsi_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 2d1e230..8c7f1b3 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -625,6 +625,9 @@ out: if (iTask.task

[Qemu-devel] [PATCH v5 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-05 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/vmdk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index f5a56fd..59e1ffe 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1265,6 +1265,7 @@ static int64_t coroutine_fn vmdk_co_get_block_status(Bloc

[Qemu-devel] [PATCH v5 09/15] vdi: Assign bs->file->bs to file in vdi_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vdi.c b/block/vdi.c index 2199fd3..6b1a57b 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -550,6 +550,7 @@ static int64_t coroutine_fn vdi_co_get_block_status(BlockDriv

[Qemu-devel] [PATCH v5 13/15] qemu-img: In "map", use the returned "file" from bdrv_get_block_status

2016-01-05 Thread Fam Zheng
Now all drivers should return a correct "file", we can make use of it, even with the recursion into backing chain above. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b

[Qemu-devel] [PATCH v5 12/15] block: Remove the "bs->file" test in bdrv_co_get_block_status

2016-01-05 Thread Fam Zheng
Now that all drivers return the right "file" pointer, we can remove this check. Signed-off-by: Fam Zheng --- block/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 492c291..1ca4e61 100644 --- a/block/io.c +++ b/block/io.c @@ -1550,7 +1550,7 @

[Qemu-devel] [PATCH v5 10/15] vpc: Assign bs->file->bs to file in vpc_co_get_block_status

2016-01-05 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index 912f5d0..412ff41 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -588,6 +588,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDr

Re: [Qemu-devel] [PATCH v8 1/2] mirror: Rewrite mirror_iteration

2016-01-05 Thread Fam Zheng
On Mon, 01/04 20:27, Max Reitz wrote: > On 24.12.2015 04:15, Fam Zheng wrote: > > The "pnum < nb_sectors" condition in deciding whether to actually copy > > data is unnecessarily strict, and the qiov initialization is > > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > > > Rewrit

[Qemu-devel] [PATCH v5 14/15] qemu-img: Make MapEntry a QAPI struct

2016-01-05 Thread Fam Zheng
The "flags" bit mask is expanded to two booleans, "data" and "zero"; "bs" is replaced with "filename" string. Refactor the merge conditions in img_map() into entry_mergeable(). Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- qapi/block-core.json | 27

[Qemu-devel] [PATCH v5 15/15] iotests: Add "qemu-img map" test for VMDK extents

2016-01-05 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- tests/qemu-iotests/059 | 10 ++ tests/qemu-iotests/059.out | 38 ++ 2 files changed, 48 insertions(+) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 i

[Qemu-devel] [PATCH v9 0/2] mirror: Improve zero write and discard

2016-01-05 Thread Fam Zheng
v9: Fix the one bug Max found: "shrink *= chunk_sectors". v8: Rebase onto master (didn't pick up Max's rev-by due to non-trivial code change). The conflict is around removed lines about "max_iov" and "IOV_MAX" due to commit 3515727f3, but this also reveals this series forgot that

[Qemu-devel] [PATCH v9 2/2] mirror: Add mirror_wait_for_io

2016-01-05 Thread Fam Zheng
The three lines are duplicated a number of times now, refactor a function. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/mirror.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index e3e9fad..0fcc37b 100

[Qemu-devel] [PATCH v9 1/2] mirror: Rewrite mirror_iteration

2016-01-05 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. Rewrite mirror_iteration to fix both flaws. Signed-off-by: Fam Zheng --- block/mirror.c | 347 +++

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: > >> The two mechanisms referenced above would likely require coordination with > >> QEMU and as such are open to discussion. I haven't attempted to address > >> them as I am not sure there is a consensus as of yet. My personal > >>

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: > > >> The two mechanisms referenced above would likely require coordination > > >> with > > >> QEMU and as such are open to discussion. I haven't attempted to address > > >> them as I

[Qemu-devel] [Bug 1529859] Re: qemu 2.5.0 ivshmem segfault with msi=off option

2016-01-05 Thread maquefel
>See previously posted patch: > http://lists.gnu.org/archive/html/qemu-stable/2015-12/msg00034.html This patch resolves issue. I can confirm it works. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [Qemu-devel] [PATCH 0/3] sun4u: timer fixups

2016-01-05 Thread Artyom Tarasenko
Looks good. Reviewed-By: Artyom Tarasenko On Fri, Nov 13, 2015 at 6:54 PM, Mark Cave-Ayland wrote: > Whilst trying to boot FreeBSD SPARC64, it became apparent that the existing > timer code doesn't behave correctly with respect to the NPT and INT_DIS > bits. This patchset corrects this behavio

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: > > > >> The two mechanisms referenced above would likely require coordination > > > >> with > > > >> QEMU an

Re: [Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-05 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Cao jin wrote: > On 01/04/2016 11:15 PM, Stefano Stabellini wrote: > > On Sun, 27 Dec 2015, Cao jin wrote: > > > To catch the error msg. Also modify the caller > > > > > > Signed-off-by: Cao jin > > > > This looks much better, thanks. > > > > > [...] > > > > > > -int xen_h

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote: > > > > >> The two mechanisms referenced above would likel

[Qemu-devel] [PATCH] PCI Bonito: QOMify

2016-01-05 Thread Cao jin
Also clear the code Signed-off-by: Cao jin --- Since this file don`t have maintainer & it should be simple enough for qemu-trival, so cc: qemu-trival. hw/pci-host/bonito.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Mon, Jan 04, 2016 at 07:11:25PM -0800, A

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > > > * Michael S. Tsirkin (m...@redhat.com) wrot

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Mon, Jan 04, 2016 at 07:11:25PM -0800, A

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:59:54PM +0200, Michael S. Tsirkin wrote: > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > > > * Michael S. Tsirkin

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 11:03:38AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Tue, Jan 05, 2016 at 10:01:04AM +, D

[Qemu-devel] [PATCH v3 04/11] igd: switch TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE to realize

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pci-host/igd.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c index ef0273b..d1eeafb 100644 --- a/hw/pci-host/igd.c +++ b/hw/pci-host/igd.c @@ -53,7 +53,7 @@ out: return ret; } -static

[Qemu-devel] [PATCH v3 06/11] igd: use defines for standard pci config space offsets

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pci-host/igd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c index 6f52ab1..0784128 100644 --- a/hw/pci-host/igd.c +++ b/hw/pci-host/igd.c @@ -10,9 +10,9 @@ typedef struct { /* Here we just ex

[Qemu-devel] [PATCH v3 02/11] pc: remove has_igd_gfx_passthru global

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/xen/xen_pt.h | 5 +++-- vl.c| 10 -- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index 3749711..cdd73ff 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -4,6 +4,7 @@ #include "qemu

[Qemu-devel] [PATCH v3 03/11] pc: move igd support code to igd.c

2016-01-05 Thread Gerd Hoffmann
Pure code motion, except for dropping instance_size for TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE (no need to set, we can inherit it from TYPE_I440FX_PCI_DEVICE). Signed-off-by: Gerd Hoffmann Acked-by: Stefano Stabellini --- hw/pci-host/Makefile.objs | 3 ++ hw/pci-host/igd.c | 96 +++

[Qemu-devel] [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pci-host/igd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c index d1eeafb..6f52ab1 100644 --- a/hw/pci-host/igd.c +++ b/hw/pci-host/igd.c @@ -53,12 +53,20 @@ out: return ret; } +static void (*i440fx_

[Qemu-devel] [PATCH v3 11/11] igd: move igd-passthrough-isa-bridge creation to machine init

2016-01-05 Thread Gerd Hoffmann
This patch moves igd-passthrough-isa-bridge creation out of the xen passthrough code into machine init. It is triggered by the igd-passthru=on machine option. Advantages: * This works for on both xen and kvm. * It is activated for the pc machine type only, q35 has a real isa bridge on 1f.0

[Qemu-devel] [PATCH v3 07/11] igd: revamp host config read

2016-01-05 Thread Gerd Hoffmann
Move all work to the host_pci_config_copy helper function, which we can easily reuse when adding q35 support. Open sysfs file only once for all values. Use pread. Proper error handling. Fix bugs: * Don't throw away results (like old host_pci_config_read did because val was passed by value no

[Qemu-devel] [PATCH v3 10/11] igd: handle igd-passthrough-isa-bridge setup in realize()

2016-01-05 Thread Gerd Hoffmann
That way a simple '-device igd-passthrough-isa-bridge,addr=1f' will do the setup. Also instead of looking up reasonable PCI IDs based on the graphic device id simply copy over the ids from the host, thereby reusing the infrastructure we have in place for the igd host bridges. Less code, and shoul

[Qemu-devel] [PATCH v3 01/11] pc: wire up TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE for !xen

2016-01-05 Thread Gerd Hoffmann
rename pc_xen_hvm_init_pci to pc_i440fx_init_pci, use it for both xen and non-xen init. That changes behavior of all pc-i440fx-$version machine types where specifying -machine igd-passthru=on used to have no effect and now it has. It is unlikely to cause any trouble though as there used to be no

[Qemu-devel] [PATCH v3 00/11] igd passthrough chipset tweaks

2016-01-05 Thread Gerd Hoffmann
Hi, We have some code in our tree to support pci passthrough of intel graphics devices (igd) on xen, which requires some chipset tweaks for (a) the host bridge and (b) the lpc/isa-bridge to meat the expectations of the guest driver. For kvm we need pretty much the same, also the requirements fo

[Qemu-devel] [PATCH v3 08/11] igd: add q35 support

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pci-host/igd.c | 41 - hw/pci-host/q35.c | 6 +- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c index ec48875..f6e3f7a 100644 --- a/hw/pci-host/igd.c +++ b/hw/pc

[Qemu-devel] [PATCH v3 09/11] igd: move igd-passthrough-isa-bridge to igd.c too

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/i386/pc_piix.c | 113 -- hw/pci-host/igd.c | 108 +++ 2 files changed, 108 insertions(+), 113 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c in

[Qemu-devel] [PATCH] pc: allow raising low memory via max-ram-below-4g option

2016-01-05 Thread Gerd Hoffmann
This patch extends the functionality of the max-ram-below-4g option to also allow increasing lowmem. While being at it also rework the lowmem calculation logic and add a longish comment describing how it works and what the compatibility constrains are. Signed-off-by: Gerd Hoffmann --- hw/i386/p

Re: [Qemu-devel] [PATCH 0/2] checkpatch: Fixing two cases of false positives in checkpatch.pl

2016-01-05 Thread Leonid Bloch
ping On Sun, Dec 20, 2015 at 11:31 AM, Leonid Bloch wrote: > ping > > http://patchwork.ozlabs.org/patch/537763 > http://patchwork.ozlabs.org/patch/537762 > > On Tue, Nov 24, 2015 at 4:43 PM, Leonid Bloch wrote: > >> ping >> >> http://patchwork.ozlabs.org/patch/537763 >> http://patchwork.ozlabs.

[Qemu-devel] [PULL 5/5] seabios: update binaries to release 1.9.0

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- pc-bios/bios-256k.bin | Bin 262144 -> 262144 bytes pc-bios/bios.bin | Bin 131072 -> 131072 bytes pc-bios/vgabios-cirrus.bin | Bin 38400 -> 38400 bytes pc-bios/vgabios-qxl.bin| Bin 38400 -> 38912 bytes pc-bios/vgabios-stdvga.bin | Bin 38400 -

[Qemu-devel] [PULL 2/5] seabios: use new EXTRAVERSION to tag qemu builds

2016-01-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- roms/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index 09e33b5..01f2701 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -35,7 +35,7 @@ powerpc_cross_prefix := $(call find-cross-prefix,powerpc)

[Qemu-devel] [PULL 4/5] seabios: stop updating aml files

2016-01-05 Thread Gerd Hoffmann
ACPI aml files traditionally have been managed in the seabios repo. In qemu version 2.0 we've switched over to have qemu generate the acpi tables and provide them to the firmware via fw_cfg. The old aml files are still there and used for old machine types. Well, actually the q35 file only, the pii

[Qemu-devel] [PULL 3/5] seabios: update 128k bios config

2016-01-05 Thread Gerd Hoffmann
Turn off OHCI + TPM support to keep the size below 128k. Signed-off-by: Gerd Hoffmann --- roms/config.seabios-128k | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roms/config.seabios-128k b/roms/config.seabios-128k index c719ba6..0a9da77 100644 --- a/roms/config.seabios-128k +++ b/roms/con

[Qemu-devel] [PULL 1/5] seabios: update submodule to release 1.9.0

2016-01-05 Thread Gerd Hoffmann
Highlights / user visible changes in seabios: * boot menu key is ESC now. * virtio 1.0 support. * sdcard support. * fw_cfg dma suport. * usual share of bugfixes ;) In vgabios: * Emulates leal instruction. Works around a bug in old x86emu versions, which makes old xorg vesa drivers work (

[Qemu-devel] [PULL 0/5] seabios: update to release 1.9.0

2016-01-05 Thread Gerd Hoffmann
ommit 38a762fec63fd5c035aae29ba9a77d357e21e4a7: Merge remote-tracking branch 'remotes/berrange/tags/pull-crypto-fixes-2015-12-23-1' into staging (2015-12-23 13:53:32 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-seabios-20160105-1 for you to fetc

Re: [Qemu-devel] [PATCH] i2c-tiny-usb: add new usb to i2c bridge

2016-01-05 Thread Tim Sander
Hi Gerd Thanks for your review. Am Dienstag, 5. Januar 2016, 08:44:30 schrieb Gerd Hoffmann: > > +case 0x4107: > > +/* this seems to be a byte type access */ > > +if (i2c_start_transfer(s->i2cbus, /*address*/index, 0)) { > > +trace_usb_i2c_tiny_i2c_start_transfer_f

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread lihuiba
Max, I'll see what I can do, and give you my plan. Thanks! >On 29.12.2015 10:38, lihuiba wrote: >> Hi, >> >> In our production environment, we need to extend a qcow2 image with >> snapshots in it. This feature, however, is not implemented yet. >> >> So I want to ask, if this feature is und

Re: [Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-05 Thread Cao jin
On 01/05/2016 06:40 PM, Stefano Stabellini wrote: On Tue, 5 Jan 2016, Cao jin wrote: [...] This is true, however I think that relying on it is error prone: in a couple of years from now somebody might change the call sequence without updating the error handling (easy to forget), causing QEMU

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Tue, Jan 05, 2016 at 10:01:04AM +, Dr. David Alan Gilbert wrote: > > > > * Michael S. Tsirkin (m...@redhat.com) wrot

Re: [Qemu-devel] [PATCH v3 00/11] igd passthrough chipset tweaks

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:41:27PM +0100, Gerd Hoffmann wrote: > Hi, > > We have some code in our tree to support pci passthrough of intel > graphics devices (igd) on xen, which requires some chipset tweaks > for (a) the host bridge and (b) the lpc/isa-bridge to meat the > expectations of the gu

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:43:03PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jan 05, 2016 at 10:45:25AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Tue, Jan 05, 2016 at 10:01:04AM +, D

Re: [Qemu-devel] [PATCH] pc: allow raising low memory via max-ram-below-4g option

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:59:51PM +0100, Gerd Hoffmann wrote: > This patch extends the functionality of the max-ram-below-4g option > to also allow increasing lowmem. While being at it also rework the > lowmem calculation logic and add a longish comment describing how it > works and what the comp

[Qemu-devel] [PATCH] trace-events: fix broken format strings

2016-01-05 Thread Andrew Jones
Fixes compiling with --enable-trace-backends Signed-off-by: Andrew Jones --- trace-events | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trace-events b/trace-events index 6f036384a84f8..e42898d5659d5 100644 --- a/trace-events +++ b/trace-events @@ -1799,15 +1799,1

[Qemu-devel] [PATCH] hw/dma/xilinx_axidma: debug printf fixups

2016-01-05 Thread Andrew Jones
(Found by grepping for broken PRI users.) Signed-off-by: Andrew Jones --- hw/dma/xilinx_axidma.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index b1cfa11356a26..2ab0772cd19ae 100644 --- a/hw/dma/xilinx_axidma.c +++

Re: [Qemu-devel] [PATCH] pc: allow raising low memory via max-ram-below-4g option

2016-01-05 Thread Gerd Hoffmann
On Di, 2016-01-05 at 15:17 +0200, Michael S. Tsirkin wrote: > On Tue, Jan 05, 2016 at 12:59:51PM +0100, Gerd Hoffmann wrote: > > This patch extends the functionality of the max-ram-below-4g option > > to also allow increasing lowmem. While being at it also rework the > > lowmem calculation logic a

Re: [Qemu-devel] [PATCH] pc: allow raising low memory via max-ram-below-4g option

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 02:32:05PM +0100, Gerd Hoffmann wrote: > On Di, 2016-01-05 at 15:17 +0200, Michael S. Tsirkin wrote: > > On Tue, Jan 05, 2016 at 12:59:51PM +0100, Gerd Hoffmann wrote: > > > This patch extends the functionality of the max-ram-below-4g option > > > to also allow increasing lo

[Qemu-devel] [PATCH v9 2/4] hw/ptimer: Perform tick and counter wrap around if timer already expired

2016-01-05 Thread Dmitry Osipenko
ptimer_get_count() might be called while QEMU timer already been expired. In that case ptimer would return counter = 0, which might be undesirable in case of polled timer. Do counter wrap around for periodic timer to keep it distributed. In addition, there is no reason to keep expired timer tick d

[Qemu-devel] [PATCH v9 1/4] hw/ptimer: Fix issues caused by the adjusted timer limit value

2016-01-05 Thread Dmitry Osipenko
Multiple issues here related to the timer with a adjusted .limit value: 1) ptimer_get_count() returns incorrect counter value for the disabled timer after loading the counter with a small value, because adjusted limit value is used instead of the original. For instance: 1) ptimer_stop(t)

[Qemu-devel] [PATCH v9 3/4] hw/ptimer: Update .delta on period/freq change

2016-01-05 Thread Dmitry Osipenko
Delta value must be updated on period/freq change, otherwise running timer would be restarted (counter reloaded with old delta). Only m68k/mcf520x and arm/arm_timer devices are currently doing freq change correctly, i.e. stopping the timer. Perform delta update to fix affected devices and eliminate

[Qemu-devel] [PATCH v9 0/4] PTimer fixes and ARM MPTimer conversion

2016-01-05 Thread Dmitry Osipenko
Changelog for ARM MPTimer QEMUTimer to ptimer conversion: V2: Fixed changing periodic timer counter value "on the fly". I added a test to the gist to cover that issue. V3: Fixed starting the timer with load = 0 and counter != 0, added tests to the gist for this issue. Chan

[Qemu-devel] [PATCH v9 4/4] arm_mptimer: Convert to use ptimer

2016-01-05 Thread Dmitry Osipenko
Current ARM MPTimer implementation uses QEMUTimer for the actual timer, this implementation isn't complete and mostly tries to duplicate of what generic ptimer is already doing fine. Conversion to ptimer brings the following benefits and fixes: - Simple timer pausing implementation

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread Eric Blake
On 01/05/2016 05:10 AM, lihuiba wrote: >>> In our production environment, we need to extend a qcow2 image with >>> snapshots in it. >> The thing is that one would need to update all the inactive L1 tables. I >> don't think it should be too difficult, it's just that apparently so far >> nobody eve

Re: [Qemu-devel] [PATCH v8 31/35] qapi: Rework deallocation of partial struct

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Commit cee2dedb noticed that if you have a partial flat union > (such as if an input parse failed due to a missing > discriminator), calling the dealloc visitor could result in > trying to dereference the NULL pointer. But the fix it propose

Re: [Qemu-devel] [PATCH v8 29/35] qapi: Canonicalize missing object to :empty

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Now that we elide unnecessary visits of empty types, we can > start using the special ':empty' type in more places. By using > the empty type as the base class of every explicit struct or > union, and as the default data for any command or

Re: [Qemu-devel] [PATCH v8 28/35] qapi: Eliminate empty visit_type_FOO_fields

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > For empty structs, such as the 'Abort' helper type used as part > of the 'transaction' command, we were emitting a no-op > visit_type_FOO_fields(). Optimize things to instead omit calls > for empty structs. Generated code changes resemble:

Re: [Qemu-devel] [PATCH v8 30/35] qapi-visit: Unify struct and union visit

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > We are finally at the point where gen_visit_struct() and > gen_visit_union() can be unified to a generic gen_visit_object(). > > The generated code for structs and for flat unions is unchanged. > For simple unions, a new visit_type_FOO_field

Re: [Qemu-devel] [PATCH v8 27/35] qapi: Fix command with named empty argument type

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > The generator special-cased > { 'command':'foo', 'data': {} } > to avoid emitting a visitor variable, but failed to see that > { 'struct':'NamedEmptyType, 'data': {} } > { 'command':'foo', 'data':'NamedEmptyType' } > needs the same treatm

Re: [Qemu-devel] [PATCH v8 18/35] qapi: Drop unused error argument for list and implicit struct

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > No backend was setting an error when ending the visit of a list > or implicit struct. Make the callers a bit easier to follow by > making this a part of the contract, and removing the errp > argument - callers can then unconditionally end a

Re: [Qemu-devel] [PATCH v8 23/35] qmp: Tighten output visitor rules

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Add a new qmp_output_visitor_reset(), which must be called before > reusing an exising QmpOutputVisitor on a new root object. Tighten > assertions to require that qmp_output_get_qobject() can only be > called after pairing a visit_end_* for

Re: [Qemu-devel] [PATCH v8 17/35] qapi: Drop unused 'kind' for struct/enum visit

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > visit_start_struct() and visit_type_enum() had a 'kind' argument > that was usually set to either the stringized version of the > corresponding qapi type name, or to NULL (although some clients > didn't even get that right). But nothing eve

Re: [Qemu-devel] [PATCH v8 20/35] qmp: Don't abuse stack to track qmp-output root

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > The previous commit documented an inconsistency in how we are > using the stack of qmp-output-visitor. Normally, pushing a > single top-level object puts the object on the stack twice: > once as the root, and once as the current container b

Re: [Qemu-devel] [PATCH v8 26/35] qapi: Add type.is_empty() helper

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > And use it in qapi-types and qapi-event. Down the road, we may > want to lift our artificial restriction of no variants at the > top level of an event, at which point, inlining our check for > whether members is empty will no longer be suff

Re: [Qemu-devel] [PATCH v8 16/35] qapi: Swap 'name' in visit_* callbacks to match public API

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > As explained in the previous patches, matching argument order of > 'name, &value' to JSON's "name":value makes sense. However, > while the last two patches were easy with Coccinelle, I ended up > doing this one all by hand. Now all the vis

Re: [Qemu-devel] [PATCH v8 13/35] qom: Use typedef for Visitor

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > No need to repeat 'struct Visitor' when we already have it in > typedefs.h. Omitting the redundant 'struct' also makes a later > patch easier to search for all object property callbacks that > are associated with a Visitor. > > Signed-off-b

Re: [Qemu-devel] [PATCH v8 22/35] qapi: Add visit_type_null() visitor

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Right now, qmp-output-visitor happens to produce a QNull result > if nothing is actually visited between the creation of the visitor > and the request for the resulting QObject. A stronger protocol > would require that a QMP output visit MU

Re: [Qemu-devel] [PATCH v8 25/35] qapi: Simplify excess input reporting in input visitors

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > When reporting that an unvisited member remains at the end of an > input visit for a struct, we were using g_hash_table_find() > coupled with a callback function that always returns true, to > locate an arbitrary member of the hash table. B

Re: [Qemu-devel] [PATCH v8 07/35] qapi: Improve generated event use of qapi visitor

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > All other successful clients of visit_start_struct() were paired > with an unconditional visit_end_struct(); but the generated > code for events was relying on qmp_output_visitor_cleanup() to > work on an incomplete visit. Alter the code to

Re: [Qemu-devel] [PATCH v8 03/35] qapi: Drop dead dealloc visitor variable

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Commit 0b9d8542 added StackEntry.is_list_head, but forgot to > delete the now-unused QapiDeallocVisitor.is_list_head. > > Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau -- Marc-André Lureau

Re: [Qemu-devel] [PATCH v8 19/35] qmp: Fix reference-counting of qnull on empty output visit

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Commit 6c2f9a15 ensured that we would not return NULL when the > caller used an output visitor but had nothing to visit. But > in doing so, it added a FIXME about a reference count leak > that could abort qemu in the (unlikely) case of SIZE_

Re: [Qemu-devel] [PATCH v8 21/35] qapi: Document visitor interfaces, add assertions

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > The visitor interface for mapping between QObject/QemuOpts/string > and qapi has formerly been documented only by reading source code, > making it difficult to propose changes to either scripts/qapi*.py > or to clients without knowing whethe

Re: [Qemu-devel] [PATCH v8 01/35] qobject: Document more shortcomings in our number handling

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > We've already documented that our JSON parsing is locale dependent; > but we should also document that our JSON output has the same > problem. Additionally, JSON requires finite values (you have to > upgrade to JSON5 to get support for Inf

Re: [Qemu-devel] [PATCH v8 09/35] qapi: Prefer type_int64 over type_int in visitors

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > The qapi builtin type 'int' is basically shorthand for the type > 'int64'. In fact, since no visitor was providing the optional > type_int64() callback, visit_type_int64() was just always falling > back to type_int(), cementing the equivale

Re: [Qemu-devel] [PATCH v8 08/35] qapi: Track all failures between visit_start/stop

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Inside the generated code between visit_start_struct() and > visit_end_struct(), we were blindly setting the error into > the caller's errp parameter. But a future patch to split > visit_end_struct() will require that we take action based >

Re: [Qemu-devel] [PATCH v8 11/35] qapi: Consolidate visitor small integer callbacks

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Commit 4e27e819 introduced optional visitor callbacks for all > sorts of int types, but no visitor has supplied any of the > callbacks for sizes less than 64 bits. In other words, the > generic implementation based on using type_[u]int64()

Re: [Qemu-devel] [PATCH v8 15/35] qom: Swap 'name' next to visitor in ObjectPropertyAccessor

2016-01-05 Thread Marc-André Lureau
Hi On Wed, Dec 23, 2015 at 5:30 PM, Eric Blake wrote: > On 12/21/2015 10:08 AM, Eric Blake wrote: >> Similar to the previous patch, it's nice to have all functions >> n the tree that involve a visitor and a name for conversion to > > s/^n/in/ I was about to say that, with that Reviewed-by: Marc

Re: [Qemu-devel] [PATCH v8 14/35] qapi: Swap visit_* arguments for consistent 'name' placement

2016-01-05 Thread Marc-André Lureau
Reviewed-by: Marc-André Lureau Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > JSON uses "name":value, but many of our visitor interfaces were > called with visit_type_FOO(v, &value, name, errp). This can be > a bit confusing to have to mentally swap the parameter order to > match JSON o

Re: [Qemu-devel] [PATCH] hw/dma/xilinx_axidma: debug printf fixups

2016-01-05 Thread Eric Blake
On 01/05/2016 06:22 AM, Andrew Jones wrote: > (Found by grepping for broken PRI users.) > > Signed-off-by: Andrew Jones > --- > hw/dma/xilinx_axidma.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c > index b1cfa11

Re: [Qemu-devel] [PATCH v8 02/35] qapi: Avoid use of misnamed DO_UPCAST()

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > The macro DO_UPCAST() is incorrectly named: it converts from a > parent class to a derived class (which is a downcast). Better, > and more consistent with some of the other qapi visitors, is > to use the container_of() macro through a to_FO

Re: [Qemu-devel] [PATCH v8 04/35] hmp: Improve use of qapi visitor

2016-01-05 Thread Marc-André Lureau
Hi On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: > Cache the visitor in a local variable instead of repeatedly > calling the accessor. Pass NULL for the visit_start_struct() > object (which matches the fact that we were already passing 0 > for the size argument, because we aren't using the

  1   2   3   >