Re: [Qemu-block] [Qemu-devel] [PATCH] hw/ide/ich: Compile ich.c only if CONFIG_PCI is also set

2019-02-19 Thread Thomas Huth
On 20/02/2019 07.37, Wei Yang wrote: > On Tue, Feb 19, 2019 at 04:55:57PM +0100, Thomas Huth wrote: >> With the upcoming Kconfig-like build system, it will be easy to >> build also version of QEMU that only contain a single machine. Some > > Sorry for my poor English. > > What is also version? I

Re: [Qemu-block] [PATCH] hw/ide/ich: Compile ich.c only if CONFIG_PCI is also set

2019-02-19 Thread Thomas Huth
On 19/02/2019 19.18, Paolo Bonzini wrote: > On 19/02/19 16:55, Thomas Huth wrote: >> With the upcoming Kconfig-like build system, it will be easy to >> build also version of QEMU that only contain a single machine. Some >> of these machines (like the ARM cubieboard) use CONFIG_AHCI for an >> AHCI s

Re: [Qemu-block] qemu-img: add seek option to dd

2019-02-19 Thread Richard W.M. Jones
It seems like it's not easy to write to a place in a qcow2 file using qemu-io or qemu-img. For example suppose I want to overwrite blocks 100 and 101 with my own data: $ qemu-img dd -f raw -O qcow2 bs=4096 skip=100 count=2 \ if=/tmp/input.raw of=/tmp/disk.qcow2 qemu-img: /tmp/input.

[Qemu-block] [PATCH] block/iscsi: Restrict Linux-specific code

2019-02-19 Thread Philippe Mathieu-Daudé
Some Linux specific code is missing guards, leading to build failure on OSX: $ sudo brew install libiscsi $ ./configure && make [...] CC block/iscsi.o qemu/block/iscsi.c:338:24: error: 'iscsi_aiocb_info' defined but not used [-Werror=unused-const-variable=] static const AIOCBI

Re: [Qemu-block] [ovirt-users] Re: Unable to upload images

2019-02-19 Thread Nir Soffer
On Wed, Feb 20, 2019 at 1:01 AM wrote: > qemu-img info: > LM-7.2.45.0.17004.RELEASE-Linux-KVM-XEN.disk > image: LoadMaster-VLM-7.2.45.0.17004.RELEASE-Linux-KVM-XEN.disk > file format: raw > virtual size: 16G (17179869696 bytes) > disk size: 16G > This is raw image, so it may work, but ls -l: >

Re: [Qemu-block] [RFC PATCH 2/2] block/dirty-bitmap: implement inconsistent bit

2019-02-19 Thread John Snow
On 2/18/19 1:13 PM, Vladimir Sementsov-Ogievskiy wrote: > 14.02.2019 2:36, John Snow wrote: >> Signed-off-by: John Snow >> --- >> block/dirty-bitmap.c | 15 + >> block/qcow2-bitmap.c | 42 ++- >> blockdev.c | 43 +

Re: [Qemu-block] [PATCH v2 2/6] block/dirty-bitmaps: rename frozen predicate helper

2019-02-19 Thread John Snow
On 2/19/19 5:17 AM, Vladimir Sementsov-Ogievskiy wrote: > 19.02.2019 1:32, John Snow wrote: >> >> >> On 2/18/19 8:57 AM, Vladimir Sementsov-Ogievskiy wrote: >>> 14.02.2019 2:23, John Snow wrote: "Frozen" was a good description a long time ago, but it isn't adequate now. Rename the froz

Re: [Qemu-block] [Qemu-devel] [PATCH v5] blockdev: acquire aio_context for bitmap add/remove

2019-02-19 Thread John Snow
On 2/19/19 9:59 AM, Eric Blake wrote: > On 2/18/19 5:31 PM, John Snow wrote: >> When bitmaps are persistent, they may incur a disk read or write when bitmaps >> are added or removed. For configurations like virtio-dataplane, failing to >> acquire this lock will abort QEMU when disk IO occurs. >>

Re: [Qemu-block] [PATCH] hw/ide/ich: Compile ich.c only if CONFIG_PCI is also set

2019-02-19 Thread Paolo Bonzini
On 19/02/19 16:55, Thomas Huth wrote: > With the upcoming Kconfig-like build system, it will be easy to > build also version of QEMU that only contain a single machine. Some > of these machines (like the ARM cubieboard) use CONFIG_AHCI for an > AHCI sysbus device, but do not use CONFIG_PCI since th

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Peter Maydell
On Tue, 19 Feb 2019 at 17:53, Markus Armbruster wrote: > > Peter Maydell writes: > > What would this be, and when would you use it without a > > /* FIXME this is not what the real hardware does */ ? > > For a purely virtual machine such as ARM virt, perhaps? > > Funnily, we use IDs 0x89, 0x18, 0x

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 19 Feb 2019 at 16:07, Philippe Mathieu-Daudé > wrote: >> >> On 2/18/19 1:56 PM, Markus Armbruster wrote: >> Good news: when you read (0x, 0x, 0x, 0x) pflash IDs, >> that means the code uses the "Virt PFlash". Which code? >>

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 2/19/19 4:45 PM, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> On Mon, 18 Feb 2019 at 13:07, Markus Armbruster wrote: pflash_cfi02_register() takes a size in bytes, a block size in bytes and a number of blocks. r2d_init() passes FL

