On Thu, Jun 10, 2021 at 07:57:55AM +0200, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann
Oops. That should have been squashed into patch #13.
take care,
Gerd
Use module database to figure which module implements a given QOM type.
Drop hard-coded object list.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 83 +++
1 file changed, 30 insertions(+), 53 deletions(-)
diff --git a/util/module.c b/util/modul
Factor out module search path initialization to the new
module_load_path_init() helper. Also store the search path in
global variables and keep it so we have to do it only once.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 58 ++-
1 file chang
Signed-off-by: Gerd Hoffmann
---
util/module.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/module.c b/util/module.c
index 564b8e3da760..4f98cc74ae37 100644
--- a/util/module.c
+++ b/util/module.c
@@ -158,7 +158,7 @@ static void module_load_modinfo(void)
{
Signed-off-by: Gerd Hoffmann
---
hw/s390x/virtio-ccw-gpu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c
index 75a9e4bb3908..5868a2a07093 100644
--- a/hw/s390x/virtio-ccw-gpu.c
+++ b/hw/s390x/virtio-ccw-gpu.c
@@ -59,6 +59,7 @@ static
Load and parse the module info database.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 54 +++
util/trace-events | 3 +++
2 files changed, 57 insertions(+)
diff --git a/util/module.c b/util/module.c
index 3a2d6dde9734..b0ea8c57d438 100644
---
Signed-off-by: Gerd Hoffmann
---
block/iscsi-opts.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/iscsi-opts.c b/block/iscsi-opts.c
index afaf8837d6c1..4f2da405e645 100644
--- a/block/iscsi-opts.c
+++ b/block/iscsi-opts.c
@@ -68,3 +68,4 @@ static void iscsi_block_opts_init(void)
}
Signed-off-by: Gerd Hoffmann
---
hw/usb/ccid-card-emulated.c | 1 +
hw/usb/ccid-card-passthru.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 5c76bed77aa0..6c8c0355e099 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/cc
Add module_allow_arch() to set the target architecture.
In case a module is limited to some arch verify arches
match and ignore the module if not.
Signed-off-by: Gerd Hoffmann
---
include/qemu/module.h | 1 +
softmmu/vl.c | 3 +++
util/module.c | 15 +++
3 files ch
Scan .modinfo sections of qemu modules,
write module metadata to modinfo.json.
Signed-off-by: Gerd Hoffmann
---
qemu-modinfo.c | 270 +
meson.build| 11 ++
2 files changed, 281 insertions(+)
create mode 100644 qemu-modinfo.c
diff --git a/qem
This patch series adds support for module metadata. Here are the pieces
of the puzzle:
(1) Macros are added to store metadata in a .modinfo elf section
(idea stolen from the linux kernel).
(2) A utility to scan modules, collect metadata from the .modinfo
sections, store it in a fi
Signed-off-by: Gerd Hoffmann
---
audio/spiceaudio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index 999bfbde47c5..a8d370fe6f31 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -317,3 +317,5 @@ static void register_audio_spice(void)
Signed-off-by: Gerd Hoffmann
---
hw/display/vhost-user-gpu-pci.c | 1 +
hw/display/vhost-user-gpu.c | 1 +
hw/display/vhost-user-vga.c | 1 +
hw/display/virtio-gpu-base.c| 1 +
hw/display/virtio-gpu-gl.c | 3 +++
hw/display/virtio-gpu-pci-gl.c | 3 +++
hw/display/virtio-gpu-pci.
Signed-off-by: Gerd Hoffmann
---
chardev/baum.c | 1 +
chardev/spice.c | 4
2 files changed, 5 insertions(+)
diff --git a/chardev/baum.c b/chardev/baum.c
index 5deca778bc44..79d618e35045 100644
--- a/chardev/baum.c
+++ b/chardev/baum.c
@@ -680,6 +680,7 @@ static const TypeInfo char_braille
Use module database to figure which module adds given QemuOpts group.
Signed-off-by: Gerd Hoffmann
---
softmmu/vl.c| 17 -
stubs/module-opts.c | 4
util/module.c | 19 +++
3 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/softmmu
Use module database for module dependencies.
Drop hard-coded dependency list.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 55 ---
1 file changed, 21 insertions(+), 34 deletions(-)
diff --git a/util/module.c b/util/module.c
index b0ea8c57d438.
Signed-off-by: Gerd Hoffmann
---
ui/egl-headless.c | 4
ui/gtk.c | 4
ui/sdl2.c | 4
ui/spice-app.c| 3 +++
ui/spice-core.c | 5 +
5 files changed, 20 insertions(+)
diff --git a/ui/egl-headless.c b/ui/egl-headless.c
index da377a74af69..75404e0e8700 10064
Signed-off-by: Gerd Hoffmann
---
hw/usb/redirect.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 6a75b0dc4ab2..4ec9326e0582 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -2608,6 +2608,7 @@ static const TypeInfo usbredir_dev_info = {
Add QAPI schema for the module info database.
Signed-off-by: Gerd Hoffmann
---
qapi/meson.build | 1 +
qapi/modules.json | 36
qapi/qapi-schema.json | 1 +
3 files changed, 38 insertions(+)
create mode 100644 qapi/modules.json
diff --git a/qapi/m
Stealing an idea from the linux kernel: Place module metadata
in an .modinfo elf section. This patch adds macros and qxl module
annotations as example.
Signed-off-by: Gerd Hoffmann
---
include/qemu/module.h | 22 ++
hw/display/qxl.c | 4
2 files changed, 26 inser
On Wed, Jun 9, 2021 at 9:01 PM Eric Blake wrote:
>
> When trying to reconstruct a qcow2 chain using information provided
> over NBD, ovirt had been relying on an unsafe assumption that any
> portion of the qcow2 file advertised as sparse would defer to the
> backing image; this worked with what qe
On Thu, Jun 10, 2021 at 12:32 AM Eric Blake wrote:
>
> Qemu is adding qemu:joint-allocation as a single context combining the
> two bits of base:allocation and a compression of qemu:allocation-depth
> into two bits [1]. Decoding the bits makes it easier for humans to
> see the result of that cont
Qemu is adding qemu:joint-allocation as a single context combining the
two bits of base:allocation and a compression of qemu:allocation-depth
into two bits [1]. Decoding the bits makes it easier for humans to
see the result of that context.
[1] https://lists.gnu.org/archive/html/qemu-devel/2021-0
On Tue, Jun 8, 2021 at 10:10 AM Cleber Rosa wrote:
>
> This introduces three different parts of a job designed to run
> on a custom runner managed by Red Hat. The goals include:
>
> a) serve as a model for other organizations that want to onboard
> their own runners, with their specific plat
On Jun 1 20:32, Gollu Appalanaidu wrote:
In the documentation of the '-detached' param "be" and "not" has been
used side by side, fix that.
Signed-off-by: Gollu Appalanaidu
---
hw/nvme/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
ind
On Jun 1 20:32, Gollu Appalanaidu wrote:
Add the controller identifiers list CNS 0x13, available list of ctrls
in NVM Subsystem that may or may not be attached to namespaces.
In Identify Ctrl List of the CNS 0x12 and 0x13 no endian conversion
for the nsid field.
Signed-off-by: Gollu Appalanaid
On Apr 27 12:00, Gollu Appalanaidu wrote:
As per the TP 4056d Namespace types CNS 0x00 and CNS 0x11
CSI field shouldn't use but it is being used for these two
Identify command CNS values, fix that.
Remove 'nvme_csi_has_nvm_support()' helper as suggested by
Klaus we can safely assume NVM command
On Wed, Jun 09, 2021 at 08:23:06PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> > > +if (s->x_dirty_bitmap) {
> > > +if (!s->info.base_allocation) {
> > > +error_setg(errp, "requested x-dirty-bitmap %s not found",
> > > + s->x_dirty_bitmap);
> > > +
When trying to reconstruct a qcow2 chain using information provided
over NBD, ovirt had been relying on an unsafe assumption that any
portion of the qcow2 file advertised as sparse would defer to the
backing image; this worked with what qemu 5.2 reports for a qcow2 BSD
loaded with "backing":null.
This is my counter-proposal to Nir's request [1] to revert a 6.0
behavior change. It does not expose any new information over NBD, but
does make it easier to collect necessary information from a single
context rather than requiring the client to have to request two
contexts in parallel, then cross
Enhance the test to inspect what qemu-nbd is advertising during
handshake, and rename it now that we support useful iotest names.
Signed-off-by: Eric Blake
---
.../qemu-iotests/{309 => tests/nbd-qemu-allocation} | 5 -
.../{309.out => tests/nbd-qemu-allocation.out} | 12 +++-
Am 09.06.2021 um 18:30 hat Eric Blake geschrieben:
> No need to start a tracked request that will always fail. The choice
> to check read-only after bdrv_inc_in_flight() predates 1bc5f09f2e
> (block: Use tracked request for truncate), but waiting for serializing
> requests can make the effect more
03.06.2021 19:29, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:08:57AM +0300, Vladimir Sementsov-Ogievskiy wrote:
To be reused in the following patch.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/nbd.c | 99 ++---
1 file changed, 57 i
09.06.2021 19:30, Eric Blake wrote:
No need to start a tracked request that will always fail. The choice
to check read-only after bdrv_inc_in_flight() predates 1bc5f09f2e
(block: Use tracked request for truncate), but waiting for serializing
requests can make the effect more noticeable.
Signed-
09.06.2021 18:53, Kevin Wolf wrote:
Am 14.05.2021 um 17:53 hat Vladimir Sementsov-Ogievskiy geschrieben:
Hi Alberto!
What are your plans for v5? I'm now finishing a new series which makes
backup-top filter public, and I want to base it on your series
(otherwise I can't add a test).
Berto, whe
No need to start a tracked request that will always fail. The choice
to check read-only after bdrv_inc_in_flight() predates 1bc5f09f2e
(block: Use tracked request for truncate), but waiting for serializing
requests can make the effect more noticeable.
Signed-off-by: Eric Blake
---
block/io.c |
On Tue, 2021-06-08 at 15:16 +0200, Paolo Bonzini wrote:
> I/O to a disk via read/write is not limited by the number of segments allowed
> by the host adapter; the kernel can split requests if needed, and the limit
> imposed by the host adapter can be very low (256k or so) to avoid that SG_IO
> retu
On Tue, 2021-06-08 at 15:16 +0200, Paolo Bonzini wrote:
> bs->sg is only true for character devices, but block devices can also
> be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET
> returns bytes in an int for /dev/sgN devices, and sectors in a short
> for block devices, so accoun
On Tue, 2021-06-08 at 15:16 +0200, Paolo Bonzini wrote:
> For block host devices, I/O can happen through either the kernel file
> descriptor I/O system calls (preadv/pwritev, io_submit, io_uring)
> or the SCSI passthrough ioctl SG_IO.
>
> In the latter case, the size of each transfer can be limite
On Tue, 2021-06-08 at 22:14 +0300, Vladimir Sementsov-Ogievskiy wrote:
> 08.06.2021 16:16, Paolo Bonzini wrote:
> > Even though it was only called for devices that have bs->sg set (which
> > must be character devices), sg_get_max_segments looked at /sys/dev/block
> > which only works for block devi
28.04.2021 11:14, Vladimir Sementsov-Ogievskiy wrote:
+struct NBDClientConnection {
+ /* Initialization constants */
+ SocketAddress *saddr; /* address to connect to */
+
+ /*
+ * Result of last attempt. Valid in FAIL and SUCCESS states.
+ * If you want to steal error, don't forg
Am 14.05.2021 um 17:53 hat Vladimir Sementsov-Ogievskiy geschrieben:
> Hi Alberto!
>
> What are your plans for v5? I'm now finishing a new series which makes
> backup-top filter public, and I want to base it on your series
> (otherwise I can't add a test).
Berto, where are we with this? I see tha
Commit dabefdd6 removed code that was supposed to try reconnecting
during .realize(), but actually just crashed and had several design
problems.
This adds the feature back without the crash in simple cases while also
fixing some design problems: Reconnection is now only tried if there was
a proble
This function is the part that we will want to retry if the connection
is lost during initialisation, so factor it out to keep the following
patch simpler.
The error path for vhost_dev_get_config() forgot disconnecting the
chardev, add this while touching the code.
Signed-off-by: Kevin Wolf
---
Instead of letting the caller make up a meaningless error message, add
an Error parameter to allow reporting the real error.
Signed-off-by: Kevin Wolf
---
hw/block/vhost-user-blk.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/hw/block/vhos
Instead of just returning 0/-1 and letting the caller make up a
meaningless error message, add an Error parameter to allow reporting the
real error and switch to 0/-errno so that different kind of errors can
be distinguished in the caller.
Specifically, in vhost-user, EPROTO is used for all errors
Instead of just returning 0/-1 and letting the caller make up a
meaningless error message, add an Error parameter to allow reporting the
real error and switch to 0/-errno so that different kind of errors can
be distinguished in the caller.
Signed-off-by: Kevin Wolf
---
include/hw/virtio/vhost-ba
This allows callers to return better error messages instead of making
one up while the real error ends up on stderr. Most callers can
immediately make use of this because they already have an Error
parameter themselves. The others just keep printing the error with
error_report_err().
Signed-off-by
Instead of just returning 0/-1 and letting the caller make up a
meaningless error message, switch to 0/-errno so that different kinds of
errors can be distinguished in the caller.
This involves changing a few more callbacks in VhostOps to return
0/-errno: .vhost_set_owner(), .vhost_get_features()
My previous series removed the broken implementation of automatic
reconnection during .realize(). This series adds some error reporting
improvements that allow distinguishing cases where reconnecting could
help from permanent errors, and then uses it to re-implement the
automatic reconnection durin
09.06.2021 16:02, Kevin Wolf wrote:
Am 09.06.2021 um 14:22 hat Paolo Bonzini geschrieben:
If we want to wake up a coroutine from a worker thread, aio_co_wake()
currently does not work. In that scenario, aio_co_wake() calls
aio_co_enter(), but there is no current AioContext and therefore
qemu_ge
09.06.2021 15:22, Paolo Bonzini wrote:
If we want to wake up a coroutine from a worker thread, aio_co_wake()
currently does not work. In that scenario, aio_co_wake() calls
aio_co_enter(), but there is no current AioContext and therefore
qemu_get_current_aio_context() returns the main thread. ai
Am 09.06.2021 um 14:22 hat Paolo Bonzini geschrieben:
> If we want to wake up a coroutine from a worker thread, aio_co_wake()
> currently does not work. In that scenario, aio_co_wake() calls
> aio_co_enter(), but there is no current AioContext and therefore
> qemu_get_current_aio_context() returns
+cc qemu-block@nongnu.org
On 6/9/21 1:46 PM, Heinrich Schuchardt wrote:
The EUI64 field is the only identifier for NVMe namespaces in UEFI device
paths. Add a new namespace property "eui64", that provides the user the
option to specify the EUI64.
Signed-off-by: Heinrich Schuchardt
---
docs/s
08.06.2021 10:33, Emanuele Giuseppe Esposito wrote:
Add a CoMutex to protect concurrent access of block-copy
data structures.
This mutex also protects .copy_bitmap, because its thread-safe
API does not prevent it from assigning two tasks to the same
bitmap region.
.finished, .cancelled and read
If we want to wake up a coroutine from a worker thread, aio_co_wake()
currently does not work. In that scenario, aio_co_wake() calls
aio_co_enter(), but there is no current AioContext and therefore
qemu_get_current_aio_context() returns the main thread. aio_co_wake()
then attempts to call aio_con
On 09/06/21 13:40, Vladimir Sementsov-Ogievskiy wrote:
And in gdb all looks like aio_co_wake() in my own separate thread
leads to coroutine execution exactly in my own thread.. So, it don't
dead-lock on trying to acquire the context, instead it somehow enter
to a coroutine. And then deadloc
On 09/06/21 12:24, Vladimir Sementsov-Ogievskiy wrote:
Thanks, I'll base v4 of nbd patches on it.
I now run make check. test-aio-multithread crashes on assertion:
With the patch I've sent it doesn't, so hopefully you can go ahead.
Paolo
(gdb) bt
#0 0x7f4af8d839d5 in raise () from /lib6
09.06.2021 14:32, Vladimir Sementsov-Ogievskiy wrote:
09.06.2021 13:53, Paolo Bonzini wrote:
If we want to wake up a coroutine from a worker thread, aio_co_wake()
currently does not work. In that scenario, aio_co_wake() calls
aio_co_enter(), but there is no current AioContext and therefore
qemu
09.06.2021 13:53, Paolo Bonzini wrote:
If we want to wake up a coroutine from a worker thread, aio_co_wake()
currently does not work. In that scenario, aio_co_wake() calls
aio_co_enter(), but there is no current AioContext and therefore
qemu_get_current_aio_context() returns the main thread. ai
09.06.2021 12:33, Paolo Bonzini wrote:
On 09/06/21 10:51, Vladimir Sementsov-Ogievskiy wrote:
+ default:
[...]
+ bounce_buffer = qemu_blockalign(s->source->bs, nbytes);
+ ret = bdrv_co_pread(s->source, offset, nbytes, bounce_buffer, 0);
+ if (ret < 0) {
+ trac
If we want to wake up a coroutine from a worker thread, aio_co_wake()
currently does not work. In that scenario, aio_co_wake() calls
aio_co_enter(), but there is no current AioContext and therefore
qemu_get_current_aio_context() returns the main thread. aio_co_wake()
then attempts to call aio_con
Vladimir Sementsov-Ogievskiy writes:
> 08.06.2021 14:12, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy writes:
>>
>> [...]
>>
>>> TODO: We also need to deprecate drive-backup transaction action..
>>> But union members in QAPI doesn't support 'deprecated' feature. I tried
>>> to dig
09.06.2021 12:35, Paolo Bonzini wrote:
On 08/06/21 20:45, Vladimir Sementsov-Ogievskiy wrote:
14.05.2021 00:04, Paolo Bonzini wrote:
On 12/05/21 09:15, Vladimir Sementsov-Ogievskiy wrote:
I don't understand. Why doesn't aio_co_enter go through the ctx !=
qemu_get_current_aio_context() bra
09.06.2021 12:33, Paolo Bonzini wrote:
On 09/06/21 10:51, Vladimir Sementsov-Ogievskiy wrote:
+ default:
[...]
+ bounce_buffer = qemu_blockalign(s->source->bs, nbytes);
+ ret = bdrv_co_pread(s->source, offset, nbytes, bounce_buffer, 0);
+ if (ret < 0) {
+ trac
On 08/06/21 20:45, Vladimir Sementsov-Ogievskiy wrote:
14.05.2021 00:04, Paolo Bonzini wrote:
On 12/05/21 09:15, Vladimir Sementsov-Ogievskiy wrote:
I don't understand. Why doesn't aio_co_enter go through the ctx !=
qemu_get_current_aio_context() branch and just do aio_co_schedule?
That w
On 09/06/21 10:51, Vladimir Sementsov-Ogievskiy wrote:
+ default:
[...]
+bounce_buffer = qemu_blockalign(s->source->bs, nbytes);
+ ret = bdrv_co_pread(s->source, offset, nbytes, bounce_buffer,
0);
+ if (ret < 0) {
+ trace_block_copy_read_fail(s, offset, ret)
08.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 which field has to be protected with a lock.
.sleep_state is handled in the series "coroutine: new sleep/wake API
Am 09.06.2021 um 09:12 hat Thomas Huth geschrieben:
> On 05/05/2021 10.05, Vladimir Sementsov-Ogievskiy wrote:
> > 05.05.2021 10:59, Miroslav Rezanina wrote:
> > > Commit 3108a15cf (block: introduce bdrv_drop_filter()) introduced
> > > uninitialized
> > > variable to_cow_parent in bdrv_replace_node
08.06.2021 10:33, Emanuele Giuseppe Esposito wrote:
From: Paolo Bonzini
Put the logic to determine the copy size in a separate function, so
that there is a simple state machine for the possible methods of
copying data from one BlockDriverState to the other.
Use .method instead of .copy_range a
On 05/05/2021 10.05, Vladimir Sementsov-Ogievskiy wrote:
05.05.2021 10:59, Miroslav Rezanina wrote:
Commit 3108a15cf (block: introduce bdrv_drop_filter()) introduced
uninitialized
variable to_cow_parent in bdrv_replace_node_common function that is used
only when
detach_subchain is true. It is u
On 08/06/2021 16.09, Cleber Rosa wrote:
GCC from CentOS Stream 8 is erroring out on a possibily unitialized
varible.
Full version info for the compiler used:
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-1)
Signed-off-by: Cleber Rosa
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1 deleti
72 matches
Mail list logo