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

2016-01-21 Thread Fam Zheng
On Wed, 01/13 10:50, Fam Zheng wrote: > v10: Fix and simplify mirror_cow_align. [Max] Jeff, are you happy to take these patches? Fam

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Wen Congyang
On 01/22/2016 03:42 PM, Jason Wang wrote: > > > On 01/22/2016 02:47 PM, Wen Congyang wrote: >> On 01/22/2016 02:21 PM, Jason Wang wrote: >>> >>> On 01/22/2016 01:56 PM, Wen Congyang wrote: On 01/22/2016 01:41 PM, Jason Wang wrote: >> >> On 01/22/2016 11:28 AM, Wen Congyang wrote: >>>

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Jason Wang
On 01/22/2016 02:47 PM, Wen Congyang wrote: > On 01/22/2016 02:21 PM, Jason Wang wrote: >> >> On 01/22/2016 01:56 PM, Wen Congyang wrote: >>> On 01/22/2016 01:41 PM, Jason Wang wrote: > > On 01/22/2016 11:28 AM, Wen Congyang wrote: >>> On 01/22/2016 11:15 AM, Jason Wang wrote: >>>

[Qemu-devel] [PATCH] virtio-pci: Fix vq enabled flag on reset for virtio 1.0

2016-01-21 Thread Fam Zheng
Virtio 1.0 requires queue_enable status in virtio_pci_common_cfg to be cleared upon device reset (virtio-v1.0.pdf, section 4.1.4.3.1), but we don't do it. This causes trouble on Linux's virtio-blk-pci probe since seabios 1.9.0 update (commit ad30c0b0d), if modern enabled. Kernel spits: ...

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-21 Thread Dave Airlie
On 22 January 2016 at 16:59, Gerd Hoffmann wrote: > Hi, > >> In theory Mesa could help here, but GL isn't thread friendly at all, >> so it probably won't help in the virgl >> case even if it did. Since most GL apps compile a shader and block on >> using it straight away doing it >> in a thread w

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-21 Thread Gerd Hoffmann
Hi, > In theory Mesa could help here, but GL isn't thread friendly at all, > so it probably won't help in the virgl > case even if it did. Since most GL apps compile a shader and block on > using it straight away doing it > in a thread won't help unblock things. > > So I think it would be best

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Wen Congyang
On 01/22/2016 02:21 PM, Jason Wang wrote: > > > On 01/22/2016 01:56 PM, Wen Congyang wrote: >> On 01/22/2016 01:41 PM, Jason Wang wrote: On 01/22/2016 11:28 AM, Wen Congyang wrote: >> On 01/22/2016 11:15 AM, Jason Wang wrote: On 01/20/2016 06:30 PM, Wen Congya

Re: [Qemu-devel] [PATCH] net: set endianness on all backend devices

2016-01-21 Thread Jason Wang
On 01/21/2016 04:42 PM, Laurent Vivier wrote: > ping > > [added Jason in cc:] > > On 13/01/2016 20:26, Laurent Vivier wrote: >> commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991 >>vhost-net: tell tap backend about the vnet endianness >> >> makes vhost net to set the endianness of the device