Re: [Qemu-block] [Qemu-devel] [PATCH] block/pflash_cfi02: Fix memory leak and potential use-after-free

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/19/19 4:37 PM, Stephen Checkoway wrote: > Don't dynamically allocate the pflash's timer. But do use timer_del in > an unrealize function to make sure that the timer can't fire after the > pflash_t has been freed. > > Signed-off-by: Stephen Checkoway > --- > hw/block/pflash_cfi02.c | 15

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups

2019-02-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190218125615.18970-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190218125615.18970-1-arm...@redhat.com Subject: [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups T

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] iotests: avoid broken pipe with certtool

2019-02-19 Thread Eric Blake
On 2/19/19 10:13 AM, Daniel P. Berrangé wrote: > When we run "certtool | head -1" the latter command is likely to > complete and exit before certtool has written everything it wants to > stderr. In at least the RHEL-7 gnutls 3.3.29 this causes certtool to > quit with broken pipe before it has finis

Re: [Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-19 Thread Paul Durrant
Apologies... typo-ed qemu-devel... > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 19 February 2019 16:35 > To: qeme-de...@nongnu.org; qemu-block@nongnu.org; xen- > de...@lists.xenproject.org > Cc: Paul Durrant ; Peter Maydell > ; Stefano Stabellini ; > A

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] iotests: avoid broken pipe with certtool

2019-02-19 Thread Eric Blake
On 2/19/19 10:21 AM, Daniel P. Berrangé wrote: >>> +tls_certtool() >>> +{ >>> +certtool "$@" 1>certtool.log 2>&1 >>> +if test "$?" = 0; then >>> + head -1 certtool.log >>> +else >>> + cat certtool.log >>> +fi >>> +rm -f certtool.log >>> +} >> >> I assume this is runni

Re: [Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-19 Thread Peter Maydell
Hi Paul -- you typoed the qemu-devel list email address; cc'd the right one. thanks -- PMM On Tue, 19 Feb 2019 at 16:35, Paul Durrant wrote: > > The locally allocated QDict-s need to be freed. ('file_layer' will be > freed implicitly since it is added as an object to 'driver_layer'). > > Spotted

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] iotests: ensure we print nbd server log on error

2019-02-19 Thread Eric Blake
On 2/19/19 10:13 AM, Daniel P. Berrangé wrote: > If we abort the iotest early the server.log file might contain useful > information for diagnosing the problem. Ensure its contents are > displayed in this case. > > Signed-off-by: Daniel P. Berrangé > --- > tests/qemu-iotests/233 | 3 +++ > 1 fil

[Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-19 Thread Paul Durrant
The locally allocated QDict-s need to be freed. ('file_layer' will be freed implicitly since it is added as an object to 'driver_layer'). Spotted by Coverity: CID 1398649 While in the neighbourhood free 'driver' and 'filename' as soon as they are added to the QDicts. Freeing after the 'done' labe

Re: [Qemu-block] [PATCH 2/2] iotests: avoid broken pipe with certtool

2019-02-19 Thread Thomas Huth
On 19/02/2019 17.13, Daniel P. Berrangé wrote: > When we run "certtool | head -1" the latter command is likely to > complete and exit before certtool has written everything it wants to > stderr. In at least the RHEL-7 gnutls 3.3.29 this causes certtool to > quit with broken pipe before it has finis

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Peter Maydell
On Tue, 19 Feb 2019 at 16:07, Philippe Mathieu-Daudé wrote: > > On 2/18/19 1:56 PM, Markus Armbruster wrote: > Good news: when you read (0x, 0x, 0x, 0x) pflash IDs, > that means the code uses the "Virt PFlash". IOW this is not a physical > model, since the guest obviously doesn't c

Re: [Qemu-block] [PATCH] iotests: Avoid SIGPIPE death to certtool

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 10:09:20AM -0600, Eric Blake wrote: > Our use of 'head -1' to log less output of certtool during > iotest 233 could result in certtool dying early due to SIGPIPE > if it generates enough output; if that happens, the certificate > it was supposed to generate may be zero lengt

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: fix error reporting for -object

2019-02-19 Thread Stefano Garzarella
On Tue, Feb 19, 2019 at 11:46:09AM +, Daniel P. Berrangé wrote: > Error reporting for user_creatable_add_opts_foreach was changed so that > it no longer called 'error_report_err' in: > > commit 7e1e0c11127bde81cff260fc6859690435c509d6 > Author: Markus Armbruster > Date: Wed Oct 17 10:

Re: [Qemu-block] [PATCH 2/2] iotests: avoid broken pipe with certtool

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 05:19:46PM +0100, Thomas Huth wrote: > On 19/02/2019 17.13, Daniel P. Berrangé wrote: > > When we run "certtool | head -1" the latter command is likely to > > complete and exit before certtool has written everything it wants to > > stderr. In at least the RHEL-7 gnutls 3.3.2

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] qcow2: mark image as corrupt if failing during create

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 10:11:58AM -0600, Eric Blake wrote: > On 2/19/19 6:50 AM, Daniel P. Berrangé wrote: > > During creation we write a minimal qcow2 header and then update it with > > extra features. If the updating fails for some reason we might still be > > left with a valid qcow2 image that

