Re: [PATCH 1/3] docs/vhost-user: Clarifications for VHOST_USER_ADD/REM_MEM_REG

2022-04-08 Thread Raphael Norwitz
On Thu, Apr 07, 2022 at 03:36:55PM +0200, Kevin Wolf wrote: > The specification for VHOST_USER_ADD/REM_MEM_REG messages is unclear > in several points, which has led to clients having incompatible > implementations. This changes the specification to be more explicit > about them: > > *

Re: [PATCH 3/3] vhost-user: Don't pass file descriptor for VHOST_USER_REM_MEM_REG

2022-04-08 Thread Raphael Norwitz
On Thu, Apr 07, 2022 at 03:36:57PM +0200, Kevin Wolf wrote: > The spec clarifies now that QEMU should not send a file descriptor in a > request to remove a memory region. Change it accordingly. > > For libvhost-user, this is a bug fix that makes it compatible with > rust-vmm's implementation that

Re: [PATCH 2/3] libvhost-user: Fix extra vu_add/rem_mem_reg reply

2022-04-08 Thread Raphael Norwitz
On Thu, Apr 07, 2022 at 03:36:56PM +0200, Kevin Wolf wrote: > Outside of postcopy mode, neither VHOST_USER_ADD_MEM_REG nor > VHOST_USER_REM_MEM_REG are supposed to send a reply unless explicitly > requested with the need_reply flag. Their current implementation always > sends a reply, even if it

Re: [PATCH v2 2/3] qapi: nbd-export: allow select bitmaps by node/name pair

2022-04-08 Thread Vladimir Sementsov-Ogievskiy
17.03.2022 00:28, Eric Blake wrote: +++ b/qapi/block-export.json @@ -6,6 +6,7 @@ ## { 'include': 'sockets.json' } +{ 'include': 'block-core.json' } Hmm. Does this extra inclusion negatively impact qemu-storage-daemon, since that is why we created block-export.json in the first place

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Richard W.M. Jones
On Fri, Apr 08, 2022 at 08:45:56PM +0300, Nir Soffer wrote: > On Fri, Apr 8, 2022 at 6:47 PM Eric Blake wrote: > > > > On Fri, Apr 08, 2022 at 04:48:59PM +0300, Nir Soffer wrote: > ... > > > > BTW attached is an nbdkit plugin that creates an NBD server that > > > > responds with massive numbers

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Nir Soffer
On Fri, Apr 8, 2022 at 6:47 PM Eric Blake wrote: > > On Fri, Apr 08, 2022 at 04:48:59PM +0300, Nir Soffer wrote: ... > > > BTW attached is an nbdkit plugin that creates an NBD server that > > > responds with massive numbers of byte-granularity extents, in case > > > anyone wants to test how

[RFC 0/2] introduce QEMUMachind.cmd()

2022-04-08 Thread Vladimir Sementsov-Ogievskiy
Hi all! I always dreamed about getting rid of pattern result = self.vm.qmp(...) self.assert_qmp(result, 'return', {}) Here is a suggestion to switch to self.vm.cmd(...) pattern instead. I'm not sure we really want to update so many tests. May be just commit patch 01, and use new

[PATCH 1/2] python/machine.py: upgrade vm.command() method

2022-04-08 Thread Vladimir Sementsov-Ogievskiy
The method is not popular, we prefer use vm.qmp() and then check success by hand.. But that's not optimal. To simplify movement to vm.command() support same interface improvements like in vm.qmp() and rename to shorter vm.cmd(). Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Eric Blake
On Fri, Apr 08, 2022 at 04:48:59PM +0300, Nir Soffer wrote: > On Fri, Apr 8, 2022 at 2:52 PM Richard W.M. Jones wrote: > > > > On Fri, Apr 08, 2022 at 09:25:01AM +0200, Wouter Verhelst wrote: > > > Hi Eric, > > > > > > On Thu, Apr 07, 2022 at 04:37:19PM -0500, Eric Blake wrote: > > > > The spec

Re: [PATCH v4 7/7] iotests: copy-before-write: add cases for cbw-timeout option

2022-04-08 Thread Hanna Reitz
On 07.04.22 15:27, Vladimir Sementsov-Ogievskiy wrote: Add two simple test-cases: timeout failure with break-snapshot-on-cbw-error behavior and similar with break-guest-write-on-cbw-error behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/copy-before-write

Re: [PATCH v4 3/7] iotests: add copy-before-write: on-cbw-error tests

2022-04-08 Thread Hanna Reitz
On 07.04.22 15:27, Vladimir Sementsov-Ogievskiy wrote: Add tests for new option of copy-before-write filter: on-cbw-error. Note that we use QEMUMachine instead of VM class, because in further commit we'll want to use throttling which doesn't work with -accel qtest used by VM. We also touch

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Richard W.M. Jones
On Fri, Apr 08, 2022 at 04:48:59PM +0300, Nir Soffer wrote: > This is a malicious server. A good client will drop the connection when > receiving the first 1 byte chunk. > > The real issue here is not enforcing or suggesting a limit on the number of > extent the server returns, but enforcing a

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Nir Soffer
On Fri, Apr 8, 2022 at 2:52 PM Richard W.M. Jones wrote: > > On Fri, Apr 08, 2022 at 09:25:01AM +0200, Wouter Verhelst wrote: > > Hi Eric, > > > > On Thu, Apr 07, 2022 at 04:37:19PM -0500, Eric Blake wrote: > > > The spec was silent on how many extents a server could reply with. > > > However,

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Richard W.M. Jones
On Fri, Apr 08, 2022 at 12:52:44PM +0100, Richard W.M. Jones wrote: > From experimentation I found this really hurts my laptop :-( ... because of a memory leak in the nbdkit Python bindings as it turned out. This function: > def extents(h, count, offset, flags): > e = [(i, 1, typ(i)) for i

Re: [Libguestfs] [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Richard W.M. Jones
On Fri, Apr 08, 2022 at 09:25:01AM +0200, Wouter Verhelst wrote: > Hi Eric, > > On Thu, Apr 07, 2022 at 04:37:19PM -0500, Eric Blake wrote: > > The spec was silent on how many extents a server could reply with. > > However, both qemu and nbdkit (the two server implementations known to > > have

Re: [PATCH 1/2] spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length

2022-04-08 Thread Wouter Verhelst
Hi Eric, On Thu, Apr 07, 2022 at 04:37:19PM -0500, Eric Blake wrote: > The spec was silent on how many extents a server could reply with. > However, both qemu and nbdkit (the two server implementations known to > have implemented the NBD_CMD_BLOCK_STATUS extension) implement a hard > cap, and