Re: [PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-22 Thread Kevin Wolf
Am 22.06.2021 um 17:22 hat Max Reitz geschrieben: > On 22.06.21 17:02, Kevin Wolf wrote: > > Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: > > > Allow changing the file mode, UID, and GID through SETATTR. > > > > > > This only really makes sense with allow-other, though (because without > > >

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
22.06.2021 18:38, Kevin Wolf wrote: Am 11.06.2021 um 21:03 hat Eric Blake geschrieben: To save the user from having to check 'qemu-img info --backing-chain' or other followup command to determine which "depth":n goes beyond the chain, add a boolean field "backing" that is set only for

Re: Running iotest linters from check-python-* CI jobs

2021-06-22 Thread John Snow
On 6/22/21 11:52 AM, Max Reitz wrote: On 22.06.21 16:57, John Snow wrote: Hi Kevin: At one point I had the idea to augment the Python linter CI jobs to also run the iotest linters. I thought it would be convenient to ensure that while I changed around the QMP and Machine packages that I

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Nir Soffer
On Tue, Jun 22, 2021 at 6:38 PM Kevin Wolf wrote: > > Am 11.06.2021 um 21:03 hat Eric Blake geschrieben: > > To save the user from having to check 'qemu-img info --backing-chain' > > or other followup command to determine which "depth":n goes beyond the > > chain, add a boolean field "backing"

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Nir Soffer
On Fri, Jun 11, 2021 at 10:03 PM Eric Blake wrote: > > To save the user from having to check 'qemu-img info --backing-chain' > or other followup command to determine which "depth":n goes beyond the > chain, add a boolean field "backing" that is set only for unallocated > portions of the disk. > >

SD/MMC host controller + 64-bit system bus

2021-06-22 Thread Joanne Koong
Hello! I noticed that the default SD/MMC host controller only supports a 32-bit system bus. Is there a reason 64-bit system buses aren't supported by default? Thanks!

Re: SD/MMC host controller + 64-bit system bus

2021-06-22 Thread Philippe Mathieu-Daudé
Hi Joanne, On 6/22/21 8:07 PM, Joanne Koong wrote: > Hello! I noticed that the default SD/MMC host controller only supports a > 32-bit system bus. Is there a reason 64-bit system buses aren't > supported by default? We aim to support the spec v2.00, so this is a bug in the model, 64-bit system

Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-22 Thread Emanuele Giuseppe Esposito
On 22/06/2021 12:39, Vladimir Sementsov-Ogievskiy wrote: 22.06.2021 13:20, Paolo Bonzini wrote: On 22/06/21 11:36, Vladimir Sementsov-Ogievskiy wrote: It does.  If it returns true, you still want the load of finished to happen before the reads that follow. Hmm.. The worst case if we use

Re: [PATCH v3 03/24] modules: generate modinfo.c

2021-06-22 Thread Jose R. Ziviani
Hello, Just a small change. On Fri, Jun 18, 2021 at 06:53:32AM +0200, Gerd Hoffmann wrote: > Add script to generate C source with a small > database containing the module meta-data. > > Signed-off-by: Gerd Hoffmann > --- > scripts/modinfo-generate.py | 84 +

Re: [PATCH v3 03/24] modules: generate modinfo.c

2021-06-22 Thread Jose R. Ziviani
On Fri, Jun 18, 2021 at 06:53:32AM +0200, Gerd Hoffmann wrote: > Add script to generate C source with a small > database containing the module meta-data. > > Signed-off-by: Gerd Hoffmann > --- > scripts/modinfo-generate.py | 84 + > include/qemu/module.h

Re: [PATCH v2] block/nvme: Fix VFIO_MAP_DMA failed: No space left on device

2021-06-22 Thread Philippe Mathieu-Daudé
On 6/22/21 9:29 AM, Philippe Mathieu-Daudé wrote: > On 6/21/21 5:36 PM, Fam Zheng wrote: >>> On 21 Jun 2021, at 16:13, Philippe Mathieu-Daudé wrote: >>> On 6/21/21 3:18 PM, Fam Zheng wrote: > On 21 Jun 2021, at 10:32, Philippe Mathieu-Daudé > wrote: > > When the NVMe block

Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-22 Thread Paolo Bonzini
On 19/06/21 22:06, Vladimir Sementsov-Ogievskiy wrote: -    assert(call_state->finished); +    assert(qatomic_load_acquire(_state->finished)); Hmm. Here qatomic_load_acquire protects nothing (assertion will crash if not yet finished anyway). So, caller is double sure that block-copy is

Re: [PATCH v2] block/nvme: Fix VFIO_MAP_DMA failed: No space left on device

2021-06-22 Thread Philippe Mathieu-Daudé
On 6/21/21 5:36 PM, Fam Zheng wrote: >> On 21 Jun 2021, at 16:13, Philippe Mathieu-Daudé wrote: >> On 6/21/21 3:18 PM, Fam Zheng wrote: On 21 Jun 2021, at 10:32, Philippe Mathieu-Daudé wrote: When the NVMe block driver was introduced (see commit bdd6a90a9e5, January 2018),

Re: [PATCH v4 3/6] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
21.06.2021 10:59, Emanuele Giuseppe Esposito wrote: On 19/06/2021 17:23, Vladimir Sementsov-Ogievskiy wrote: 14.06.2021 10:33, Emanuele Giuseppe Esposito wrote: As done in BlockCopyCallState, categorize BlockCopyTask and BlockCopyState in IN, State and OUT fields. This is just to understand

Re: [PATCH v4 3/6] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
21.06.2021 11:13, Emanuele Giuseppe Esposito wrote: On 19/06/2021 20:31, Vladimir Sementsov-Ogievskiy wrote: 19.06.2021 18:23, Vladimir Sementsov-Ogievskiy wrote:   typedef struct BlockCopyTask {   AioTask task; +    /* + * IN parameters. Initialized in block_copy_task_create() +

Re: [PATCH v6 06/16] qemu-iotests: delay QMP socket timers

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
21.06.2021 13:33, Emanuele Giuseppe Esposito wrote: Attaching gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Please, let this patch go without my r-b. I don't like

Re: [PATCH v6 06/16] qemu-iotests: delay QMP socket timers

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
22.06.2021 14:04, Emanuele Giuseppe Esposito wrote: On 22/06/2021 12:50, Vladimir Sementsov-Ogievskiy wrote: 21.06.2021 13:33, Emanuele Giuseppe Esposito wrote: Attaching gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe

Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
22.06.2021 11:15, Paolo Bonzini wrote: On 19/06/21 22:06, Vladimir Sementsov-Ogievskiy wrote: -    assert(call_state->finished); +    assert(qatomic_load_acquire(_state->finished)); Hmm. Here qatomic_load_acquire protects nothing (assertion will crash if not yet finished anyway). So, caller

Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-22 Thread Paolo Bonzini
On 22/06/21 11:36, Vladimir Sementsov-Ogievskiy wrote: It does.  If it returns true, you still want the load of finished to happen before the reads that follow. Hmm.. The worst case if we use just qatomic_read is that assertion will not crash when it actually should. That doesn't break the

Re: [PATCH v6 06/16] qemu-iotests: delay QMP socket timers

2021-06-22 Thread Emanuele Giuseppe Esposito
On 22/06/2021 12:50, Vladimir Sementsov-Ogievskiy wrote: 21.06.2021 13:33, Emanuele Giuseppe Esposito wrote: Attaching gdbserver implies that the qmp socket should wait indefinitely for an answer from QEMU. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH 5/6] block/nbd: Do not force-cap *pnum

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
21.06.2021 21:53, Eric Blake wrote: On Sat, Jun 19, 2021 at 01:53:24PM +0300, Vladimir Sementsov-Ogievskiy wrote: +++ b/block/nbd.c @@ -1702,7 +1702,7 @@ static int coroutine_fn nbd_client_co_block_status( .type = NBD_CMD_BLOCK_STATUS, .from = offset, .len =

Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
21.06.2021 12:30, Emanuele Giuseppe Esposito wrote: On 19/06/2021 22:06, Vladimir Sementsov-Ogievskiy wrote: 14.06.2021 10:33, Emanuele Giuseppe Esposito wrote: By adding acquire/release pairs, we ensure that .ret and .error_is_read fields are written by block_copy_dirty_clusters before

Re: [PATCH RFC] meson: add option to use zstd for qcow2 compression by default

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
21.06.2021 18:59, Kevin Wolf wrote: Am 21.06.2021 um 10:22 hat Paolo Bonzini geschrieben: On 17/06/21 21:51, Vladimir Sementsov-Ogievskiy wrote: So, it's an RFC. I also can split the patch so that refactoring of qcow2_co_create() go in a separate preparation patch. Another RFC question,

Re: [PATCH RFC] meson: add option to use zstd for qcow2 compression by default

2021-06-22 Thread Paolo Bonzini
On 22/06/21 12:16, Vladimir Sementsov-Ogievskiy wrote: Yes, this is more extensible. Looks good, I'll try. I'm just not familiar with it and followed the pattern of zstd option. You can look at -Dmalloc for an example. Paolo

Re: [PATCH v4 6/6] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
22.06.2021 13:20, Paolo Bonzini wrote: On 22/06/21 11:36, Vladimir Sementsov-Ogievskiy wrote: It does.  If it returns true, you still want the load of finished to happen before the reads that follow. Hmm.. The worst case if we use just qatomic_read is that assertion will not crash when it

Re: [PATCH RFC] docs: document file-posix locking protocol

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
Ping. Any thoughts? 24.05.2021 17:40, Vladimir Sementsov-Ogievskiy wrote: Ping. We need to synchronize access to qcow2 images between Qemu and our internal program. For this solution to be reliable, the locking protocol should be documented at least.. 22.03.2021 21:27, Vladimir

[PATCH] block/ssh: add support for sha256 host key fingerprints

2021-06-22 Thread Daniel P . Berrangé
Currently the SSH block driver supports MD5 and SHA1 for host key fingerprints. This is a cryptographically sensitive operation and so these hash algorithms are inadequate by modern standards. This adds support for SHA256 which has been supported in libssh since the 0.8.1 release. Signed-off-by:

Re: [PATCH] block/ssh: add support for sha256 host key fingerprints

2021-06-22 Thread Philippe Mathieu-Daudé
On 6/22/21 1:51 PM, Daniel P. Berrangé wrote: > Currently the SSH block driver supports MD5 and SHA1 for host key > fingerprints. This is a cryptographically sensitive operation and > so these hash algorithms are inadequate by modern standards. This > adds support for SHA256 which has been

Re: [PATCH v2] block/nvme: Fix VFIO_MAP_DMA failed: No space left on device

2021-06-22 Thread Philippe Mathieu-Daudé
On 6/22/21 10:06 AM, Philippe Mathieu-Daudé wrote: > On 6/22/21 9:29 AM, Philippe Mathieu-Daudé wrote: >> On 6/21/21 5:36 PM, Fam Zheng wrote: On 21 Jun 2021, at 16:13, Philippe Mathieu-Daudé wrote: On 6/21/21 3:18 PM, Fam Zheng wrote: >> On 21 Jun 2021, at 10:32, Philippe

Re: [PATCH v2] block/nvme: Fix VFIO_MAP_DMA failed: No space left on device

2021-06-22 Thread Fam Zheng
> On 22 Jun 2021, at 13:42, Philippe Mathieu-Daudé wrote: > > On 6/22/21 10:06 AM, Philippe Mathieu-Daudé wrote: >> On 6/22/21 9:29 AM, Philippe Mathieu-Daudé wrote: >>> On 6/21/21 5:36 PM, Fam Zheng wrote: > On 21 Jun 2021, at 16:13, Philippe Mathieu-Daudé > wrote: > On 6/21/21

Re: [PATCH RFC] docs: document file-posix locking protocol

2021-06-22 Thread Daniel P . Berrangé
On Mon, Mar 22, 2021 at 09:27:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Let's document how we use file locks in file-posix driver, to allow > external programs to "communicate" in this way with Qemu. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > Hi all! > > We need to

Re: [PATCH] block/ssh: add support for sha256 host key fingerprints

2021-06-22 Thread Richard W.M. Jones
On Tue, Jun 22, 2021 at 12:51:56PM +0100, Daniel P. Berrangé wrote: > Currently the SSH block driver supports MD5 and SHA1 for host key > fingerprints. This is a cryptographically sensitive operation and > so these hash algorithms are inadequate by modern standards. This > adds support for SHA256

Running iotest linters from check-python-* CI jobs

2021-06-22 Thread John Snow
Hi Kevin: At one point I had the idea to augment the Python linter CI jobs to also run the iotest linters. I thought it would be convenient to ensure that while I changed around the QMP and Machine packages that I didn't introduce regressions in iotest 297 either. I sent an RFC, got

Re: [PATCH 1/4] export/fuse: Add allow-other option

2021-06-22 Thread Kevin Wolf
Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: > Without the allow_other mount option, no user (not even root) but the > one who started qemu/the storage daemon can access the export. Allow > users to configure the export such that such accesses are possible. > > When we do pass allow_other,

Re: [PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-22 Thread Kevin Wolf
Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: > Allow changing the file mode, UID, and GID through SETATTR. > > This only really makes sense with allow-other, though (because without > it, the effective access mode is fixed to be 0600 (u+rw) with qemu's > user being the file's owner), so

Re: [PATCH 2/4] export/fuse: Give SET_ATTR_SIZE its own branch

2021-06-22 Thread Kevin Wolf
Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: > In order to support changing other attributes than the file size in > fuse_setattr(), we have to give each its own independent branch. This > also applies to the only attribute we do support right now. > > Signed-off-by: Max Reitz

Re: [PATCH 4/4] iotests/308: Test allow-other

2021-06-22 Thread Kevin Wolf
Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: > We cannot reasonably test the main point of allow-other, which is to > allow users other than the current one to access the FUSE export, > because that would require access to sudo, which this test most likely > will not have. (Also, we would

Re: [PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-22 Thread Max Reitz
On 22.06.21 17:02, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: Allow changing the file mode, UID, and GID through SETATTR. This only really makes sense with allow-other, though (because without it, the effective access mode is fixed to be 0600 (u+rw) with qemu's user

Re: [PATCH 4/4] iotests/308: Test allow-other

2021-06-22 Thread Max Reitz
On 22.06.21 17:08, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: We cannot reasonably test the main point of allow-other, which is to allow users other than the current one to access the FUSE export, because that would require access to sudo, which this test most likely

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Kevin Wolf
Am 11.06.2021 um 21:03 hat Eric Blake geschrieben: > To save the user from having to check 'qemu-img info --backing-chain' > or other followup command to determine which "depth":n goes beyond the > chain, add a boolean field "backing" that is set only for unallocated > portions of the disk. > >

Re: [PATCH 2/4] Python QEMU utils: introduce a generic feature list

2021-06-22 Thread John Snow
On 6/8/21 10:09 AM, Cleber Rosa wrote: Which can be used to check for any "feature" that is available as a QEMU command line option, and that will return its list of available options. This is a generalization of the list_accel() utility function, which is itself re-implemented in terms of the

Re: [PATCH v6 01/16] python: qemu: add timer parameter for qmp.accept socket

2021-06-22 Thread John Snow
On 6/21/21 6:33 AM, Emanuele Giuseppe Esposito wrote: Also add a new _qmp_timer field to the QEMUMachine class. Let's change the default socket timeout to None, so that if a subclass needs to add a timer, it can be done by modifying this private field. At the same time, restore the timer to be

[PATCH] block: BDRV_O_NO_IO for backing file on creation

2021-06-22 Thread Max Reitz
When creating an image file with a backing file, we generally try to open the backing file (unless -u was specified), mostly to verify that it is there, but also to get the file size if none was specified for the new image. For neither of these things do we need data I/O, and so we can pass

Re: [PATCH v3 02/24] modules: collect module meta-data

2021-06-22 Thread Paolo Bonzini
On 21/06/21 14:52, Gerd Hoffmann wrote: ninja: error: 'libui-curses.a.p/meson-generated_.._config-host.h.o', needed by 'ui-curses.modinfo.test', missing and no known rule to make it Hmm, not sure where this comes from. meson doesn't try to link config-host.h.o into libui-curses.a, so why does

Re: Running iotest linters from check-python-* CI jobs

2021-06-22 Thread Max Reitz
On 22.06.21 16:57, John Snow wrote: Hi Kevin: At one point I had the idea to augment the Python linter CI jobs to also run the iotest linters. I thought it would be convenient to ensure that while I changed around the QMP and Machine packages that I didn't introduce regressions in iotest 297