[Qemu-block] [PATCH 1/2] iotests: ensure we print nbd server log on error

2019-02-19 Thread Daniel P . Berrangé
If we abort the iotest early the server.log file might contain useful information for diagnosing the problem. Ensure its contents are displayed in this case. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/233 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/233

Re: [Qemu-block] [PATCH] iotests: Avoid SIGPIPE death to certtool

2019-02-19 Thread Thomas Huth
On 19/02/2019 17.09, Eric Blake wrote: > Our use of 'head -1' to log less output of certtool during > iotest 233 could result in certtool dying early due to SIGPIPE > if it generates enough output; if that happens, the certificate > it was supposed to generate may be zero length, which causes > fai

[Qemu-block] [PATCH 0/2] Fix NBD TLS iotests on RHEL-7

2019-02-19 Thread Daniel P . Berrangé
This fixes a failure of iotest 233 due to certtool problesm in RHEL7 wrt to SIGPIPE Daniel P. Berrangé (2): iotests: ensure we print nbd server log on error iotests: avoid broken pipe with certtool tests/qemu-iotests/233| 3 +++ tests/qemu-iotests/common.tls | 48 +++

[Qemu-block] [PATCH 2/2] iotests: avoid broken pipe with certtool

2019-02-19 Thread Daniel P . Berrangé
When we run "certtool | head -1" the latter command is likely to complete and exit before certtool has written everything it wants to stderr. In at least the RHEL-7 gnutls 3.3.29 this causes certtool to quit with broken pipe before it has finished writing the desired output file to disk. This cause

Re: [Qemu-block] [Qemu-devel] [PATCH 08/10] pflash: Clean up after commit 368a354f02b part 1

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/18/19 1:56 PM, Markus Armbruster wrote: > QOMification left parameter @qdev unused in pflash_cfi01_register() > and pflash_cfi02_register(). All callers pass NULL. Remove. Good patch to discretly include a "rename to pflash_cfi01_create()" :P > Signed-off-by: Markus Armbruster Reviewed-b

Re: [Qemu-block] [Qemu-devel] [PATCH 07/10] mips_malta: Clean up definition of flash memory size somewhat

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/19/19 2:43 PM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 2/18/19 1:56 PM, Markus Armbruster wrote: >>> pflash_cfi01_register() takes a size in bytes, a block size in bytes >>> and a number of blocks. mips_malta_init() passes BIOS_SIZE, 65536, >>> FLASH_SIZE >> 16. A

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] qcow2: mark image as corrupt if failing during create

2019-02-19 Thread Eric Blake
On 2/19/19 6:50 AM, Daniel P. Berrangé wrote: > During creation we write a minimal qcow2 header and then update it with > extra features. If the updating fails for some reason we might still be > left with a valid qcow2 image that will be mistakenly used for I/O. We > cannot delete the image, since

[Qemu-block] [PATCH] iotests: Avoid SIGPIPE death to certtool

2019-02-19 Thread Eric Blake
Our use of 'head -1' to log less output of certtool during iotest 233 could result in certtool dying early due to SIGPIPE if it generates enough output; if that happens, the certificate it was supposed to generate may be zero length, which causes failures such as: == check TLS client to plain se

Re: [Qemu-block] [PATCH 11/12] block: Use normal drain for bdrv_set_aio_context()

2019-02-19 Thread Eric Blake
On 2/19/19 5:23 AM, Kevin Wolf wrote: > Am 18.02.2019 um 21:57 hat Eric Blake geschrieben: >> On 2/18/19 10:18 AM, Kevin Wolf wrote: >>> Now that bdrv_set_aio_context() works inside drained sections, it can >>> also use the real drain function instead of open coding something >>> similar. >>> >>> S

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/18/19 1:56 PM, Markus Armbruster wrote: > pflash_cfi02_register() takes a size in bytes, a block size in bytes > and a number of blocks. r2d_init() passes FLASH_SIZE, 16 * KiB, > FLASH_SIZE >> 16. Does not compute: size doesn't match block size * > number of blocks. The latter happens to wi

[Qemu-block] [PATCH] block/pflash_cfi02: Fix memory leak and potential use-after-free

2019-02-19 Thread Stephen Checkoway
Don't dynamically allocate the pflash's timer. But do use timer_del in an unrealize function to make sure that the timer can't fire after the pflash_t has been freed. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(

Re: [Qemu-block] [PATCH 06/13] block: Handle child references in bdrv_reopen_queue()

2019-02-19 Thread Alberto Garcia
On Tue 12 Feb 2019 05:28:06 PM CET, Kevin Wolf wrote: >>1) Set of child options: the options are removed from the parent's >> options QDict and are passed to the child with a recursive >> bdrv_reopen_queue() call. This case was already working fine. > > Small addition: This is only

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] qcow2: fail if encryption opts are provided to non-encrypted image

2019-02-19 Thread Eric Blake
On 2/19/19 6:50 AM, Daniel P. Berrangé wrote: > If the qcow2 image does not have any encryption method specified in its > header, the user should not be providing any encryption options when > opening it. We already detect this if the user had set "encrypt.format" > but this field is optional so mu

[Qemu-block] [PATCH] hw/ide/ich: Compile ich.c only if CONFIG_PCI is also set

