Re: [Qemu-devel] [PATCHv2] qemu-img: add special exit code if bdrv_check is not supported

2013-10-24 Thread Eric Blake
On 10/24/2013 07:53 AM, Peter Lieven wrote: > currently it is not possible to distinguish by exitcode if there > has been an error or if bdrv_check is not supported by the image > format. Change the exitcode from 1 to 63 for the latter case. > > Signed-off-by: Peter Lieven > --- > v1->v2: As Eric

[Qemu-devel] [PATCH v5 6/8] sheepdog: make add_aio_request and send_aioreq void functions

2013-10-24 Thread MORITA Kazutaka
These functions no longer return errors. We can make them void functions and simplify the codes. Reviewed-by: Liu Yuan Signed-off-by: MORITA Kazutaka --- block/sheepdog.c | 66 ++ 1 file changed, 17 insertions(+), 49 deletions(-) diff --gi

[Qemu-devel] [PATCH v5 4/8] coroutine: add co_aio_sleep_ns() to allow sleep in block drivers

2013-10-24 Thread MORITA Kazutaka
This helper function behaves similarly to co_sleep_ns(), but the sleeping coroutine will be resumed when using qemu_aio_wait(). Signed-off-by: MORITA Kazutaka --- include/block/coroutine.h |9 + qemu-coroutine-sleep.c| 14 ++ 2 files changed, 23 insertions(+) diff

[Qemu-devel] [PATCH v5 5/8] sheepdog: try to reconnect to sheepdog after network error

2013-10-24 Thread MORITA Kazutaka
This introduces a failed request queue and links all the inflight requests to the list after network error happens. After QEMU reconnects to the sheepdog server successfully, the sheepdog block driver will retry all the requests in the failed queue. Signed-off-by: MORITA Kazutaka --- block/shee

[Qemu-devel] [PATCH v5 1/8] sheepdog: check return values of qemu_co_recv/send correctly

2013-10-24 Thread MORITA Kazutaka
If qemu_co_recv/send doesn't return the specified length, it means that an error happened. Reviewed-by: Liu Yuan Signed-off-by: MORITA Kazutaka --- block/sheepdog.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 5

[Qemu-devel] [PATCH v5 3/8] sheepdog: reload inode outside of resend_aioreq

2013-10-24 Thread MORITA Kazutaka
This prepares for using resend_aioreq() after reconnecting to the sheepdog server. Reviewed-by: Liu Yuan Signed-off-by: MORITA Kazutaka --- block/sheepdog.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdo

[Qemu-devel] [PATCH v5 0/8] sheepdog: reconnect server after connection failure

2013-10-24 Thread MORITA Kazutaka
Currently, if a sheepdog server exits, all the connecting VMs need to be restarted. This series implements a feature to reconnect the server, and enables us to do online sheepdog upgrade and avoid restarting VMs when sheepdog servers crash unexpectedly. v5: - Use AioContext timer for co_aio_slee

[Qemu-devel] [PATCH v5 7/8] sheepdog: cancel aio requests if possible

2013-10-24 Thread MORITA Kazutaka
This patch tries to cancel aio requests in pending queue and failed queue. When the sheepdog driver cannot cancel the requests, it waits for them to be completed. Reviewed-by: Liu Yuan Signed-off-by: MORITA Kazutaka --- block/sheepdog.c | 70 +-

[Qemu-devel] [PATCH v5 8/8] sheepdog: check simultaneous create in resend_aioreq

2013-10-24 Thread MORITA Kazutaka
After reconnection happens, all the inflight requests are moved to the failed request list. As a result, sd_co_rw_vector() can send another create request before resend_aioreq() resends a create request from the failed list. This patch adds a helper function check_simultaneous_create() and checks

[Qemu-devel] [PATCH v5 2/8] sheepdog: handle vdi objects in resend_aio_req

2013-10-24 Thread MORITA Kazutaka
The current resend_aio_req() doesn't work when the request is against vdi objects. This fixes the problem. Reviewed-by: Liu Yuan Signed-off-by: MORITA Kazutaka --- block/sheepdog.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/block/sheepdog.c b/b

[Qemu-devel] [PATCHv2] block/vpc: check that the image has not been truncated

2013-10-24 Thread Peter Lieven
this adds a check that a dynamic VHD file has not been accidently truncated (e.g. during transfer or upload). Signed-off-by: Peter Lieven --- v1->v2: used the errp argument as Eric suggested block/vpc.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/block/vpc.c b/block/vpc.c inde

[Qemu-devel] [RESEND][PATCH] migration: drop MADVISE_DONT_NEED for incoming zero pages

