On 03.05.22 20:50, Eric Blake wrote:
On Tue, May 03, 2022 at 04:55:29PM +0200, Hanna Reitz wrote:
Add some (optional) information that the file driver can provide for
image files, namely the extent size.
Signed-off-by: Hanna Reitz
---
qapi/block-core.json | 26 --
bl
Hi all,
Last few months ago, VDUSE (vDPA Device in Userspace) [1] has
been merged into Linux kernel as a framework that make it
possible to emulate a vDPA device in userspace. This series
aimed at implementing a VDUSE block backend based on the
qemu-storage-daemon infrastructure.
To support that,
This adds vduse header to linux headers so that the
relevant VDUSE API can be used in subsequent patches.
Signed-off-by: Xie Yongji
---
linux-headers/linux/vduse.h | 306
scripts/update-linux-headers.sh | 2 +-
2 files changed, 307 insertions(+), 1 deletion
This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.
Signed-off-by: Xie Yongji
---
block/block-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index e0e1aff4b1..35457a6a1d 10
Support getting the guest block size for the block backend.
It's needed for the following commit.
Signed-off-by: Xie Yongji
---
block/block-backend.c | 6 ++
include/sysemu/block-backend-io.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/block/block-backend.c b/block/bloc
This implements a VDUSE block backends based on
the libvduse library. We can use it to export the BDSs
for both VM and container (host) usage.
The new command-line syntax is:
$ qemu-storage-daemon \
--blockdev file,node-name=drive0,filename=test.img \
--export vduse-blk,node-name=drive0,i
Abstract the common logic of virtio-blk I/O process to a function
named virtio_blk_process_req(). It's needed for the following commit.
Signed-off-by: Xie Yongji
---
MAINTAINERS | 2 +
block/export/meson.build | 2 +-
block/export/vhost-user-blk-server.c
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
---
block/export/vduse-
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
block/export/vduse-blk.c | 20
1 file change
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by: Xie Yongji
---
MAIN
Am 03.05.2022 um 16:55 hat Hanna Reitz geschrieben:
> When a block driver supports obtaining format-specific information, but
> that object only contains optional fields, it is possible that none of
> them are present, so that dump_qobject() (called by
> bdrv_image_info_specific_dump()) will not pr
Am 03.05.2022 um 16:55 hat Hanna Reitz geschrieben:
> The ImageInfo object currently only contains (optional) format-specific
> image information. However, perhaps the protocol node can provide some
> additional information, so add a new field presenting it.
>
> Signed-off-by: Hanna Reitz
> ---
Am 03.05.2022 um 16:55 hat Hanna Reitz geschrieben:
> Add some (optional) information that the file driver can provide for
> image files, namely the extent size.
>
> Signed-off-by: Hanna Reitz
> ---
> qapi/block-core.json | 26 --
> block/file-posix.c | 30 +
On 04.05.22 10:36, Kevin Wolf wrote:
Am 03.05.2022 um 16:55 hat Hanna Reitz geschrieben:
The ImageInfo object currently only contains (optional) format-specific
image information. However, perhaps the protocol node can provide some
additional information, so add a new field presenting it.
Sign
On 04.05.22 10:46, Kevin Wolf wrote:
Am 03.05.2022 um 16:55 hat Hanna Reitz geschrieben:
Add some (optional) information that the file driver can provide for
image files, namely the extent size.
Signed-off-by: Hanna Reitz
---
qapi/block-core.json | 26 --
block/file-
Leonardo Bras writes:
> Add property that allows zero-copy migration of memory pages
> on the sending side, and also includes a helper function
> migrate_use_zero_copy_send() to check if it's enabled.
>
> No code is introduced to actually do the migration, but it allow
> future implementations to
On Tue, Apr 26, 2022 at 04:51:06AM -0400, Emanuele Giuseppe Esposito wrote:
> This is a new attempt to replace the need to take the AioContext lock to
> protect graph modifications. In particular, we aim to remove
> (or better, substitute) the AioContext around bdrv_replace_child_noperm,
> since th
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 isn't requested. This confuses the master
because it will interpret th
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:
* VHOST_USER_ADD_MEM_REG is not specified as receiving a file
descriptor, though it
From: Hanna Reitz
VMDK disk data is stored in extents, which may or may not be separate
from bs->file. VmdkExtent.file points to where they are stored. Each
that is stored in bs->file will simply reuse the exact pointer value of
bs->file.
(That is why vmdk_free_extents() will unref VmdkExtent.
From: "Denis V. Lunev"
Simple grep for the .bdrv_co_check callback presence gives the following
list of block drivers
* QED
* VDI
* VHDX
* VMDK
* Parallels
which have this callback. The presense of the callback means that
consistency check is supported.
The patch updates documentation accordingl
The following changes since commit 2e3408b3cc7de4e87a9adafc8c19bfce3abec947:
Merge tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu into
staging (2022-05-03 09:13:17 -0700)
are available in the Git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch
From: Hanna Reitz
This function is safe to call in an I/O context, and qcow2_do_open()
does so (invoked in an I/O context by qcow2_co_invalidate_cache()).
Signed-off-by: Hanna Reitz
Message-Id: <20220427114057.36651-2-hre...@redhat.com>
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
i
From: Hanna Reitz
Create a VM with a BDS in an iothread, add -incoming defer to the
command line, and then export this BDS via NBD. Doing so should not
fail an assertion.
Signed-off-by: Hanna Reitz
Message-Id: <20220427114057.36651-5-hre...@redhat.com>
Reviewed-by: Eric Blake
Tested-by: Eric
From: Hanna Reitz
This reverts commit b1c073490553f80594b903ceedfc7c1aef6b1b19. (We
wanted to do so once the 7.1 tree opens, which has happened. The issue
reported in https://gitlab.com/qemu-project/qemu/-/issues/945 should be
fixed by the preceding patches.)
Signed-off-by: Hanna Reitz
Messag
From: Hanna Reitz
qcow2_co_invalidate_cache() closes and opens the qcow2 file, by calling
qcow2_close() and qcow2_do_open(). These two functions must thus be
usable from both a global-state and an I/O context.
As they are, they are not safe to call in an I/O context, because they
use bdrv_unref
From: Stefan Hajnoczi
Thread-Local Storage variables cannot be used directly from coroutine
code because the compiler may optimize TLS variable accesses across
qemu_coroutine_yield() calls. When the coroutine is re-entered from
another thread the TLS variables from the old thread must no longer b
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 doesn't send a file descriptor. Keep
accepting, but ignoring a file de
From: Stefan Hajnoczi
Thread-Local Storage variables cannot be used directly from coroutine
code because the compiler may optimize TLS variable accesses across
qemu_coroutine_yield() calls. When the coroutine is re-entered from
another thread the TLS variables from the old thread must no longer b
From: Hanna Reitz
This should work for all format drivers that support reopening, so test
it.
(This serves as a regression test for HEAD^: This test used to fail for
VMDK before HEAD^.)
Signed-off-by: Hanna Reitz
Message-Id: <20220314162719.65384-3-hre...@redhat.com>
Signed-off-by: Kevin Wolf
From: Stefan Hajnoczi
Thread-Local Storage variables cannot be used directly from coroutine
code because the compiler may optimize TLS variable accesses across
qemu_coroutine_yield() calls. When the coroutine is re-entered from
another thread the TLS variables from the old thread must no longer b
On Wed, May 4, 2022 at 7:48 AM Markus Armbruster wrote:
>
> Leonardo Bras writes:
>
> > Add property that allows zero-copy migration of memory pages
> > on the sending side, and also includes a helper function
> > migrate_use_zero_copy_send() to check if it's enabled.
> >
> > No code is introduce
From: Marc-André Lureau
Hi,
Perhaps the last series of preliminary patches before I propose a longer series
to add qemu-common & qga meson subprojects. That's why they are mostly
QGA-related cleanups.
Thanks for the reviews!
Marc-André Lureau (16):
include: move qemu_*_exec_dir() to cutils
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
tests/qtest/libqmp.h | 2 ++
tests/qtest/libqmp.c | 35 +--
2 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/tests/qtest/libqmp.h b/tests/qtest/libqmp.h
index 94aa97328a17..772f18b73ba3
From: Marc-André Lureau
The function is required by get_relocated_path() (already in cutils),
and used by qemu-ga and may be generally useful.
Signed-off-by: Marc-André Lureau
---
include/qemu/cutils.h| 7 ++
include/qemu/osdep.h | 8 --
qemu-io.c
From: Marc-André Lureau
clang has this default warning which QEMU codes triggers in many
situations. However, other projects in general may not want to disable
globally the warning but only in limited specific code blocks.
Signed-off-by: Marc-André Lureau
---
include/qemu/compiler.h | 11 +
From: Marc-André Lureau
SHGetFolderPath() is a deprecated API:
https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha
It is a wrapper for SHGetKnownFolderPath() and CSIDL_COMMON_PATH is
mapped to FOLDERID_ProgramData:
https://docs.microsoft.com/en-us/windo
From: Marc-André Lureau
This a more accurate way to lookup the test data, and will allow to move
the test in a subproject.
Signed-off-by: Marc-André Lureau
---
tests/unit/test-qga.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tests/unit/test-qga.c b/tests/un
From: Marc-André Lureau
The function takes care of setting CLOEXEC, and reporting error.
Signed-off-by: Marc-André Lureau
---
qga/commands-posix.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 98d481a58485..974
From: Marc-André Lureau
Used in the next patch, to simplify qga code.
Signed-off-by: Marc-André Lureau
---
include/qemu/osdep.h | 1 +
util/osdep.c | 10 --
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 67cc465
From: Marc-André Lureau
Silence the clang warning when building the code with default clang,
outside of QEMU.
Signed-off-by: Marc-André Lureau
---
qobject/json-lexer.c | 4
1 file changed, 4 insertions(+)
diff --git a/qobject/json-lexer.c b/qobject/json-lexer.c
index 632320d72d5d..955ce0
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
include/qemu/help-texts.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/qemu/help-texts.h b/include/qemu/help-texts.h
index ba32cc8b1f39..4f265fed8df1 100644
--- a/include/qemu/help-texts.h
+++ b/incl
From: Marc-André Lureau
There is a bit too much branching in the function, this can be
simplified a bit, and have a common exit point thanks to ERRP_PROPAGATE.
This also helps with the following error handling changes.
Signed-off-by: Marc-André Lureau
---
qga/commands-posix.c | 126 ++
From: Marc-André Lureau
Sometime, ERRP_GUARD() isn't what you are looking for, because the
function doesn't throw errors, yet auto-cleaning is nice to have.
Signed-off-by: Marc-André Lureau
---
include/qapi/error.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/qapi/error.h b/in
From: Marc-André Lureau
No clear reason to make guesses here.
Signed-off-by: Marc-André Lureau
---
qga/installer/qemu-ga.wxs | 9 -
1 file changed, 9 deletions(-)
diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index 8a19aa165651..651db6e51cda 100644
--- a/qga/insta
From: Marc-André Lureau
qemu_open_old() uses qemu_open_internal() which handles special
"/dev/fdset/" path for monitor fd sets, set CLOEXEC, and uses Error
reporting (and some O_DIRECT special error casing).
The monitor fdset handling is unnecessary for qga, use
qemu_open_cloexec() instead.
Sig
From: Marc-André Lureau
No need to setup an environment or to check if the variable is undefined
manually.
Signed-off-by: Marc-André Lureau
---
qga/installer/qemu-ga.wxs | 30 +-
qga/meson.build | 9 -
2 files changed, 13 insertions(+), 26 deletio
From: Marc-André Lureau
Sadly, wixl doesn't have 'elif'.
Signed-off-by: Marc-André Lureau
---
qga/installer/qemu-ga.wxs | 20 +++-
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index 651db6e51cda..e5b0958e18
From: Marc-André Lureau
Use more conventional variables to set the location of pre-built
DLL/bin.
Signed-off-by: Marc-André Lureau
---
configure | 9 ++---
meson.build | 5 -
qga/installer/qemu-ga.wxs | 24
qga/meson.build
Am 04.05.22 um 19:30 schrieb marcandre.lur...@redhat.com:
From: Marc-André Lureau
SHGetFolderPath() is a deprecated API:
https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha
It is a wrapper for SHGetKnownFolderPath() and CSIDL_COMMON_PATH is
mapped to
Am 04.05.22 um 19:30 schrieb marcandre.lur...@redhat.com:
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
include/qemu/help-texts.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/qemu/help-texts.h b/include/qemu/help-texts.h
index ba32cc8b1f39.
On 04/05/2022 19.30, marcandre.lur...@redhat.com wrote:
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
tests/qtest/libqmp.h | 2 ++
tests/qtest/libqmp.c | 35 +--
2 files changed, 31 insertions(+), 6 deletions(-)
Reviewed-by: Thomas Huth
On Wed, 4 May 2022 at 18:36, wrote:
>
> From: Marc-André Lureau
>
> clang has this default warning which QEMU codes triggers in many
> situations. However, other projects in general may not want to disable
> globally the warning but only in limited specific code blocks.
>
> Signed-off-by: Marc-An
Add property that allows zero-copy migration of memory pages
on the sending side, and also includes a helper function
migrate_use_zero_copy_send() to check if it's enabled.
No code is introduced to actually do the migration, but it allow
future implementations to enable/disable this feature.
On n
A lot of places check parameters.tls_creds in order to evaluate if TLS is
in use, and sometimes call migrate_get_current() just for that test.
Add new helper function migrate_use_tls() in order to simplify testing
for TLS usage.
Signed-off-by: Leonardo Bras
Reviewed-by: Juan Quintela
Reviewed-b
Even though multifd_send_sync_main() currently emits error_reports, it's
callers don't really check it before continuing.
Change multifd_send_sync_main() to return -1 on error and 0 on success.
Also change all it's callers to make use of this change and possibly fail
earlier.
(This change is impo
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().
No
This patch series intends to enable MSG_ZEROCOPY in QIOChannel, and make
use of it for multifd migration performance improvement, by reducing cpu
usage.
Patch #1 creates new callbacks for QIOChannel, allowing the implementation
of zero copy writing.
Patch #2 implements io_writev flags and io_flus
For CONFIG_LINUX, implement the new zero copy flag and the optional callback
io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY
feature is available in the host kernel, which is checked on
qio_channel_socket_connect_sync()
qio_channel_socket_flush() was implemented by counting how
Since d48c3a0445 ("multifd: Use a single writev on the send side"),
sending the header packet and the memory pages happens in the same
writev, which can potentially make the migration faster.
Using channel-socket as example, this works well with the default copying
mechanism of sendmsg(), but with
Implement zero copy send on nocomp_send_write(), by making use of QIOChannel
writev + flags & flush interface.
Change multifd_send_sync_main() so flush_zero_copy() can be called
after each iteration in order to make sure all dirty pages are sent before
a new iteration is started. It will also flus
Howdy!
So, I want to finally delete python/qemu/qmp from qemu.git, and this
creates a small problem -- namely, iotests needs access to it in order
to run the python-based tests.
What I think needs to happen is that we create a virtual environment
that installs python/qemu/. The reason this cannot
On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote:
> +/*
> + * Zero-copy defines bellow are included to avoid breaking builds on systems
> + * that don't support MSG_ZEROCOPY, while keeping the functions more readable
> + * (without a lot of ifdefs).
> + */
> +#ifndef MSG_ZEROCOPY
> +#d
On Wed, May 4, 2022 at 4:53 PM Peter Xu wrote:
>
> On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote:
> > +/*
> > + * Zero-copy defines bellow are included to avoid breaking builds on
> > systems
> > + * that don't support MSG_ZEROCOPY, while keeping the functions more
> > readable
>
Leonardo Bras writes:
> Add property that allows zero-copy migration of memory pages
> on the sending side, and also includes a helper function
> migrate_use_zero_copy_send() to check if it's enabled.
>
> No code is introduced to actually do the migration, but it allow
> future implementations to
This was rejected before on the grounds that propagating or printing the error
is usually the right thing to do, and neither needs an autoptr:
https://patchew.org/QEMU/20210912124834.503032-1-pbonz...@redhat.com/
So while I do agree with the patch, for it to be accepted some Error* functions
wo
66 matches
Mail list logo