2019-02-19 Thread Thomas Huth
With the upcoming Kconfig-like build system, it will be easy to build also version of QEMU that only contain a single machine. Some of these machines (like the ARM cubieboard) use CONFIG_AHCI for an AHCI sysbus device, but do not use CONFIG_PCI since they do not feature a PCI bus. In this case link

Re: [Qemu-block] [Qemu-devel] [Qemu-ppc] [PATCH 05/10] ppc405_boards: Don't size flash memory to match backing image

2019-02-19 Thread Markus Armbruster
BALATON Zoltan writes: > On Mon, 18 Feb 2019, Markus Armbruster wrote: >> Machine "ref405ep" maps its flash memory at address 2^32 - image size. >> Image size is rounded up to the next multiple of 64KiB. Useless, >> because pflash_cfi02_realize() fails with "failed to read the initial >> flash c

Re: [Qemu-block] Failing qemu-iotest 233

2019-02-19 Thread Eric Blake
On 2/19/19 4:44 AM, Daniel P. Berrangé wrote: > On Tue, Feb 19, 2019 at 07:36:07AM +0100, Thomas Huth wrote: >> >> Hi Eric, hi Daniel, >> >> QEMU iotest 233 is failing for me on RHEL7: >> >> 233[07:29:30] [07:29:30] [failed, exit status 1] - output >> mismatch (see 233.out.bad) >>

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/19/19 4:45 PM, Markus Armbruster wrote: > Peter Maydell writes: > >> On Mon, 18 Feb 2019 at 13:07, Markus Armbruster wrote: >>> >>> pflash_cfi02_register() takes a size in bytes, a block size in bytes >>> and a number of blocks. r2d_init() passes FLASH_SIZE, 16 * KiB, >>> FLASH_SIZE >> 16.

Re: [Qemu-block] [RFC PATCH 11/11] qcow2: Add data file to ImageInfoSpecificQCow2

2019-02-19 Thread Eric Blake
On 2/19/19 3:17 AM, Kevin Wolf wrote: >> >> Ah, this is what I looked for in the last patch. :-) >> >> (i.e. it should be in the last patch, not here) > > [RFC PATCH 11/11] qcow2: Add data file to ImageInfoSpecificQCow2 > > This is the last patch. :-P "last"=="previous" (10/11), not "last"=="fi

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 18 Feb 2019 at 13:07, Markus Armbruster wrote: >> >> pflash_cfi02_register() takes a size in bytes, a block size in bytes >> and a number of blocks. r2d_init() passes FLASH_SIZE, 16 * KiB, >> FLASH_SIZE >> 16. Does not compute: size doesn't match block size * >>

Re: [Qemu-block] [Qemu-devel] [PATCH 10/10] hw/arm hw/xtensa: De-duplicate pflash creation code some

2019-02-19 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 18 Feb 2019 at 13:08, Markus Armbruster wrote: >> >> pflash_cfi01_register() creates a TYPE_CFI_PFLASH01 device, sets >> properties, realizes, and wires up. >> >> We have three modified copies of it, because their users need to set >> additional properties, or hav

Re: [Qemu-block] [Qemu-ppc] [PATCH 05/10] ppc405_boards: Don't size flash memory to match backing image

2019-02-19 Thread BALATON Zoltan
On Mon, 18 Feb 2019, Markus Armbruster wrote: Machine "ref405ep" maps its flash memory at address 2^32 - image size. Image size is rounded up to the next multiple of 64KiB. Useless, because pflash_cfi02_realize() fails with "failed to read the initial flash content" unless the rounding is a no-o

Re: [Qemu-block] [PATCH v5] blockdev: acquire aio_context for bitmap add/remove

2019-02-19 Thread Eric Blake
On 2/18/19 5:31 PM, John Snow wrote: > When bitmaps are persistent, they may incur a disk read or write when bitmaps > are added or removed. For configurations like virtio-dataplane, failing to > acquire this lock will abort QEMU when disk IO occurs. > > We used to acquire aio_context as part of t

Re: [Qemu-block] [Qemu-devel] [PATCH 01/10] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/19/19 2:41 PM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 2/18/19 1:56 PM, Markus Armbruster wrote: >>> flash.h's incomplete struct pflash_t is completed both in >>> pflash_cfi01.c and in pflash_cfi02.c. The complete types are >>> incompatible. This can hide type err

Re: [Qemu-block] [Qemu-devel] [PATCH 10/10] hw/arm hw/xtensa: De-duplicate pflash creation code some

2019-02-19 Thread Peter Maydell
On Mon, 18 Feb 2019 at 13:08, Markus Armbruster wrote: > > pflash_cfi01_register() creates a TYPE_CFI_PFLASH01 device, sets > properties, realizes, and wires up. > > We have three modified copies of it, because their users need to set > additional properties, or have the wiring done differently. >

Re: [Qemu-block] [PATCH 07/12] nbd: Increase bs->in_flight during AioContext switch

2019-02-19 Thread Paolo Bonzini
On 19/02/19 12:11, Kevin Wolf wrote: >> 2) maybe instead of aio_co_schedul-ing client->connection_co and having >> the s->aio_ctx_switch flag, you could go through a bottom half that does >> the bdrv_inc_in_flight and then enters client->connection_co? > That would be too easy. :-) > > But I agree

Re: [Qemu-block] [Qemu-devel] [PATCH 06/10] r2d: Flash memory creation is confused about size, mark FIXME

