<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/scsi, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/scsi?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/scsi?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2023-12-31T08:11:29Z</updated>
<entry>
<title>configure, meson: rename targetos to host_os</title>
<updated>2023-12-31T08:11:29Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-11-03T08:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=d0cda6f461fd33c5f9b063781c63c1ce5fd3fa3b'/>
<id>urn:sha1:d0cda6f461fd33c5f9b063781c63c1ce5fd3fa3b</id>
<content type='text'>
This variable is about the host OS, not the target.  It is used a lot
more since the Meson conversion, but the original sin dates back to 2003.
Time to fix it.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>meson: remove OS definitions from config_targetos</title>
<updated>2023-12-31T08:11:28Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-05-26T10:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=53e8868d69c195b6b57ccc6847057043c26df1b6'/>
<id>urn:sha1:53e8868d69c195b6b57ccc6847057043c26df1b6</id>
<content type='text'>
CONFIG_DARWIN, CONFIG_LINUX and CONFIG_BSD are used in some rules, but
only CONFIG_LINUX has substantial use.  Convert them all to if...endif.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>io: follow coroutine AioContext in qio_channel_yield()</title>
<updated>2023-09-08T01:32:11Z</updated>
<author>
<name>Stefan Hajnoczi</name>
<email>stefanha@redhat.com</email>
</author>
<published>2023-08-30T22:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=06e0f098d612df79597de58121dadf6f5f375d04'/>
<id>urn:sha1:06e0f098d612df79597de58121dadf6f5f375d04</id>
<content type='text'>
The ongoing QEMU multi-queue block layer effort makes it possible for multiple
threads to process I/O in parallel. The nbd block driver is not compatible with
the multi-queue block layer yet because QIOChannel cannot be used easily from
coroutines running in multiple threads. This series changes the QIOChannel API
to make that possible.

In the current API, calling qio_channel_attach_aio_context() sets the
AioContext where qio_channel_yield() installs an fd handler prior to yielding:

  qio_channel_attach_aio_context(ioc, my_ctx);
  ...
  qio_channel_yield(ioc); // my_ctx is used here
  ...
  qio_channel_detach_aio_context(ioc);

This API design has limitations: reading and writing must be done in the same
AioContext and moving between AioContexts involves a cumbersome sequence of API
calls that is not suitable for doing on a per-request basis.

There is no fundamental reason why a QIOChannel needs to run within the
same AioContext every time qio_channel_yield() is called. QIOChannel
only uses the AioContext while inside qio_channel_yield(). The rest of
the time, QIOChannel is independent of any AioContext.

In the new API, qio_channel_yield() queries the AioContext from the current
coroutine using qemu_coroutine_get_aio_context(). There is no need to
explicitly attach/detach AioContexts anymore and
qio_channel_attach_aio_context() and qio_channel_detach_aio_context() are gone.
One coroutine can read from the QIOChannel while another coroutine writes from
a different AioContext.

This API change allows the nbd block driver to use QIOChannel from any thread.
It's important to keep in mind that the block driver already synchronizes
QIOChannel access and ensures that two coroutines never read simultaneously or
write simultaneously.

This patch updates all users of qio_channel_attach_aio_context() to the
new API. Most conversions are simple, but vhost-user-server requires a
new qemu_coroutine_yield() call to quiesce the vu_client_trip()
coroutine when not attached to any AioContext.

While the API is has become simpler, there is one wart: QIOChannel has a
special case for the iohandler AioContext (used for handlers that must not run
in nested event loops). I didn't find an elegant way preserve that behavior, so
I added a new API called qio_channel_set_follow_coroutine_ctx(ioc, true|false)
for opting in to the new AioContext model. By default QIOChannel uses the
iohandler AioHandler. Code that formerly called
qio_channel_attach_aio_context() now calls
qio_channel_set_follow_coroutine_ctx(ioc, true) once after the QIOChannel is
created.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Acked-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-ID: &lt;20230830224802.493686-5-stefanha@redhat.com&gt;
[eblake: also fix migration/rdma.c]
Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
</content>
</entry>
<entry>
<title>scsi/qemu-pr-helper: Drop support for 'old' libmultipath API</title>
<updated>2023-06-06T08:31:31Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2023-06-05T17:41:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=6b40847ab40dba9eb1b2b0c530fcb7d484966d74'/>
<id>urn:sha1:6b40847ab40dba9eb1b2b0c530fcb7d484966d74</id>
<content type='text'>
Commit 1b0578f5c4 ("qemu-pr-helper: Fix build on CentOS 7") added
code to probe for 'old' libmultipath API on CentOS 7. However since
merge commit 8c345b3e6a (June 2021) we don't build/test CentOS 7 as
it felt out of our list of supported distrib versions. Therefore we
can safely remove the 'old' API check (mostly reverting commit
1b0578f5c4, except the code got converted to meson in commit
6ec0e15d95 "meson: move libmpathpersist test").

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20230605174146.87440-2-philmd@linaro.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>qemu-pr-helper: mark more coroutine_fns</title>
<updated>2023-04-25T11:17:28Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-03-09T08:44:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=70bd77bea50b08362d66b634e9c66739dfddd949'/>
<id>urn:sha1:70bd77bea50b08362d66b634e9c66739dfddd949</id>
<content type='text'>
do_sgio can suspend via the coroutine function thread_pool_submit_co, so it
has to be coroutine_fn as well---and the same is true of all its direct and
indirect callers.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20230309084456.304669-7-pbonzini@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>thread-pool: avoid passing the pool parameter every time</title>
<updated>2023-04-25T11:17:28Z</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
<email>eesposit@redhat.com</email>
</author>
<published>2023-02-03T13:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=aef04fc79084fe340c931679413eb6070f2f13ca'/>
<id>urn:sha1:aef04fc79084fe340c931679413eb6070f2f13ca</id>
<content type='text'>
thread_pool_submit_aio() is always called on a pool taken from
qemu_get_current_aio_context(), and that is the only intended
use: each pool runs only in the same thread that is submitting
work to it, it can't run anywhere else.