2013-10-24 Thread Peter Lieven
The madvise for zeroed out pages was introduced when every transferred zero page was memset to zero and thus allocated. Since commit 211ea740 we check for zeroness of a target page before we memset it to zero. Additionally we memmap target memory so it is essentially zero initialized (except for e.

Re: [Qemu-devel] [PATCH 1/2] vga: allow non-global vmstate

2013-10-24 Thread Hervé Poussineau
Gerd Hoffmann a écrit : Need a way to opt-out from vga.vram being global vmstate, for secondary vga cards. Add a bool parameter to vga_common_init to support this. Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 4 ++-- hw/display/qxl.c| 2 +- hw/display/vga-isa-mm.c | 2 +-

[Qemu-devel] [PATCHv6 00/17] block: logical block provisioning enhancements

2013-10-24 Thread Peter Lieven
this patch adds the ability for targets to stay sparse during block migration (if the zero_blocks capability is set) and qemu-img convert even if the target does not have has_zero_init = 1. the series was especially developed for iSCSI, but it should also work with other drivers with little or no

[Qemu-devel] [PATCHv6 04/17] block: add logical block provisioning info to BlockDriverInfo

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- include/block/block.h | 16 1 file changed, 16 insertions(+) diff --git a/include/block/block.h b/include/block/block.h index 1f30a56..9c76967 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -18,6 +18,2

[Qemu-devel] [PATCHv6 01/17] block: make BdrvRequestFlags public

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block.c |5 - include/block/block.h |5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index fd05a80..eb11a07 100644 --- a/block.c +++ b/block.c @@ -51,11 +51,6 @@ #define

[Qemu-devel] [PATCHv6 03/17] block: introduce BDRV_REQ_MAY_UNMAP request flag

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block-migration.c |3 ++- block.c |4 block/backup.c|2 +- include/block/block.h |7 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/block-migration.c b/block-migration.

[Qemu-devel] [PATCHv6 08/17] block: honour BlockLimits in bdrv_co_do_write_zeroes

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block.c | 65 +++ 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/block.c b/block.c index 0601b02..0c0b0ac 100644 --- a/block.c +++ b/block.c @@ -2703,32 +2703,65

[Qemu-devel] [PATCHv6 02/17] block: add flags to bdrv_*_write_zeroes

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block-migration.c |2 +- block.c | 20 +++- block/backup.c|3 ++- block/qcow2-cluster.c |2 +- block/qcow2.c |2 +- block/qed.c |3 ++-

[Qemu-devel] [PATCHv6 06/17] block/iscsi: add .bdrv_get_info

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c |9 + 1 file changed, 9 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index a2a961e..1dbbcad 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1506,6 +1506,14 @@ out: return ret; } +static int iscsi_get_info(BlockDrive

[Qemu-devel] [PATCHv6 11/17] iscsi: set limits in BlockDriverState

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block/iscsi.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 47b9cc9..c0465aa 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1367,6 +1367,20 @@ static int iscsi_open(BlockDriver

[Qemu-devel] [PATCHv6 05/17] block: add wrappers for logical block provisioning information

2013-10-24 Thread Peter Lieven
This adds 2 wrappers to read the unallocated_blocks_are_zero and can_write_zeroes_with_unmap info from the BDI. The wrappers are required to check for the existence of a backing_hd and if the devices are opened with the correct flags. Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- bloc

[Qemu-devel] [PATCHv6 09/17] block: honour BlockLimits in bdrv_co_discard

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 0c0b0ac..b28dd42 100644 --- a/block.c +++ b/block.c @@ -4234,6 +4234,11 @@ static void coroutine_fn

[Qemu-devel] [PATCHv6 13/17] block: introduce bdrv_make_zero

2013-10-24 Thread Peter Lieven
this patch adds a call to completely zero out a block device. the operation is sped up by checking the block status and only writing zeroes to the device if they currently do not return zeroes. optionally the zero writing can be sped up by setting the flag BDRV_REQ_MAY_UNMAP to emulate the zero wri

[Qemu-devel] [PATCHv6 07/17] block: add BlockLimits structure to BlockDriverState

2013-10-24 Thread Peter Lieven
this patch adds BlockLimits which introduces discard and write_zeroes limits and alignment information to the BlockDriverState. Signed-off-by: Peter Lieven --- include/block/block_int.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/block/block_int.h b/include/b

[Qemu-devel] [PATCHv6 10/17] iscsi: simplify iscsi_co_discard

2013-10-24 Thread Peter Lieven
now that bdrv_co_discard can handle limits we do not need the request split logic here anymore. Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block/iscsi.c | 67 + 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a

[Qemu-devel] [PATCHv6 12/17] iscsi: add bdrv_co_write_zeroes

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 64 + 1 file changed, 64 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index c0465aa..014475d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -56,6 +56,7 @@ typedef struct Iscsi

[Qemu-devel] [PATCHv6 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-24 Thread Peter Lieven
this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use the newly introduced bdrv_has_discard_zeroes() to return the zero state of an unallocated block. the used callout to bdrv_has_zero_init() is only valid right after bdrv_create. Reviewed-by

[Qemu-devel] [PATCHv6 16/17] qemu-img: conditionally zero out target on convert

2013-10-24 Thread Peter Lieven
If the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_make_zero to avoid fully allocating the target. This currently is designed especially for iscsi. Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- qemu-img.c | 10 +- 1 file change

[Qemu-devel] [PATCHv6 17/17] block/raw: copy BlockLimits on raw_open

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/raw_bsd.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index b0dd23f..49ac18c 100644 --- a/block/raw_bsd.c +++ b/block/raw_bsd.c @@ -150,6 +150,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int fla

[Qemu-devel] [PATCHv6 15/17] qemu-img: add support for fully allocated images

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- qemu-img.c|8 +--- qemu-img.texi |5 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 926f0a0..c6eff15 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -100,8 +100,10 @@ static void help(void)

Re: [Qemu-devel] [PATCH 02/10] sysbus: Set cannot_instantiate_with_device_add_yet

2013-10-24 Thread Markus Armbruster
Peter Maydell writes: > On 17 October 2013 14:54, wrote: >> From: Markus Armbruster >> >> device_add plugs devices into suitable bus. For "real" buses, that >> actually connects the device. For sysbus, the connections need to be >> made separately, and device_add can't do that. The device w

Re: [Qemu-devel] [PATCH 09/10] isa: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-24 Thread Markus Armbruster
Peter Maydell writes: > On 17 October 2013 14:55, wrote: >> From: Markus Armbruster >> >> Drop it when there's no obvious reason why device_add could not work. >> Else keep and document why. >> >> * isa-fdc, port92, i8042, m48t59_isa, mc146818rtc, isa-pit, kvm-pit: >> drop (from the last two

Re: [Qemu-devel] [PATCHv2] block/vpc: check that the image has not been truncated

2013-10-24 Thread Eric Blake
On 10/24/2013 08:16 AM, Peter Lieven wrote: > this adds a check that a dynamic VHD file has not been > accidently truncated (e.g. during transfer or upload). > > Signed-off-by: Peter Lieven > --- > v1->v2: used the errp argument as Eric suggested > > block/vpc.c |7 +++ > 1 file changed

Re: [Qemu-devel] [PATCHv6 11/17] iscsi: set limits in BlockDriverState

2013-10-24 Thread Paolo Bonzini
Il 24/10/2013 08:46, Peter Lieven ha scritto: > Reviewed-by: Eric Blake > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/block/iscsi.c b/block/iscsi.c > index 47b9cc9..c0465aa 100644 > --- a/block/iscsi.c > +++ b/bloc

Re: [Qemu-devel] [RESEND][PATCH] migration: drop MADVISE_DONT_NEED for incoming zero pages

2013-10-24 Thread Juan Quintela
Peter Lieven wrote: > The madvise for zeroed out pages was introduced when every transferred > zero page was memset to zero and thus allocated. Since commit > 211ea740 we check for zeroness of a target page before we memset > it to zero. Additionally we memmap target memory so it is essentially >

Re: [Qemu-devel] [PATCHv6 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-24 Thread Paolo Bonzini
Il 24/10/2013 08:46, Peter Lieven ha scritto: > this patch does 2 things: > a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. > b) use the newly introduced bdrv_has_discard_zeroes() ... whose name became bdrv_unallocated_blocks_are_zero :) No big deal. Paolo > to return the

Re: [Qemu-devel] [PATCHv6 17/17] block/raw: copy BlockLimits on raw_open

2013-10-24 Thread Paolo Bonzini
Il 24/10/2013 08:46, Peter Lieven ha scritto: > Signed-off-by: Peter Lieven > --- > block/raw_bsd.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/raw_bsd.c b/block/raw_bsd.c > index b0dd23f..49ac18c 100644 > --- a/block/raw_bsd.c > +++ b/block/raw_bsd.c > @@ -150,6 +150,7 @@

Re: [Qemu-devel] [PATCHv6 15/17] qemu-img: add support for fully allocated images

2013-10-24 Thread Paolo Bonzini
Il 24/10/2013 08:46, Peter Lieven ha scritto: > +@var{sparse_size} indicates the consecutive number of bytes (defaults to 4k) > +that must contain only zeros for qemu-img to create a sparse image during > +conversion. If the number of bytes is 0 sparse files are disabled and > +images will always b

Re: [Qemu-devel] [PATCHv6 17/17] block/raw: copy BlockLimits on raw_open

2013-10-24 Thread Peter Lieven
On 24.10.2013 11:10, Paolo Bonzini wrote: Il 24/10/2013 08:46, Peter Lieven ha scritto: Signed-off-by: Peter Lieven --- block/raw_bsd.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index b0dd23f..49ac18c 100644 --- a/block/raw_bsd.c +++ b/block/raw

Re: [Qemu-devel] [PATCHv6 16/17] qemu-img: conditionally zero out target on convert

2013-10-24 Thread Paolo Bonzini
Il 24/10/2013 08:46, Peter Lieven ha scritto: > This currently is designed especially for iscsi. I'm not sure this is the way you want to spin this. :) Perhaps "This currently works only for iscsi". It can be extended to raw with BLKDISCARDZEROES for example. Paolo

Re: [Qemu-devel] [RESEND][PATCH 1.7] migration: drop MADVISE_DONT_NEED for incoming zero pages

2013-10-24 Thread Paolo Bonzini
Il 24/10/2013 08:21, Peter Lieven ha scritto: > Additionally we memmap target memory so it is essentially > zero initialized (except for e.g. option roms and bios which are loaded > into target memory although they shouldn't). > > It was reported recently that this madvise causes a performance deg

Re: [Qemu-devel] [PATCH 1/2] vga: allow non-global vmstate

2013-10-24 Thread Gerd Hoffmann
> > diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c > > index b3a45c8..dee180f 100644 > > --- a/hw/display/vga-pci.c > > +++ b/hw/display/vga-pci.c > > @@ -147,7 +147,7 @@ static int pci_std_vga_initfn(PCIDevice *dev) > > VGACommonState *s = &d->vga; > > > > /* vga + console in

Re: [Qemu-devel] [PATCH 05/10] pci-host: Consistently set cannot_instantiate_with_device_add_yet

2013-10-24 Thread Markus Armbruster
Peter Maydell writes: > On 17 October 2013 14:54, wrote: >> From: Markus Armbruster >> >> Many PCI host bridges consist of a sysbus device and a PCI device. >> You need both for the thing to work. Arguably, these bridges should >> be modelled as a single, composite devices instead of pairs of

Re: [Qemu-devel] [PATCHv6 16/17] qemu-img: conditionally zero out target on convert

2013-10-24 Thread Peter Lieven
On 24.10.2013 11:13, Paolo Bonzini wrote: Il 24/10/2013 08:46, Peter Lieven ha scritto: This currently is designed especially for iscsi. I'm not sure this is the way you want to spin this. :) Perhaps "This currently works only for iscsi". It can be extended to raw with BLKDISCARDZEROES for ex

[Qemu-devel] kvm binary is deprecated - solved!

2013-10-24 Thread Alexander Binun
Hi Stefan , Great thanks - your easy trick works! (after I upgraded Ubuntu 13.04 to 13.10). As for sniffing the traffic between VMs - I have yet one idea and I would appreciate your feedback. The activities at VM that involve modifying data can be divided into the following categories: 1. T

Re: [Qemu-devel] [PATCH 01/10] qdev: Replace no_user by cannot_instantiate_with_device_add_yet

2013-10-24 Thread Markus Armbruster
Peter Maydell writes: > On 17 October 2013 14:54, wrote: >> From: Markus Armbruster >> >> In an ideal world, machines can be built by wiring devices together >> with configuration, not code. Unfortunately, that's not the world we >> live in right now. We still have quite a few devices that n

Re: [Qemu-devel] [PATCH] qemu-iotests: Test for loading VM state from qcow2

2013-10-24 Thread Kevin Wolf
Am 23.10.2013 um 20:26 hat Max Reitz geschrieben: > Add a test for saving a VM state from a qcow2 image and loading it back > (with having restarted qemu in between); this should work without any > problems. > > Signed-off-by: Max Reitz > --- > Follow-up to (depends on): > - qcow2: Restore total

Re: [Qemu-devel] kvm binary is deprecated - solved!

2013-10-24 Thread Stefan Hajnoczi
On Thu, Oct 24, 2013 at 10:23 AM, Alexander Binun wrote: > As for sniffing the traffic between VMs - I have yet one idea and I would > appreciate your feedback. [...] > That is, a sniffer in the Linux should be put at a kernel driver that makes > physical memory available to user space. I'm not

Re: [Qemu-devel] [PATCH] qcow2: Restore total_sectors value in save_vmstate

2013-10-24 Thread Kevin Wolf
Am 23.10.2013 um 19:03 hat Max Reitz geschrieben: > On 2013-10-21 22:36, Eric Blake wrote: > >On 10/20/2013 07:28 PM, Max Reitz wrote: > >>Since df2a6f29a5, bdrv_co_do_writev increases the total_sectors value of > >>a growable block devices on writes after the current end. This leads to > >>the vir

Re: [Qemu-devel] [PATCH] qcow2: Unset zero_beyond_eof in save_vmstate

2013-10-24 Thread Kevin Wolf
Am 21.10.2013 um 22:37 hat Eric Blake geschrieben: > On 10/20/2013 08:52 PM, Max Reitz wrote: > > Saving the VM state is done using bdrv_pwrite. This function may perform > > a read-modify-write, which in this case results in data being read from > > beyond the end of the virtual disk. Since we are

[Qemu-devel] observing VM actions

2013-10-24 Thread Alexander Binun
I am trying to observe the memory/disk/network accesses done by a VM. The resulting log can be used to decide whether a VM initiates a malicious action (because , say, it runs a malicious software). On Thu 24 Oct 11:49 2013 Stefan Hajnoczi wrote: > On Thu, Oct 24, 2013 at 10:23 AM, Alexander B

Re: [Qemu-devel] [PATCH] qcow2: Flush image after creation

2013-10-24 Thread Kevin Wolf
Am 23.10.2013 um 21:40 hat Max Reitz geschrieben: > Opening the qcow2 image with BDRV_O_NO_FLUSH prevents any flushes during > the image creation. This means that the image has not yet been flushed > to disk when qemu-img create exits. This flush is delayed until the next > operation on the image i

Re: [Qemu-devel] [PATCHv2] qemu-img: add special exit code if bdrv_check is not supported

2013-10-24 Thread Kevin Wolf
Am 24.10.2013 um 09:00 hat Eric Blake geschrieben: > On 10/24/2013 07:53 AM, Peter Lieven wrote: > > currently it is not possible to distinguish by exitcode if there > > has been an error or if bdrv_check is not supported by the image > > format. Change the exitcode from 1 to 63 for the latter case

Re: [Qemu-devel] [PATCH] qcow2: Flush image after creation

2013-10-24 Thread Eric Blake
On 10/23/2013 08:40 PM, Max Reitz wrote: > Opening the qcow2 image with BDRV_O_NO_FLUSH prevents any flushes during > the image creation. This means that the image has not yet been flushed > to disk when qemu-img create exits. This flush is delayed until the next > operation on the image involving

Re: [Qemu-devel] [PATCHv6 17/17] block/raw: copy BlockLimits on raw_open

2013-10-24 Thread Paolo Bonzini
Il 24/10/2013 10:12, Peter Lieven ha scritto: >> This must be moved before the introduction of BlockLimits in the iscsi >> driver, or patches that use BlockLimits in block.c will not have any >> effect. > You are the first to mention this. I was thinking the whole series will > be seen as once so i

Re: [Qemu-devel] [PATCHv2] block/vpc: check that the image has not been truncated

2013-10-24 Thread Kevin Wolf
Am 24.10.2013 um 09:16 hat Peter Lieven geschrieben: > this adds a check that a dynamic VHD file has not been > accidently truncated (e.g. during transfer or upload). > > Signed-off-by: Peter Lieven Thanks, applied to the block branch. Kevin

[Qemu-devel] [PATCHv7 00/17] block: logical block provisioning enhancements

2013-10-24 Thread Peter Lieven
this patch adds the ability for targets to stay sparse during block migration (if the zero_blocks capability is set) and qemu-img convert even if the target does not have has_zero_init = 1. the series was especially developed for iSCSI, but it should also work with other drivers with little or no

[Qemu-devel] [PATCHv7 06/17] block/iscsi: add .bdrv_get_info

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c |9 + 1 file changed, 9 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index a2a961e..1dbbcad 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1506,6 +1506,14 @@ out: return ret; } +static int iscsi_get_info(BlockDrive

[Qemu-devel] [PATCHv7 05/17] block: add wrappers for logical block provisioning information

2013-10-24 Thread Peter Lieven
This adds 2 wrappers to read the unallocated_blocks_are_zero and can_write_zeroes_with_unmap info from the BDI. The wrappers are required to check for the existence of a backing_hd and if the devices are opened with the correct flags. Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- bloc

[Qemu-devel] [PATCHv7 07/17] block: add BlockLimits structure to BlockDriverState

2013-10-24 Thread Peter Lieven
this patch adds BlockLimits which introduces discard and write_zeroes limits and alignment information to the BlockDriverState. Signed-off-by: Peter Lieven --- include/block/block_int.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/block/block_int.h b/include/b

Re: [Qemu-devel] [PATCHv2] block/vpc: check that the image has not been truncated

2013-10-24 Thread Peter Lieven
On 24.10.2013 12:06, Kevin Wolf wrote: Am 24.10.2013 um 09:16 hat Peter Lieven geschrieben: this adds a check that a dynamic VHD file has not been accidently truncated (e.g. during transfer or upload). Signed-off-by: Peter Lieven Thanks, applied to the block branch. Can you have a look at:

[Qemu-devel] [PATCHv7 14/17] block: introduce bdrv_make_zero

2013-10-24 Thread Peter Lieven
this patch adds a call to completely zero out a block device. the operation is sped up by checking the block status and only writing zeroes to the device if they currently do not return zeroes. optionally the zero writing can be sped up by setting the flag BDRV_REQ_MAY_UNMAP to emulate the zero wri

[Qemu-devel] [PATCHv7 11/17] iscsi: set limits in BlockDriverState

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block/iscsi.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 1dbbcad..16d8052 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1384,6 +1384,20 @@ static int iscsi_open(BlockDriver

[Qemu-devel] [PATCHv7 13/17] iscsi: add bdrv_co_write_zeroes

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 64 + 1 file changed, 64 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index c0465aa..014475d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -56,6 +56,7 @@ typedef struct Iscsi

[Qemu-devel] [PATCHv7 09/17] block: honour BlockLimits in bdrv_co_do_write_zeroes

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block.c | 65 +++ 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/block.c b/block.c index 0601b02..0c0b0ac 100644 --- a/block.c +++ b/block.c @@ -2703,32 +2703,65

[Qemu-devel] [PATCHv7 12/17] iscsi: simplify iscsi_co_discard

2013-10-24 Thread Peter Lieven
now that bdrv_co_discard can handle limits we do not need the request split logic here anymore. Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block/iscsi.c | 67 + 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a

[Qemu-devel] [PATCHv7 16/17] qemu-img: add support for fully allocated images

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- qemu-img.c| 10 +++--- qemu-img.texi |6 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 926f0a0..7f08364 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -100,8 +100,12 @@ static void help(void)

[Qemu-devel] [PATCHv7 10/17] block: honour BlockLimits in bdrv_co_discard

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 0c0b0ac..b28dd42 100644 --- a/block.c +++ b/block.c @@ -4234,6 +4234,11 @@ static void coroutine_fn

[Qemu-devel] [PATCHv7 15/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-24 Thread Peter Lieven
this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use the newly introduced bdrv_unallocated_blocks_are_zero() to return the zero state of an unallocated block. the used callout to bdrv_has_zero_init() is only valid right after bdrv_create. Re

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-24 Thread Peter Lieven
On 23.10.2013 08:23, Paolo Bonzini wrote: Il 21/10/2013 14:26, Stefan Hajnoczi ha scritto: +iSCSI +M: Ronnie Sahlberg +M: Paolo Bonzini +S: Supported +F: block/iscsi.c As I have worked a lot on the iSCSI driver recently I would like to receive patches as well if possible. Peter

[Qemu-devel] [PATCHv7 17/17] qemu-img: conditionally zero out target on convert

2013-10-24 Thread Peter Lieven
If the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_make_zero to avoid fully allocating the target. This currently works only for iscsi. It can be extended to raw with BLKDISCARDZEROES for example. Reviewed-by: Eric Blake Signed-off-by: Peter Lieven

Re: [Qemu-devel] [PATCH v2] block: support dropping active in bdrv_drop_intermediate

2013-10-24 Thread Jeff Cody
On Tue, Oct 15, 2013 at 03:25:00PM +0800, Fam Zheng wrote: > There is only one failure point: bdrv_change_backing_file in this > function, so we can drop the qlist and try to change the backing file > before deleting anything. > > This way bdrv_drop_intermediate is simplified while keeping the > o

[Qemu-devel] [PATCHv7 01/17] block: make BdrvRequestFlags public

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block.c |5 - include/block/block.h |5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index fd05a80..eb11a07 100644 --- a/block.c +++ b/block.c @@ -51,11 +51,6 @@ #define

Re: [Qemu-devel] [PATCH v2] configure: create fsdev/ directory

2013-10-24 Thread Paolo Bonzini
Il 21/10/2013 09:35, Michael Tokarev ha scritto: > In some cases when building with parallelism (make -jN), > build fails because the directory where output files are > supposed to be does not exist. In particular, when make > decides to build virtfs-proxy-helper.1 before other files > in fsdev/,

[Qemu-devel] [PATCHv7 08/17] block/raw: copy BlockLimits on raw_open

2013-10-24 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/raw_bsd.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index b0dd23f..49ac18c 100644 --- a/block/raw_bsd.c +++ b/block/raw_bsd.c @@ -150,6 +150,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int fla

[Qemu-devel] [PATCHv7 04/17] block: add logical block provisioning info to BlockDriverInfo

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- include/block/block.h | 16 1 file changed, 16 insertions(+) diff --git a/include/block/block.h b/include/block/block.h index 1f30a56..9c76967 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -18,6 +18,2

[Qemu-devel] [PATCHv7 03/17] block: introduce BDRV_REQ_MAY_UNMAP request flag

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block-migration.c |3 ++- block.c |4 block/backup.c|2 +- include/block/block.h |7 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/block-migration.c b/block-migration.

Re: [Qemu-devel] qemu 1.6.1

2013-10-24 Thread Paolo Bonzini
Il 23/10/2013 21:26, Stefan Weil ha scritto: > Am 23.10.2013 11:00, schrieb Paolo Bonzini: >> Il 23/10/2013 08:39, Michael W. Bombardieri ha scritto: >>> Hi, >>> >>> My newly built qemu/win32 binary (v1.6.1) crashes in qemu-system-i386 and >>> qemu-system-x86_64 when >>> booting from an install CD

[Qemu-devel] [PATCHv7 02/17] block: add flags to bdrv_*_write_zeroes

2013-10-24 Thread Peter Lieven
Reviewed-by: Eric Blake Signed-off-by: Peter Lieven --- block-migration.c |2 +- block.c | 20 +++- block/backup.c|3 ++- block/qcow2-cluster.c |2 +- block/qcow2.c |2 +- block/qed.c |3 ++-

Re: [Qemu-devel] [PATCH v3 0/4] Curling: KVM Fault Tolerance

2013-10-24 Thread Stefan Hajnoczi
On Wed, Oct 23, 2013 at 1:08 AM, Jules wrote: > >> On Tue, Oct 15, 2013 at 03:26:19PM +0800, Jules Wang wrote: >> > v2 -> v3: >> > * add documentation of new option in qapi-schema. >> > >> > * long option name: ft -> fault-tolerant >> > >> > v1 -> v2: >> > * cmdline: migrate curling:tcp:: >> >

Re: [Qemu-devel] [PATCH resend] sdl: Reverse support for video mode setting

2013-10-24 Thread Lei Li
This patch has been confirmed by the reporter himself as link below, https://bugs.launchpad.net/qemu/+bug/1216368 It has been on the mailing list for a while, could it be merged? PING... On 09/04/2013 05:07 PM, Lei Li wrote: Currently, If the setting of video mode failed, qemu will exit. It sh

Re: [Qemu-devel] [Xen-devel] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching

2013-10-24 Thread Fabio Fantoni
Il 24/10/2013 14:17, Gonglei (Arei) ha scritto: -Original Message- From: Jan Beulich [mailto:jbeul...@suse.com] Sent: Tuesday, October 22, 2013 4:06 PM To: Gonglei (Arei) Cc: anthony.per...@citrix.com; Ian Campbell; Stefano Stabellini; Gaowei (UVP); Hanweidong (Randy); Huangweidong (Hardw

[Qemu-devel] [PULL for-1.7 0/7] usb fixes

2013-10-24 Thread Gerd Hoffmann
Hi, Here comes a collection of bugfixes for xhci and usb-host, mostly related to usb3 streams. please pull, Gerd The following changes since commit fc8ead74674b7129e8f31c2595c76658e5622197: Merge remote-tracking branch 'qemu-kvm/uq/master' into staging (2013-10-18 10:03:24 -0700) are av

[Qemu-devel] [PATCH 7/7] usb-hcd-xhci: Update endpoint context dequeue pointer for streams too

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede With streams the endpoint context dequeue pointer should point to the dequeue value for the currently active stream. At least Linux guests expect it to point to value set by an set_ep_dequeue upon completion of the set_ep_dequeue (before kicking the ep). Otherwise the Linux

[Qemu-devel] [PATCH 3/7] usb-host-libusb: Detach kernel drivers earlier

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede If we detach the kernel drivers on the first set_config, then they will be still attached when the device gets its initial reset. Causing the drivers to re-initialize the device after the reset, dirtying the device state. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoff

[Qemu-devel] [PATCH 4/7] usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContext

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 9 - 1 file changed, 9 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 469c24d..e078c50 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -374,7 +374,6 @

[Qemu-devel] [PATCH 6/7] usb-hcd-xhci: Report completion of active transfer with CC_STOPPED on ep stop

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede As we should per the XHCI spec "4.6.9 Stop Endpoint". Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index

[Qemu-devel] [PATCH 1/7] usb-host-libusb: Fix reset handling

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede The guest will issue an initial device reset when the device is attached, but since the current usb-host-libusb code only actually does the reset when udev->configuration != 0, and on attach the device is not yet configured, the reset gets ignored. This means that the device g

[Qemu-devel] [PATCH 2/7] usb-host-libusb: Configuration 0 may be a valid configuration

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede Quoting from: linux/Documentation/ABI/stable/sysfs-bus-usb: Note that some devices, in violation of the USB spec, have a configuration with a value equal to 0. Writing 0 to bConfigurationValue for these devices will install that configuration,

[Qemu-devel] [PATCH 5/7] usb-hcd-xhci: Remove unused cancelled member from XHCITransfer

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede Since qemu's USB model is geared towards emulated devices cancellation is instanteneous, so no need to wait for cancellation to complete, as such there is no wait for cancellation code, and the cancelled bool as well as the bogus comment about it can be removed. Signed-off-by

Re: [Qemu-devel] [Xen-devel] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching

2013-10-24 Thread Gonglei (Arei)
> -Original Message- > From: Fabio Fantoni [mailto:fabio.fant...@m2r.biz] > Sent: Thursday, October 24, 2013 8:58 PM > To: Gonglei (Arei); Jan Beulich > Cc: anthony.per...@citrix.com; Ian Campbell; Stefano Stabellini; Gaowei (UVP); > Hanweidong (Randy); Huangweidong (Hardware); Luonengjun;

[Qemu-devel] [PATCH 1/1] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-24 Thread Gerd Hoffmann
From: Hans de Goede Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and older but there MIN_REARM_TIMER_NS limits the wakeups caused by audio being activ

[Qemu-devel] [PULL for-1.7 0/1] audio bugfix

2013-10-24 Thread Gerd Hoffmann
Hi, Single audio bugfix for 1.7. please pull, Gerd The following changes since commit fc8ead74674b7129e8f31c2595c76658e5622197: Merge remote-tracking branch 'qemu-kvm/uq/master' into staging (2013-10-18 10:03:24 -0700) are available in the git repository at: git://git.kraxel.org/qem

Re: [Qemu-devel] [PATCH 01/17] rename is_active to is_block_active

2013-10-24 Thread Paolo Bonzini
Il 22/10/2013 04:25, Lei Li ha scritto: > is_active is used to identify block migration, rename to > is_block_active to make it more clear. No, is_active is used to identify whether a set of SaveVMHandlers is active. The default is true, so only block migration is using it. But we could use it i

Re: [Qemu-devel] [PATCH 02/17] QAPI: introduce magration capability unix_page_flipping

2013-10-24 Thread Paolo Bonzini
Il 22/10/2013 04:25, Lei Li ha scritto: > +# @unix-page-flipping: If enabled, QEMU will support localhost migration. > This > +# feature allows live upgrade of a running QEMU instance by doing > localhost > +# migration with page flipping. It requires the source and > destinati

Re: [Qemu-devel] [PATCH 03/17] migration: add migrate_unix_page_flipping()

2013-10-24 Thread Paolo Bonzini
Il 22/10/2013 04:25, Lei Li ha scritto: > Add migrate_unix_page_flipping() to check if > MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled. > > Signed-off-by: Lei Li > --- > include/migration/migration.h |3 +++ > migration.c |9 + > 2 files changed, 12 inserti

Re: [Qemu-devel] [PATCH 04/17] qmp-command.hx: add missing docs for migration capabilites

2013-10-24 Thread Paolo Bonzini
Il 22/10/2013 04:25, Lei Li ha scritto: > Signed-off-by: Lei Li > --- > qmp-commands.hx |8 > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/qmp-commands.hx b/qmp-commands.hx > index fba15cd..650a3a8 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -289

[Qemu-devel] [Bug 1243968] [NEW] VMware ESXi on QEmu Kernel Panic

2013-10-24 Thread Nathan Shearer
Public bug reported: I attempted to install ESXi 5.5 (the free version) into a QEmu 1.6.1 VM. The guest OS does have the svm capabilities, but it appears VMware is trying to do some kind of hypercall that crashes the guest. There is more information here: https://communities.vmware.com/message/22

Re: [Qemu-devel] [PATCH 12/17] migration-local: override hook_ram_load

2013-10-24 Thread Paolo Bonzini
Il 22/10/2013 04:25, Lei Li ha scritto: > Override hook_ram_load to receive the pipe file descriptor > passed by source process and page address which will be > extracted to vmsplice the page data from pipe. > > Signed-off-by: Lei Li > --- > migration-local.c | 85 > ++

  1   2   3   >