2019-02-19 Thread Peter Maydell
On Mon, 18 Feb 2019 at 13:07, Markus Armbruster wrote: > > pflash_cfi02_register() takes a size in bytes, a block size in bytes > and a number of blocks. r2d_init() passes FLASH_SIZE, 16 * KiB, > FLASH_SIZE >> 16. Does not compute: size doesn't match block size * > number of blocks. The latter

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: drop unnecessary accel=kvm

2019-02-19 Thread Thomas Huth
On 19/02/2019 14.36, Vladimir Sementsov-Ogievskiy wrote: > 19.02.2019 16:20, Thomas Huth wrote: >> On 19/02/2019 14.07, Stefan Hajnoczi wrote: >>> On Tue, Feb 19, 2019 at 12:12 PM Vladimir Sementsov-Ogievskiy >>> wrote: 19.02.2019 15:02, Thomas Huth wrote: > On 19/02/2019 12.59, Stefan Ha

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups

2019-02-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190218125615.18970-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190218125615.18970-1-arm...@redhat.com Subject: [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups T

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups

2019-02-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190218125615.18970-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190218125615.18970-1-arm...@redhat.com Subject: [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups T

Re: [Qemu-block] [Qemu-devel] [PATCH 02/10] pflash: Macro PFLASH_BUG() is used just once, expand

2019-02-19 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 19 Feb 2019 at 12:41, Philippe Mathieu-Daudé > wrote: >> >> On 2/18/19 1:56 PM, Markus Armbruster wrote: >> > PFLASH_BUG()'s lone use has a suspicious smell: it prints "Possible >> > BUG", which sounds like a warning, then calls exit(1), followed by >> > unreacha

Re: [Qemu-block] [Qemu-devel] [PATCH 07/10] mips_malta: Clean up definition of flash memory size somewhat

2019-02-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 2/18/19 1:56 PM, Markus Armbruster wrote: >> pflash_cfi01_register() takes a size in bytes, a block size in bytes >> and a number of blocks. mips_malta_init() passes BIOS_SIZE, 65536, >> FLASH_SIZE >> 16. Actually consistent only because BIOS_SIZE (defined >>

Re: [Qemu-block] [Qemu-devel] [PATCH 01/10] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02

2019-02-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 2/18/19 1:56 PM, Markus Armbruster wrote: >> flash.h's incomplete struct pflash_t is completed both in >> pflash_cfi01.c and in pflash_cfi02.c. The complete types are >> incompatible. This can hide type errors, such as passing a pflash_t >> created with pflas

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: drop unnecessary accel=kvm

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2019 16:20, Thomas Huth wrote: > On 19/02/2019 14.07, Stefan Hajnoczi wrote: >> On Tue, Feb 19, 2019 at 12:12 PM Vladimir Sementsov-Ogievskiy >> wrote: >>> 19.02.2019 15:02, Thomas Huth wrote: On 19/02/2019 12.59, Stefan Hajnoczi wrote: > Tests 235 and 238 do not require the kvm acc

Re: [Qemu-block] [PATCH] iotests: drop unnecessary accel=kvm

2019-02-19 Thread Stefan Hajnoczi
On Tue, Feb 19, 2019 at 12:12 PM Vladimir Sementsov-Ogievskiy wrote: > 19.02.2019 15:02, Thomas Huth wrote: > > On 19/02/2019 12.59, Stefan Hajnoczi wrote: > >> Tests 235 and 238 do not require the kvm accelerator. TCG works fine. > >> > >> Use the default accelerator instead of requiring kvm. >

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: fix error reporting for -object

2019-02-19 Thread Markus Armbruster
Daniel P. Berrangé writes: > Error reporting for user_creatable_add_opts_foreach was changed so that > it no longer called 'error_report_err' in: > > commit 7e1e0c11127bde81cff260fc6859690435c509d6 > Author: Markus Armbruster > Date: Wed Oct 17 10:26:43 2018 +0200 > > qom: Clean up e

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: drop unnecessary accel=kvm

2019-02-19 Thread Thomas Huth
On 19/02/2019 14.07, Stefan Hajnoczi wrote: > On Tue, Feb 19, 2019 at 12:12 PM Vladimir Sementsov-Ogievskiy > wrote: >> 19.02.2019 15:02, Thomas Huth wrote: >>> On 19/02/2019 12.59, Stefan Hajnoczi wrote: Tests 235 and 238 do not require the kvm accelerator. TCG works fine. Use the

Re: [Qemu-block] [Qemu-devel] [PATCH 02/10] pflash: Macro PFLASH_BUG() is used just once, expand

2019-02-19 Thread Peter Maydell
On Tue, 19 Feb 2019 at 12:41, Philippe Mathieu-Daudé wrote: > > On 2/18/19 1:56 PM, Markus Armbruster wrote: > > PFLASH_BUG()'s lone use has a suspicious smell: it prints "Possible > > BUG", which sounds like a warning, then calls exit(1), followed by > > unreachable goto reset_flash. All this co

Re: [Qemu-block] [PATCH 4/4] block/nbd-client: use non-blocking io channel for nbd negotiation

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
12.02.2019 1:02, Eric Blake wrote: > On 2/11/19 6:56 AM, Vladimir Sementsov-Ogievskiy wrote: >> Now negotiation is done in coroutine, so to take benefit of it let's >> use non-blocking model. >> >> Note that QIOChannel handle synchronous io calls correctly anyway, so > > s/handle/handles/ > >> it

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups

2019-02-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190218125615.18970-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190218125615.18970-1-arm...@redhat.com Subject: [Qemu-devel] [PATCH 00/10] pflash: Fixes and cleanups T

Re: [Qemu-block] [Qemu-devel] [PATCH 10/10] hw/arm hw/xtensa: De-duplicate pflash creation code some

2019-02-19 Thread Markus Armbruster
Max Filippov writes: > On Mon, Feb 18, 2019 at 5:07 AM Markus Armbruster wrote: >> >> pflash_cfi01_register() creates a TYPE_CFI_PFLASH01 device, sets >> properties, realizes, and wires up. >> >> We have three modified copies of it, because their users need to set >> additional properties, or ha

Re: [Qemu-block] [Qemu-devel] [PATCH 07/10] mips_malta: Clean up definition of flash memory size somewhat

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/18/19 1:56 PM, Markus Armbruster wrote: > pflash_cfi01_register() takes a size in bytes, a block size in bytes > and a number of blocks. mips_malta_init() passes BIOS_SIZE, 65536, > FLASH_SIZE >> 16. Actually consistent only because BIOS_SIZE (defined > in include/hw/mips/bios.h as (4 * MiB)

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 01:16:57PM +0100, Kevin Wolf wrote: > Am 19.02.2019 um 13:01 hat Daniel P. Berrangé geschrieben: > > On Tue, Feb 19, 2019 at 12:31:41PM +0100, Kevin Wolf wrote: > > > Am 19.02.2019 um 12:06 hat Daniel P. Berrangé geschrieben: > > > > On Tue, Feb 19, 2019 at 10:37:16AM +0100,

[Qemu-block] [PATCH 1/2] qcow2: fail if encryption opts are provided to non-encrypted image

2019-02-19 Thread Daniel P . Berrangé
If the qcow2 image does not have any encryption method specified in its header, the user should not be providing any encryption options when opening it. We already detect this if the user had set "encrypt.format" but this field is optional so must consider any "encrypt.*" option to be an error. Si

[Qemu-block] [PATCH 0/2] qcow2: improve error handling when luks creation fails

2019-02-19 Thread Daniel P . Berrangé
If qemu is built without crypto support luks creation will fail. The 188 iotest however still carried on using the partially created file. This showed a few flaws in error handling, one during creation and one during opening of the image. Daniel P. Berrangé (2): qcow2: fail if encryption opts ar

[Qemu-block] [PATCH 2/2] qcow2: mark image as corrupt if failing during create

2019-02-19 Thread Daniel P . Berrangé
During creation we write a minimal qcow2 header and then update it with extra features. If the updating fails for some reason we might still be left with a valid qcow2 image that will be mistakenly used for I/O. We cannot delete the image, since we don't know if we created the underlying storage or

Re: [Qemu-block] [Qemu-devel] [PATCH 01/10] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/18/19 1:56 PM, Markus Armbruster wrote: > flash.h's incomplete struct pflash_t is completed both in > pflash_cfi01.c and in pflash_cfi02.c. The complete types are > incompatible. This can hide type errors, such as passing a pflash_t > created with pflash_cfi02_register() to pflash_cfi01_get_

Re: [Qemu-block] [PATCH 1/4] io/channel: add qio_channel_get_attached_aio_context()

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
12.02.2019 13:33, Daniel P. Berrangé wrote: > On Mon, Feb 11, 2019 at 03:55:58PM +0300, Vladimir Sementsov-Ogievskiy wrote: >> Expose attached aio context. It will be used in nbd code, to >> understand, in which aio context negotiation should be done. > > I'm not especially objecting to the idea o

Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] hw: Use CFI_PFLASH0{1, 2} and TYPE_CFI_PFLASH0{1, 2}

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/18/19 1:56 PM, Markus Armbruster wrote: > We have two open-coded copies of macro CFI_PFLASH01(). Move the macro > to the header, so we can ditch the copies. Move CFI_PFLASH02() to the > header for symmetry. > > We define macros TYPE_CFI_PFLASH01 and TYPE_CFI_PFLASH02 for type name > strings

Re: [Qemu-block] [Qemu-devel] [PATCH 02/10] pflash: Macro PFLASH_BUG() is used just once, expand

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/18/19 1:56 PM, Markus Armbruster wrote: > PFLASH_BUG()'s lone use has a suspicious smell: it prints "Possible > BUG", which sounds like a warning, then calls exit(1), followed by > unreachable goto reset_flash. All this commit does is expanding the > macro, so the smell becomes more poignant,

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Kevin Wolf
Am 19.02.2019 um 13:01 hat Daniel P. Berrangé geschrieben: > On Tue, Feb 19, 2019 at 12:31:41PM +0100, Kevin Wolf wrote: > > Am 19.02.2019 um 12:06 hat Daniel P. Berrangé geschrieben: > > > On Tue, Feb 19, 2019 at 10:37:16AM +0100, Kevin Wolf wrote: > > > > Am 19.02.2019 um 10:04 hat Thomas Huth ge

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: fix error reporting for -object

2019-02-19 Thread Philippe Mathieu-Daudé
On 2/19/19 12:46 PM, Daniel P. Berrangé wrote: > Error reporting for user_creatable_add_opts_foreach was changed so that > it no longer called 'error_report_err' in: > > commit 7e1e0c11127bde81cff260fc6859690435c509d6 > Author: Markus Armbruster > Date: Wed Oct 17 10:26:43 2018 +0200 > >

Re: [Qemu-block] [PATCH] iotests: drop unnecessary accel=kvm

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2019 15:02, Thomas Huth wrote: > On 19/02/2019 12.59, Stefan Hajnoczi wrote: >> Tests 235 and 238 do not require the kvm accelerator. TCG works fine. >> >> Use the default accelerator instead of requiring kvm. >> >> Suggested-by: Thomas Huth >> Signed-off-by: Stefan Hajnoczi >> --- >> te

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Thomas Huth
On 19/02/2019 12.38, Kevin Wolf wrote: > Am 19.02.2019 um 11:11 hat Thomas Huth geschrieben: >> On 19/02/2019 10.37, Kevin Wolf wrote: >>> Am 19.02.2019 um 10:04 hat Thomas Huth geschrieben: On 19/02/2019 08.53, Kevin Wolf wrote: [...] >> 169 got killed via abort(): >> >> 169[0

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 12:01:28PM +, Daniel P. Berrangé wrote: > On Tue, Feb 19, 2019 at 12:31:41PM +0100, Kevin Wolf wrote: > > Am 19.02.2019 um 12:06 hat Daniel P. Berrangé geschrieben: > > > On Tue, Feb 19, 2019 at 10:37:16AM +0100, Kevin Wolf wrote: > > > > Am 19.02.2019 um 10:04 hat Thoma

Re: [Qemu-block] [PATCH] iotests: drop unnecessary accel=kvm

2019-02-19 Thread Thomas Huth
On 19/02/2019 12.59, Stefan Hajnoczi wrote: > Tests 235 and 238 do not require the kvm accelerator. TCG works fine. > > Use the default accelerator instead of requiring kvm. > > Suggested-by: Thomas Huth > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/235 | 1 - > tests/qemu-iotes

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 12:31:41PM +0100, Kevin Wolf wrote: > Am 19.02.2019 um 12:06 hat Daniel P. Berrangé geschrieben: > > On Tue, Feb 19, 2019 at 10:37:16AM +0100, Kevin Wolf wrote: > > > Am 19.02.2019 um 10:04 hat Thomas Huth geschrieben: > > > > > > > > https://gitlab.com/huth/qemu/-/jobs/16

[Qemu-block] [PATCH] iotests: drop unnecessary accel=kvm

2019-02-19 Thread Stefan Hajnoczi
Tests 235 and 238 do not require the kvm accelerator. TCG works fine. Use the default accelerator instead of requiring kvm. Suggested-by: Thomas Huth Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/235 | 1 - tests/qemu-iotests/238 | 1 - 2 files changed, 2 deletions(-) diff --git a/te

[Qemu-block] [PATCH] qemu-img: fix error reporting for -object

2019-02-19 Thread Daniel P . Berrangé
Error reporting for user_creatable_add_opts_foreach was changed so that it no longer called 'error_report_err' in: commit 7e1e0c11127bde81cff260fc6859690435c509d6 Author: Markus Armbruster Date: Wed Oct 17 10:26:43 2018 +0200 qom: Clean up error reporting in user_creatable_add_opts_f

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Kevin Wolf
Am 19.02.2019 um 11:11 hat Thomas Huth geschrieben: > On 19/02/2019 10.37, Kevin Wolf wrote: > > Am 19.02.2019 um 10:04 hat Thomas Huth geschrieben: > >> On 19/02/2019 08.53, Kevin Wolf wrote: > [...] > >>> Which are the cases that fail for you with '--disable-tcg'? > >> > >> These tests are failin

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Kevin Wolf
Am 19.02.2019 um 12:06 hat Daniel P. Berrangé geschrieben: > On Tue, Feb 19, 2019 at 10:37:16AM +0100, Kevin Wolf wrote: > > Am 19.02.2019 um 10:04 hat Thomas Huth geschrieben: > > > > > > https://gitlab.com/huth/qemu/-/jobs/163680780 > > > > > > Some of them apparently need encryption to be ena

Re: [Qemu-block] [PATCH 11/12] block: Use normal drain for bdrv_set_aio_context()

2019-02-19 Thread Kevin Wolf
Am 18.02.2019 um 21:57 hat Eric Blake geschrieben: > On 2/18/19 10:18 AM, Kevin Wolf wrote: > > Now that bdrv_set_aio_context() works inside drained sections, it can > > also use the real drain function instead of open coding something > > similar. > > > > Signed-off-by: Kevin Wolf > > --- > > b

Re: [Qemu-block] [PATCH 07/12] nbd: Increase bs->in_flight during AioContext switch

2019-02-19 Thread Kevin Wolf
Am 18.02.2019 um 18:22 hat Paolo Bonzini geschrieben: > On 18/02/19 17:18, Kevin Wolf wrote: > > +/* aio_ctx_switch is only supposed to be set if we're sitting > > in > > + * the qio_channel_yield() below. */ > > +assert(!*aio_ctx_switch); > > bdrv_

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 10:37:16AM +0100, Kevin Wolf wrote: > Am 19.02.2019 um 10:04 hat Thomas Huth geschrieben: > > > > https://gitlab.com/huth/qemu/-/jobs/163680780 > > > > Some of them apparently need encryption to be enabled (as already > > mentioned by Cleber in his patch) - thus should th

Re: [Qemu-block] Failing qemu-iotest 233

2019-02-19 Thread Daniel P . Berrangé
On Tue, Feb 19, 2019 at 07:36:07AM +0100, Thomas Huth wrote: > > Hi Eric, hi Daniel, > > QEMU iotest 233 is failing for me on RHEL7: > > 233[07:29:30] [07:29:30] [failed, exit status 1] - output > mismatch (see 233.out.bad) > --- /home/thuth/devel/qemu/tests/qemu-iotests/233.ou

Re: [Qemu-block] [PATCH 3/4] nbd: do qemu_coroutine_yield during tls handshake

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
12.02.2019 0:55, Eric Blake wrote: > On 2/11/19 6:56 AM, Vladimir Sementsov-Ogievskiy wrote: >> We always call qio_channel_tls_handshake in nbd from couroutine. Take >> benefit of it and just yield instead of creating personal main loop. >> >> Mark and rename the function and it's callers correspon

Re: [Qemu-block] [PATCH 2/4] nbd/client: do negotiation in coroutine

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
12.02.2019 0:38, Eric Blake wrote: > On 2/11/19 6:55 AM, Vladimir Sementsov-Ogievskiy wrote: >> As a first step to non-blocking negotiation, move it to coroutine. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> nbd/client.c | 123 +-- >>

Re: [Qemu-block] [PATCH] iotests: handle TypeError for Python3 in test 242

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2019 22:59, Andrey Shinkevich wrote: > To write one byte to disk, Python2 may use 'chr' type. > In Python3, conversion to 'byte' type is required. > > Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Forget to say to Andrey that we should add Reported-by: Kevin

Re: [Qemu-block] [PATCH 04/12] io: Make qio_channel_yield() interruptible

2019-02-19 Thread Kevin Wolf
Am 18.02.2019 um 18:11 hat Paolo Bonzini geschrieben: > On 18/02/19 17:18, Kevin Wolf wrote: > > Similar to how qemu_co_sleep_ns() allows to be preempted by an external > > coroutine entry, allow reentering qio_channel_yield() early. > > > > Signed-off-by: Kevin Wolf > > --- > > include/io/chann

Re: [Qemu-block] [PATCH v2 2/6] block/dirty-bitmaps: rename frozen predicate helper

2019-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2019 1:32, John Snow wrote: > > > On 2/18/19 8:57 AM, Vladimir Sementsov-Ogievskiy wrote: >> 14.02.2019 2:23, John Snow wrote: >>> "Frozen" was a good description a long time ago, but it isn't adequate now. >>> Rename the frozen predicate to has_successor to make the semantics of the >>> pr

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Thomas Huth
On 19/02/2019 10.37, Kevin Wolf wrote: > Am 19.02.2019 um 10:04 hat Thomas Huth geschrieben: >> On 19/02/2019 08.53, Kevin Wolf wrote: [...] >>> Which are the cases that fail for you with '--disable-tcg'? >> >> These tests are failing: 087 169 188 232 235 238 > > Hm, 087 and 232 just do something

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Kevin Wolf
Am 19.02.2019 um 10:04 hat Thomas Huth geschrieben: > On 19/02/2019 08.53, Kevin Wolf wrote: > > Am 19.02.2019 um 07:44 hat Thomas Huth geschrieben: > >> On 18/02/2019 19.22, Cleber Rosa wrote: > >>> > >>> > >>> On 2/13/19 6:54 AM, Thomas Huth wrote: > This is very convenient for people like m

Re: [Qemu-block] [RFC PATCH 11/11] qcow2: Add data file to ImageInfoSpecificQCow2

2019-02-19 Thread Kevin Wolf
Am 19.02.2019 um 01:47 hat Max Reitz geschrieben: > On 31.01.19 18:55, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf > > --- > > qapi/block-core.json | 1 + > > block/qcow2.c| 6 +- > > 2 files changed, 6 insertions(+), 1 deletion(-) > > [...] > > > diff --git a/block/qcow2.c b/bl

Re: [Qemu-block] [RFC PATCH 10/11] qcow2: Store data file name in the image

2019-02-19 Thread Kevin Wolf
Am 19.02.2019 um 01:18 hat Max Reitz geschrieben: > On 31.01.19 18:55, Kevin Wolf wrote: > > Rather than requiring that the external data file node is passed > > explicitly when creating the qcow2 node, store the filename in the > > designated header extension during .bdrv_create and read it from t

Re: [Qemu-block] Failing iotests in CI (was: Add a gitlab-ci file for Continuous Integration testing on Gitlab)

2019-02-19 Thread Thomas Huth
On 19/02/2019 08.53, Kevin Wolf wrote: > Am 19.02.2019 um 07:44 hat Thomas Huth geschrieben: >> On 18/02/2019 19.22, Cleber Rosa wrote: >>> >>> >>> On 2/13/19 6:54 AM, Thomas Huth wrote: This is very convenient for people like me who store their QEMU git trees on gitlab.com: Automatic CI

  1   2   >