Therefore simplify the thread_pool_submit* API and remove the
ThreadPool function parameter.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20230203131731.851116-5-eesposit@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>io: Add support for MSG_PEEK for socket channel</title>
<updated>2023-02-06T18:22:56Z</updated>
<author>
<name>manish.mishra</name>
<email>manish.mishra@nutanix.com</email>
</author>
<published>2022-12-20T18:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=84615a19ddf2bfb38d7b3a0d487d2397ee55e4f3'/>
<id>urn:sha1:84615a19ddf2bfb38d7b3a0d487d2397ee55e4f3</id>
<content type='text'>
MSG_PEEK peeks at the channel, The data is treated as unread and
the next read shall still return this data. This support is
currently added only for socket class. Extra parameter 'flags'
is added to io_readv calls to pass extra read flags like MSG_PEEK.

Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Reviewed-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Suggested-by: Daniel P. Berrange &lt;berrange@redhat.com&gt;
Signed-off-by: manish.mishra &lt;manish.mishra@nutanix.com&gt;
Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>QIOChannel: Add flags on io_writev and introduce io_flush callback</title>
<updated>2022-05-16T12:56:24Z</updated>
<author>
<name>Leonardo Bras</name>
<email>leobras@redhat.com</email>
</author>
<published>2022-05-13T06:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=b88651cb4d4fa416fdbb6afaf5b26ec8c035eaad'/>
<id>urn:sha1:b88651cb4d4fa416fdbb6afaf5b26ec8c035eaad</id>
<content type='text'>
Add flags to io_writev and introduce io_flush as optional callback to
QIOChannelClass, allowing the implementation of zero copy writes by
subclasses.

How to use them:
- Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY),
- Wait write completion with qio_channel_flush().

Notes:
As some zero copy write implementations work asynchronously, it's
recommended to keep the write buffer untouched until the return of
qio_channel_flush(), to avoid the risk of sending an updated buffer
instead of the buffer state during write.

As io_flush callback is optional, if a subclass does not implement it, then:
- io_flush will return 0 without changing anything.

Also, some functions like qio_channel_writev_full_all() were adapted to
receive a flag parameter. That allows shared code between zero copy and
non-zero copy writev, and also an easier implementation on new flags.

Signed-off-by: Leonardo Bras &lt;leobras@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Message-Id: &lt;20220513062836.965425-3-leobras@redhat.com&gt;
Signed-off-by: Dr. David Alan Gilbert &lt;dgilbert@redhat.com&gt;
</content>
</entry>
<entry>
<title>util: replace qemu_get_local_state_pathname()</title>
<updated>2022-04-21T13:09:09Z</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2022-04-20T13:26:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=1fbf2665e6773d87657c2a1654d9bf272a4f1ec0'/>
<id>urn:sha1:1fbf2665e6773d87657c2a1654d9bf272a4f1ec0</id>
<content type='text'>
Simplify the function to only return the directory path. Callers are
adjusted to use the GLib function to build paths, g_build_filename().

Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-Id: &lt;20220420132624.2439741-39-marcandre.lureau@redhat.com&gt;
</content>
</entry>
<entry>
<title>include: rename qemu-common.h qemu/help-texts.h</title>
<updated>2022-04-21T12:58:24Z</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2022-04-20T13:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=49f95221935db33a3636888860f5006070e09dc8'/>
<id>urn:sha1:49f95221935db33a3636888860f5006070e09dc8</id>
<content type='text'>
Suggested-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Warner Losh &lt;imp@bsdimp.com&gt;
Message-Id: &lt;20220420132624.2439741-7-marcandre.lureau@redhat.com&gt;
</content>
</entry>
</feed>