Re: [Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:47 +0100 Cédric Le Goater wrote: > Each routine using the IPMI_ADD_RSP_DATA, IPMI_CHECK_CMD_LEN or > IPMI_CHECK_RESERVATION macros needs to define a goto label 'out' to > handle hidden errors. Using directly a return statement as the same s/as/has > effect and it remov

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Jason Wang
On 01/22/2016 01:56 PM, Wen Congyang wrote: > On 01/22/2016 01:41 PM, Jason Wang wrote: >> > >> > >> > On 01/22/2016 11:28 AM, Wen Congyang wrote: >>> >> On 01/22/2016 11:15 AM, Jason Wang wrote: >>> >>> On 01/20/2016 06:30 PM, Wen Congyang wrote: > On 01/20/2016 06:19 PM, Ja

Re: [Qemu-devel] [PATCH] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-01-21 Thread Jason Wang
On 01/22/2016 02:11 PM, Michael Tokarev wrote: > 22.01.2016 06:09, Jason Wang wrote: >> On 01/19/2016 09:17 PM, Laszlo Ersek wrote: >>> The start_xmit() and e1000_receive_iov() functions implement DMA transfers >>> iterating over a set of descriptors that the guest's e1000 driver >>> prepares: >

Re: [Qemu-devel] [PATCH] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-01-21 Thread Michael Tokarev
22.01.2016 06:09, Jason Wang wrote: > On 01/19/2016 09:17 PM, Laszlo Ersek wrote: >> The start_xmit() and e1000_receive_iov() functions implement DMA transfers >> iterating over a set of descriptors that the guest's e1000 driver >> prepares: ... > Applied in my -net. This is CVE-2016-1981, btw. /

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Wen Congyang
On 01/22/2016 01:33 PM, Jason Wang wrote: > > > On 01/20/2016 06:34 PM, Wen Congyang wrote: >> On 01/20/2016 06:03 PM, Jason Wang wrote: >>> >>> On 01/20/2016 05:49 PM, Wen Congyang wrote: On 01/20/2016 05:20 PM, Jason Wang wrote: > On 01/20/2016 03:44 PM, Wen Congyang wrote: ..

Re: [Qemu-devel] [PATCH v6 0/6] Xen PCI passthru: Convert to realize()

2016-01-21 Thread Cao jin
On 01/21/2016 11:41 PM, Stefano Stabellini wrote: Hi Cao, I appreciate the reminder, but it looks like Eric hasn't reviewed patch 3/5. Am I wrong? Seems I made a little mistake:-[ Already see your pull request, Thank you:) And thanks for Eric`s review:) -- Yours Sincerely, Cao jin

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Wen Congyang
On 01/22/2016 01:41 PM, Jason Wang wrote: > > > On 01/22/2016 11:28 AM, Wen Congyang wrote: >> On 01/22/2016 11:15 AM, Jason Wang wrote: >>> >>> On 01/20/2016 06:30 PM, Wen Congyang wrote: On 01/20/2016 06:19 PM, Jason Wang wrote: >> >> On 01/20/2016 06:01 PM, Wen Congyang wrote: >>>

Re: [Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Marcel Apfelbaum
On 01/21/2016 07:18 PM, Cédric Le Goater wrote: Each routine using the IPMI_ADD_RSP_DATA, IPMI_CHECK_CMD_LEN or IPMI_CHECK_RESERVATION macros needs to define a goto label 'out' to handle hidden errors. Using directly a return statement as the same effect and it removes the fact that 'out' needs t

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Jason Wang
On 01/22/2016 11:28 AM, Wen Congyang wrote: > On 01/22/2016 11:15 AM, Jason Wang wrote: >> >> On 01/20/2016 06:30 PM, Wen Congyang wrote: >>> On 01/20/2016 06:19 PM, Jason Wang wrote: > > On 01/20/2016 06:01 PM, Wen Congyang wrote: >>> On 01/20/2016 02:54 PM, Jason Wang wrote: >>>

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Jason Wang
On 01/20/2016 06:34 PM, Wen Congyang wrote: > On 01/20/2016 06:03 PM, Jason Wang wrote: >> >> On 01/20/2016 05:49 PM, Wen Congyang wrote: >>> On 01/20/2016 05:20 PM, Jason Wang wrote: On 01/20/2016 03:44 PM, Wen Congyang wrote: >>> ... >>> -chardev socket,id=comparer0,host=ip_primary

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Wen Congyang
On 01/22/2016 11:15 AM, Jason Wang wrote: > > > On 01/20/2016 06:30 PM, Wen Congyang wrote: >> On 01/20/2016 06:19 PM, Jason Wang wrote: On 01/20/2016 06:01 PM, Wen Congyang wrote: >> On 01/20/2016 02:54 PM, Jason Wang wrote: On 01/20/2016 11:29 AM, Zhang Chen

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-21 Thread Jason Wang
On 01/20/2016 06:30 PM, Wen Congyang wrote: > On 01/20/2016 06:19 PM, Jason Wang wrote: >> > >> > >> > On 01/20/2016 06:01 PM, Wen Congyang wrote: >>> >> On 01/20/2016 02:54 PM, Jason Wang wrote: >>> >>> On 01/20/2016 11:29 AM, Zhang Chen wrote: >> > Sure. >> > >>

Re: [Qemu-devel] [PATCH] e1000: eliminate infinite loops on out-of-bounds transfer start

2016-01-21 Thread Jason Wang
On 01/19/2016 09:17 PM, Laszlo Ersek wrote: > The start_xmit() and e1000_receive_iov() functions implement DMA transfers > iterating over a set of descriptors that the guest's e1000 driver > prepares: > > - the TDLEN and RDLEN registers store the total size of the descriptor > area, > > - while

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

2016-01-21 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

Re: [Qemu-devel] [PATCH RFC for-2.6 1/3] HBitmap: Introduce "meta" bitmap to track bit changes

2016-01-21 Thread Fam Zheng
On Thu, 01/21 13:58, Vladimir Sementsov-Ogievskiy wrote: > >>I thing now, that the same may be accomplished for BdrvDirtyBitmap, > >>all we need is return "changed" status from hb_set_between and then > >>from hbitmap_set. > >That is true, but it makes further optimizing to *really* only set the >

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

2016-01-21 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 v7 12/15] block: Use returned *file in bdrv_co_get_block_status

2016-01-21 Thread Fam Zheng
Now that all drivers return the right "file" pointer, we can use it. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 0836991..d704d32 100644 --- a/block/io.c +++ b/block/io.c @@

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

2016-01-21 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 v7 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/vmdk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index e1d3e27..f8f7fcf 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1274,6 +1274,7 @@ static int64_t coroutine_fn vmdk_

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

2016-01-21 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 a070307..f504536 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -589,6 +589,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDr

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

2016-01-21 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 294c438..b403243 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -551,6 +551,7 @@ static int64_t coroutine_fn vdi_co_get_block_status(BlockDriv

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

2016-01-21 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 3ef9b25..8866121 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c

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

2016-01-21 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 8f6f841..404be1e 100644 --- a/block/qed.c +++ b/block/qed.c @@ -693,6 +693,7 @@ typedef struct { uint64_t pos

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

2016-01-21 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 2ea05a6..a0098c1 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2739,6 +2739,9 @@ sd_co_get_block_status(BlockDriv

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

2016-01-21 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 d4ea6b4..8babecd 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1349,6 +1349,7 @@ static int64_t coroutine_fn qcow2_co_get_block_st

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

2016-01-21 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 4202797..251910c 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -510,6 +510,7 @@ static int64_t coroutine_fn qco

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

2016-01-21 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 e2de308..645521d 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -274,6 +274,7 @@ static

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

2016-01-21 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->

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

2016-01-21 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 e182557..9fe76f4 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -625,6 +625,9 @@ out: if (iTask.task

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

2016-01-21 Thread Fam Zheng
v7: Rebase, update patch 1 for two new bdrv_get_block_status_above() callers in qemu-img.c. [Max] Add Max's rev-by in patch 12. Original cover letter - I stumbled upon this when looking at external bitmap formats. Current "qemu-img map" command only displays filename

Re: [Qemu-devel] COLO hybrid mode and other changes

2016-01-21 Thread Hailiang Zhang
Nice work :) On 2016/1/22 3:08, Dr. David Alan Gilbert wrote: Hi, I've got a world with a few COLO changes in that you might like to look at; they're all experimental, but it seems to be working for me. The world is at: https://github.com/orbitfp7/qemu/commits/orbit-wp4-colo-jan16 I

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

2016-01-21 Thread Fam Zheng
On Thu, 01/21 16:57, Max Reitz wrote: > On 08.01.2016 03:08, Fam Zheng wrote: > > 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

Re: [Qemu-devel] [PATCH 1/2] hmp: add hmp command for incremental backup

2016-01-21 Thread 张敏
On 16/1/22 上午12:39, Eric Blake wrote: > On 01/21/2016 04:22 AM, Rudy Zhang wrote: >> Add hmp command for incremental backup in drive-backup. >> It need a bitmap to backup data from drive-image to incremental image, >> so before it need add bitmap for this device to track io. >> Usage: >> drive_back

Re: [Qemu-devel] RFC: running the user interface in a thread ...

2016-01-21 Thread Dave Airlie
On 21 January 2016 at 19:05, Paolo Bonzini wrote: > > > On 21/01/2016 09:44, Dave Airlie wrote: >> I've hacked on this before, but only with SDL and it was pretty dirty, >> and it gave a fairly decent >> speed up. >> >> My thoughts are to use dataplane like design to process the queue in a >> sepa

Re: [Qemu-devel] [PATCH] virt-acpi-build: add always-on property for timer

2016-01-21 Thread Shannon Zhao
On 2016/1/21 20:54, Andrew Jones wrote: > This patch is the ACPI equivalent of "hw/arm/virt: Add always-on > property to the virt board timer". The timer is always on, and > thus setting this informs Linux that it may switch off the periodic > timer. Switching off the periodic timer substantially

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

2016-01-21 Thread Eric Blake
On 01/21/2016 01:08 PM, Markus Armbruster wrote: > All right, this one's a bear. Not because the patch is bad, but because > what it tries to do is bloody difficult. Is there any reasonable split (such as adding some of the assertions in earlier patches) that would make it any easier? Or do we ju

[Qemu-devel] [PATCH v2] .travis.yml: migrate to container builds

2016-01-21 Thread Alex Bennée
This moves the Travis tests from the legacy VM infrastructure (which only seems to run 5-6 jobs at once) to the new container based approach. The principle difference is there is no sudo in the containers so all packages are installed using the apt add-on. This means one of the build combinations

Re: [Qemu-devel] [PATCH 09/10] virtio: read avail_idx from VQ only when necessary

2016-01-21 Thread Vincenzo Maffione
2016-01-19 19:48 GMT+01:00 Paolo Bonzini : > > > On 19/01/2016 17:54, Michael S. Tsirkin wrote: >> On Fri, Jan 15, 2016 at 01:41:57PM +0100, Paolo Bonzini wrote: >>> From: Vincenzo Maffione >>> >>> The virtqueue_pop() implementation needs to check if the avail ring >>> contains some pending buffer

Re: [Qemu-devel] [PATCH v4 10/12] fdc: rework pick_geometry

2016-01-21 Thread Eric Blake
On 01/21/2016 01:14 PM, John Snow wrote: > > > On 01/20/2016 06:45 PM, Eric Blake wrote: >> On 01/19/2016 11:51 PM, John Snow wrote: >>> This one is the crazy one. >>> >>> fd_revalidate currently uses pick_geometry to tell if the diskette >>> geometry has changed upon an eject/insert event, but i

Re: [Qemu-devel] [PATCH 2/2] migration/virtio: Remove simple .get/.put use

2016-01-21 Thread Sascha Silbe
Dear David, "Dr. David Alan Gilbert" writes: > > Interesting, didn't know about --global yet. Thanks for posting the example. That will come in handy for my tests. > Thanks I've reused a chunk of that; I'll post the fix soon. > Thanks for your help on this. Thanks, looking forward

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] hmp: add hmp command for incremental backup

2016-01-21 Thread John Snow
On 01/21/2016 11:39 AM, Eric Blake wrote: > On 01/21/2016 04:22 AM, Rudy Zhang wrote: >> Add hmp command for incremental backup in drive-backup. >> It need a bitmap to backup data from drive-image to incremental image, >> so before it need add bitmap for this device to track io. >> Usage: >>

[Qemu-devel] [PATCH qemu] migration/vmstate: document VMStateFlags

2016-01-21 Thread Sascha Silbe
The VMState API is rather sparsely documented. Start by describing the meaning of all VMStateFlags. Signed-off-by: Sascha Silbe --- Since I had to dive into the code for debugging the migration breakage anyway, I figured I could just as well write down the result in the form of comments so the ne

Re: [Qemu-devel] [PATCH v4 10/12] fdc: rework pick_geometry

2016-01-21 Thread John Snow
On 01/20/2016 06:45 PM, Eric Blake wrote: > On 01/19/2016 11:51 PM, John Snow wrote: >> This one is the crazy one. >> >> fd_revalidate currently uses pick_geometry to tell if the diskette >> geometry has changed upon an eject/insert event, but it won't allow us >> to insert a 1.44MB diskette into

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

2016-01-21 Thread Markus Armbruster
All right, this one's a bear. Not because the patch is bad, but because what it tries to do is bloody difficult. Eric Blake writes: > The visitor interface for mapping between QObject/QemuOpts/string > and qapi has formerly been documented only by reading source code, Polite way to say "is sca

[Qemu-devel] COLO hybrid mode and other changes

2016-01-21 Thread Dr. David Alan Gilbert
Hi, I've got a world with a few COLO changes in that you might like to look at; they're all experimental, but it seems to be working for me. The world is at: https://github.com/orbitfp7/qemu/commits/orbit-wp4-colo-jan16 It's based off: The December/2.4 colo framework world with period

[Qemu-devel] [PATCH v11 7/7] arm_mptimer: Convert to use ptimer

2016-01-21 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

[Qemu-devel] [PATCH v11 5/7] hw/ptimer: Introduce ptimer_get_limit

2016-01-21 Thread Dmitry Osipenko
Currently ptimer users are used to store copy of the limit value, because ptimer doesn't provide facility to retrieve the limit. Let's provide it. Signed-off-by: Dmitry Osipenko Reviewed-by: Peter Crosthwaite --- hw/core/ptimer.c| 5 + include/hw/ptimer.h | 1 + 2 files changed, 6 inser

[Qemu-devel] [PATCH v11 0/7] PTimer fixes/features and ARM MPTimer conversion

2016-01-21 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 v11 1/7] hw/ptimer: Fix issues caused by the adjusted timer limit value

2016-01-21 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 v11 6/7] hw/ptimer: Legalize running with delta = load = 0 and abort on period = 0

2016-01-21 Thread Dmitry Osipenko
Currently ptimer would print error message and clear enable flag for an arming timer that has delta = load = 0. That actually could be a valid case for some hardware, like instant IRQ trigger for oneshot timer or continuous in periodic mode. Support those cases by removing the error message and sto

[Qemu-devel] [PATCH v11 2/7] hw/ptimer: Perform counter wrap around if timer already expired

2016-01-21 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 order to achieve more accurate emulation behaviour of cert

[Qemu-devel] [PATCH v11 4/7] hw/ptimer: Support "on the fly" timer mode switch

2016-01-21 Thread Dmitry Osipenko
Allow switching between periodic <-> oneshot modes while timer is running. Signed-off-by: Dmitry Osipenko Reviewed-by: Peter Crosthwaite --- hw/core/ptimer.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 904a77b..a85d

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

2016-01-21 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

Re: [Qemu-devel] virtio ring layout changes for optimal single-stream performance

2016-01-21 Thread Michael S. Tsirkin
On Thu, Jan 21, 2016 at 04:38:36PM +0100, Cornelia Huck wrote: > On Thu, 21 Jan 2016 15:39:26 +0200 > "Michael S. Tsirkin" wrote: > > > Hi all! > > I have been experimenting with alternative virtio ring layouts, > > in order to speed up single stream performance. > > > > I have just posted a ben

Re: [Qemu-devel] [PATCH] gtk: use qemu_chr_alloc() to allocate CharDriverState

2016-01-21 Thread Hervé Poussineau
Le 21/01/2016 12:56, Daniel P. Berrange a écrit : The gd_vc_handler() callback is using g_malloc0() to allocate the CharDriverState struct. As a result the logfd field is getting initialized to 0, instead of -1 when no logfile is requested. The result is that when running $ qemu-system-i386 -

Re: [Qemu-devel] [PATCH] gtk: use qemu_chr_alloc() to allocate CharDriverState

2016-01-21 Thread Peter Maydell
On 21 January 2016 at 11:56, Daniel P. Berrange wrote: > The gd_vc_handler() callback is using g_malloc0() to > allocate the CharDriverState struct. As a result the > logfd field is getting initialized to 0, instead of > -1 when no logfile is requested. > > The result is that when running > > $ q

Re: [Qemu-devel] [PULL 0/11] xen-20160121

2016-01-21 Thread Peter Maydell
ilable in the git repository at: > > > git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20160121 > > for you to fetch changes up to 5a11d0f7549e24a10e178a9dc8ff5e698031d9a6: > > Xen PCI passthru

Re: [Qemu-devel] [PATCH v4 12/12] fdc: change auto fallback drive for ISA FDC to 288

2016-01-21 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > The 2.88 drive is more suitable as a default because > it can still read 1.44 images correctly, but the reverse > is not true. > > Since there exist virtio-win drivers that are shipped on > 2.88 floppy images, this patch will allow VMs booted without > a

Re: [Qemu-devel] [PATCH v4 11/12] qtest/fdc: Support for 2.88MB drives

2016-01-21 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > The old test assumes a 1.44MB drive. > Assert that the QEMU default drive is now either 1.44 or 2.88. > > Signed-off-by: John Snow > --- > tests/fdc-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake

[Qemu-devel] [PULL 11/11] Xen PCI passthru: convert to realize()

2016-01-21 Thread Stefano Stabellini
From: Cao jin Signed-off-by: Cao jin Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini --- hw/xen/xen_pt.c | 53 - 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 9eef3df..d3322

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

2016-01-21 Thread Daniel P. Berrange
On Thu, Jan 21, 2016 at 07:21:49AM +0100, Markus Armbruster wrote: > Eric Blake writes: > > > On 01/20/2016 02:02 AM, Markus Armbruster wrote: > > > >>> @@ -519,6 +519,8 @@ static QObject *parse_literal(JSONParserContext *ctxt) > >>> } > >>> case JSON_FLOAT: > >>> /* FIXME depe

Re: [Qemu-devel] [PATCH v9 10/37] qapi: Make all visitors supply uint64 callbacks

2016-01-21 Thread Eric Blake
On 01/21/2016 01:56 AM, Markus Armbruster wrote: >>> Before: nobody implements type_uint64(), and the core falls back to >>> type_int64(), casting negative values to large positive ones. With an >>> implementation of type_int64() that parses large positive values as >>> negative, the two casts ca

[Qemu-devel] [PATCH v2 9/9] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-21 Thread Cédric Le Goater
SET_SENSOR_READING is a complex IPMI command (IPMI spec : "35.17 Set Sensor Reading And Event Status Command"). Here is a very minimum framework fitting the Open PowerNV platform needs. This command is used on this platform to set the "System Firmware Progress" sensor and the "Boot Count" sensor.

[Qemu-devel] [PATCH v2 8/9] ipmi: add ACPI power and GUID commands

2016-01-21 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- Changes since v1: - added ACPI to command names. hw/ipmi/ipmi_bmc_sim.c | 49 + 1 file changed, 49 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index e882af3f1b40..53c75cb21c1a 1

[Qemu-devel] [PATCH v2 4/9] ipmi: introduce a struct ipmi_sdr_compact

2016-01-21 Thread Cédric Le Goater
Currently, sdr attributes are identified using byte offsets and this can be a bit confusing. This patch adds a struct ipmi_sdr_compact conforming to the IPMI specs and replaces byte offsets with names. It also introduces and uses a struct ipmi_sdr_header in sections of the code where no assumption

[Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Cédric Le Goater
Each routine using the IPMI_ADD_RSP_DATA, IPMI_CHECK_CMD_LEN or IPMI_CHECK_RESERVATION macros needs to define a goto label 'out' to handle hidden errors. Using directly a return statement as the same effect and it removes the fact that 'out' needs to be defined. The code exits in ipmi_sim_handle_c

[Qemu-devel] [PATCH v2 5/9] ipmi: fix SDR length value

2016-01-21 Thread Cédric Le Goater
The IPMI BMC simulator populates the SDR table with a set of initial SDRs. The length of each SDR is taken from the record itself (byte 4) which does not include the size of the header. But, the full length (header + data) is required by the sdr_add_entry() routine. Signed-off-by: Cédric Le Goater

Re: [Qemu-devel] [PULL 00/12] X86 queue, 2016-01-21

2016-01-21 Thread Peter Maydell
On 21 January 2016 at 15:09, Eduardo Habkost wrote: > The following changes since commit 3c9331c47f4118d5019b0af8eac704824d8d: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2016-01-21 13:09:47 +) > > are available in the git repository at: > > git:

[Qemu-devel] [PATCH v2 6/9] ipmi: add get and set SENSOR_TYPE commands

2016-01-21 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 803c7e5130c0..7c0f2a1d9799 100644 --- a/hw/ip

[Qemu-devel] [PATCH v2 1/9] ppc: add IPMI support

2016-01-21 Thread Cédric Le Goater
Open PowerNV systems use a BT device to communicate with the BMC. Provide support for it. Signed-off-by: Cédric Le Goater --- default-configs/ppc64-softmmu.mak | 4 1 file changed, 4 insertions(+) diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak index bb7

[Qemu-devel] [PATCH v2 7/9] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-21 Thread Cédric Le Goater
This is a simulator. Just return an unknown cause (0). Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index 7c0f2a1d9799..e882

[Qemu-devel] [PATCH v2 0/9] ipmi: a couple of enhancements to the BMC simulator

2016-01-21 Thread Cédric Le Goater
Hi, Here are a few patches adding a couple of IPMI commands to the BMC simulator. Changes since v1: - Added IPMI to ppc. We will need it for the future powernv platform. - Added some initial cleanups - Kept FRU, the API extensions to expose SDR and generate events for later, may be a

[Qemu-devel] [PATCH v2 3/9] ipmi: replace *_MAXCMD defines

2016-01-21 Thread Cédric Le Goater
ARRAY_SIZE() is simple to use and removes the need to pre-define the size of the command arrays. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c i

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-21 Thread Corey Minyard
On 01/17/2016 08:16 AM, Michael S. Tsirkin wrote: On Sun, Jan 17, 2016 at 02:04:32PM +0200, Marcel Apfelbaum wrote: On 01/05/2016 07:29 PM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 55 ++ 1 file chan

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

2016-01-21 Thread Eric Blake
On 01/20/2016 11:21 PM, Markus Armbruster wrote: >> One alternative is to always output a guaranteed unambiguous decimal >> string (although not necessarily the shortest), by using %.17f, using >> DBL_DECIMAL_DIG. (Note that DBL_DIG of 15 is NOT sufficient - >> it is the lower limit that says tha

[Qemu-devel] [PULL 09/11] Add Error **errp for xen_pt_setup_vga()

2016-01-21 Thread Stefano Stabellini
From: Cao jin To catch the error message. Also modify the caller Signed-off-by: Cao jin Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini --- hw/xen/xen_pt.c |7 +-- hw/xen/xen_pt.h |3 ++- hw/xen/xen_pt_graphics.c | 11 ++- 3 files changed, 13 i

[Qemu-devel] [PULL 02/11] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-21 Thread Stefano Stabellini
If the frontend sets out_cons to a value higher than out_prod, it will cause xenfb_handle_events to loop about 2^32 times. Avoid that by using better checks at the beginning of the function. Signed-off-by: Stefano Stabellini Reported-by: Ling Liu --- hw/display/xenfb.c |5 +++-- 1 file chan

[Qemu-devel] [PULL 03/11] xen-hvm: Clean up xen_hvm_init() error handling

2016-01-21 Thread Stefano Stabellini
From: Markus Armbruster xen_hvm_init() returns -1 without cleaning up on some errors (harmless long as the caller exit()s on error), dies with hw_error() on others. hw_error() isn't approprate here. Clean up to exit() on all errors. Signed-off-by: Markus Armbruster Reviewed-by: Stefano Stabell

[Qemu-devel] [PULL 08/11] Add Error **errp for xen_host_pci_device_get()

2016-01-21 Thread Stefano Stabellini
From: Cao jin To catch the error message. Also modify the caller Signed-off-by: Cao jin Reviewed-by: Stefano Stabellini Reviewed-by: Eric Blake --- hw/xen/xen-host-pci-device.c | 102 +++--- hw/xen/xen-host-pci-device.h |5 ++- hw/xen/xen_pt.c

[Qemu-devel] [PULL 0/11] xen-20160121

2016-01-21 Thread Stefano Stabellini
m.git tags/xen-20160121 for you to fetch changes up to 5a11d0f7549e24a10e178a9dc8ff5e698031d9a6: Xen PCI passthru: convert to realize() (2016-01-21 16:45:54 +) Xen

[Qemu-devel] [PULL 05/11] xen-pvdevice: convert to realize()

2016-01-21 Thread Stefano Stabellini
From: Cao jin Signed-off-by: Cao jin Reviewed-by: Stefano Stabellini --- hw/i386/xen/xen_pvdevice.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c index c218947..9abcf25 100644 --- a/hw/i386/xen/xen_pvd

[Qemu-devel] [PULL 01/11] MAINTAINERS: update Xen files

2016-01-21 Thread Stefano Stabellini
Add the PV block backend, the Xen mapcache, and hw/i386/xen to the list of Xen related files maintained by me. Signed-off-by: Stefano Stabellini Reviewed-by: Markus Armbruster --- MAINTAINERS |3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d8b0f36..e3d4

[Qemu-devel] [PULL 10/11] Add Error **errp for xen_pt_config_init()

2016-01-21 Thread Stefano Stabellini
From: Cao jin To catch the error message. Also modify the caller Signed-off-by: Cao jin Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini --- hw/xen/xen_pt.c |8 --- hw/xen/xen_pt.h |2 +- hw/xen/xen_pt_config_init.c | 51 +++---

[Qemu-devel] [PULL 06/11] Change xen_host_pci_sysfs_path() to return void

2016-01-21 Thread Stefano Stabellini
From: Cao jin And assert the snprintf() error, because user can do nothing in case of snprintf() fail. Signed-off-by: Cao jin Reviewed-by: Stefano Stabellini Reviewed-by: Eric Blake --- hw/xen/xen-host-pci-device.c | 35 +++ 1 file changed, 11 insertions(+),

[Qemu-devel] [PULL 04/11] xen-hvm: Clean up xen_ram_alloc() error handling

2016-01-21 Thread Stefano Stabellini
From: Markus Armbruster xen_ram_alloc() dies with hw_error() on error, even though its caller ram_block_add() handles errors just fine. Add an Error **errp parameter and use it. Leave case RUN_STATE_INMIGRATE alone, because that looks like some kind of warning. Signed-off-by: Markus Armbruster

[Qemu-devel] [PULL 07/11] Xen: use qemu_strtoul instead of strtol

2016-01-21 Thread Stefano Stabellini
From: Cao jin No need to roll our own (with slightly incorrect handling of errno), when we can use the common version. Change signed parsing to unsigned, because what it read are values in PCI config space, which are non-negative. Signed-off-by: Cao jin Reviewed-by: Stefano Stabellini Reviewe

Re: [Qemu-devel] [PATCH v9 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-01-21 Thread Eric Blake
On 01/21/2016 06:05 AM, Alberto Garcia wrote: > On Thu 21 Jan 2016 02:54:10 AM CET, Wen Congyang wrote: > @@ -875,9 +878,9 @@ static int quorum_open(BlockDriverState *bs, QDict *options, int flags, ret = -EINVAL; goto exit; } -if (s->num_c

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-21 Thread Marcel Apfelbaum
On 01/21/2016 06:41 PM, Cédric Le Goater wrote: On 01/21/2016 05:37 PM, Corey Minyard wrote: On 01/17/2016 08:16 AM, Michael S. Tsirkin wrote: On Sun, Jan 17, 2016 at 02:04:32PM +0200, Marcel Apfelbaum wrote: On 01/05/2016 07:29 PM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater ---

Re: [Qemu-devel] [PATCH] gtk: use qemu_chr_alloc() to allocate CharDriverState

2016-01-21 Thread Eric Blake
On 01/21/2016 04:56 AM, Daniel P. Berrange wrote: > The gd_vc_handler() callback is using g_malloc0() to > allocate the CharDriverState struct. As a result the > logfd field is getting initialized to 0, instead of > -1 when no logfile is requested. > > The result is that when running > > $ qemu-

Re: [Qemu-devel] [PATCH v6 0/6] Xen PCI passthru: Convert to realize()

2016-01-21 Thread Stefano Stabellini
On Thu, 21 Jan 2016, Eric Blake wrote: > On 01/21/2016 08:41 AM, Stefano Stabellini wrote: > > Hi Cao, > > > > I appreciate the reminder, but it looks like Eric hasn't reviewed patch > > 3/5. Am I wrong? > > I've done it now. Thanks for your patience, and for letting me jump in > with a late revi

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-21 Thread Cédric Le Goater
On 01/21/2016 05:37 PM, Corey Minyard wrote: > On 01/17/2016 08:16 AM, Michael S. Tsirkin wrote: >> On Sun, Jan 17, 2016 at 02:04:32PM +0200, Marcel Apfelbaum wrote: >>> On 01/05/2016 07:29 PM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 55

[Qemu-devel] [PATCH v4 14/14] nbd: enable use of TLS with nbd-server-start command

2016-01-21 Thread Daniel P. Berrange
This modifies the nbd-server-start QMP command so that it is possible to request use of TLS. This is done by adding a new optional parameter "tls-creds" which provides the ID of a previously created QCryptoTLSCreds object instance. TLS is only supported when using an IPv4/IPv6 socket listener. Si

  1   2   3   >