On 3/10/22 17:05, Murilo Opsfelder Araujo wrote:
Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
following error:
$ ../configure --prefix=/usr/local/qemu-disabletcg
--target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
...
$ make
On 3/10/22 18:42, Stefan Hajnoczi wrote:
There are a lot of details to decide on in the translator tool and
runtime to optimize the code. I think the way the stack frames are
organized in this patch series is probably for convenience rather than
performance.
Yes, sometimes the optimizations
Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the
following error:
$ ../configure --prefix=/usr/local/qemu-disabletcg
--target-list=ppc-softmmu,ppc64-softmmu --disable-tcg --disable-linux-user
...
$ make -j$(nproc)
...
FAILED:
On 3/10/22 12:14, Thomas Huth wrote:
On 06/02/2022 20.19, Jon Maloy wrote:
Trying again with correct email address.
///jon
On 2/6/22 14:15, Jon Maloy wrote:
On 1/27/22 15:14, Jon Maloy wrote:
On 11/18/21 06:57, Philippe Mathieu-Daudé wrote:
Trivial fix for CVE-2021-3507.
Philippe
On Thu, Mar 10, 2022 at 01:43:38PM +0100, Paolo Bonzini wrote:
> Here is an experiment with using stackless coroutines in QEMU. It
> only compiles enough code to run tests/unit/test-coroutine, but at
> least it proves that it's possible to quickly test ideas in the
> area of coroutine runtimes.
On 06/02/2022 20.19, Jon Maloy wrote:
Trying again with correct email address.
///jon
On 2/6/22 14:15, Jon Maloy wrote:
On 1/27/22 15:14, Jon Maloy wrote:
On 11/18/21 06:57, Philippe Mathieu-Daudé wrote:
Trivial fix for CVE-2021-3507.
Philippe Mathieu-Daudé (2):
hw/block/fdc: Prevent
On Wed, Mar 09, 2022 at 02:26:28PM +0100, Emanuele Giuseppe Esposito wrote:
> Am 02/03/2022 um 10:47 schrieb Stefan Hajnoczi:
> > On Tue, Mar 01, 2022 at 09:21:08AM -0500, Emanuele Giuseppe Esposito wrote:
> >> Possible scenarios
> >> ---
> >> Keeping in mind that we can only have
On 10/3/22 13:43, Paolo Bonzini wrote:
qemu_co_rwlock_wrlock stores the current coroutine in a local variable,
use it instead of calling qemu_coroutine_self() again.
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 25 +
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
index e7eb446566..c164cf6b15 100644
--- a/util/qemu-coroutine-lock.c
+++
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 40 +-
1 file changed, 31 insertions(+), 9 deletions(-)
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
index 3b50e1dd5b..e7eb446566 100644
--- a/util/qemu-coroutine-lock.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 75d54e5d29..0b7b4d6ef8 100644
--- a/tests/unit/test-coroutine.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 439bd269c9..75d54e5d29 100644
--- a/tests/unit/test-coroutine.c
+++ b/tests/unit/test-coroutine.c
Because conversion to stackless coroutines is incredibly repetitive,
define some magic variable-argument macros that simplify the task:
- CO_DECLARE_FRAME() declares a frame structure, with a couple common fields
and the extras coming from variable arguments
- CO_INIT_FRAME() allocates the
qemu_co_rwlock_wrlock stores the current coroutine in a local variable,
use it instead of calling qemu_coroutine_self() again.
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/qemu-coroutine-lock.c
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 123
1 file changed, 98 insertions(+), 25 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 39d0f31492..174ea8d579 100644
--- a/tests/unit/test-coroutine.c
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 68 ++---
1 file changed, 55 insertions(+), 13 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index db6718db40..39d0f31492 100644
--- a/tests/unit/test-coroutine.c
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 30 +++---
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
index c0541171d4..9674e8e3e3 100644
--- a/util/qemu-coroutine-lock.c
+++
This is optimized a bit based on the assumption that
qemu_co_mutex_unlock() never yields. In other words,
qemu_co_mutex_unlock() and qemu_co_rwlock_maybe_wake_one()
could be declared coroutine_only_fn instead of coroutine_fn.
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 11
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 35 ---
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 0fe9226b86..642ef36bc3 100644
--- a/tests/unit/test-coroutine.c
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index c44287bcb0..080ee76dde 100644
--- a/tests/unit/test-coroutine.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 0b7b4d6ef8..c44287bcb0 100644
--- a/tests/unit/test-coroutine.c
+++ b/tests/unit/test-coroutine.c
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 36
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
index 5a7b99cfaf..c0541171d4 100644
--- a/util/qemu-coroutine-lock.c
+++
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 26 ++
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
index c164cf6b15..5a7b99cfaf 100644
--- a/util/qemu-coroutine-lock.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 35 ++-
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 642ef36bc3..db6718db40 100644
--- a/tests/unit/test-coroutine.c
Replace the hand-written frame structure with one built with the CO_* macros,
just to shake them a bit. The produced code is exactly the same (except for
CO_INIT_FRAME using a statement expression to keep the "return" statement
visible in the code).
Signed-off-by: Paolo Bonzini
---
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 7aaadfd31a..c701113d77 100644
--- a/tests/unit/test-coroutine.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 27 +--
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 080ee76dde..0fe9226b86 100644
--- a/tests/unit/test-coroutine.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 6ad653adda..3d898d50c6 100644
--- a/tests/unit/test-coroutine.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 3670750c5b..ae06e97c95 100644
--- a/tests/unit/test-coroutine.c
+++
Build the frame for qemu_co_mutex_lock_slowpath, because it has code
that runs after qemu_coroutine_yield(). For qemu_co_mutex_lock() and
qemu_co_mutex_unlock(), just return COROUTINE_CONTINUE on paths that do
not go through an awaitable function, which is all of them in the case
of
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 44 -
1 file changed, 39 insertions(+), 5 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index 3d898d50c6..439bd269c9 100644
--- a/tests/unit/test-coroutine.c
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index bc75050463..6ad653adda 100644
--- a/tests/unit/test-coroutine.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 30 ++
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index c701113d77..bc75050463 100644
--- a/tests/unit/test-coroutine.c
+++
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index ae06e97c95..7aaadfd31a 100644
--- a/tests/unit/test-coroutine.c
+++
Make qemu_co_mutex_lock_slowpath a tail call, so that qemu_co_mutex_lock
does not need to build a stack frame of its own.
Signed-off-by: Paolo Bonzini
---
util/qemu-coroutine-lock.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/util/qemu-coroutine-lock.c
Since it operates on a given coroutine, qemu_coroutine_get_aio_context
can be called from outside coroutine context.
This is for example how qio_channel_restart_read uses it.
Signed-off-by: Paolo Bonzini
---
include/qemu/coroutine.h | 2 +-
util/qemu-coroutine.c| 2 +-
2 files changed, 2
Here is an experiment with using stackless coroutines in QEMU. It
only compiles enough code to run tests/unit/test-coroutine, but at
least it proves that it's possible to quickly test ideas in the
area of coroutine runtimes. Another idea that could be toyed with
in a similar manner could be
The main change is to qemu_co_sleep_ns_wakeable, which gets the full
conversion treatment. It's important to note that variables that escape
(have their address taken), such as "QEMUTimer ts" in this case, move
entirely to the frame structure and do not have local variables anymore.
For the
Signed-off-by: Paolo Bonzini
---
tests/unit/test-coroutine.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c
index c230c2fa6e..3670750c5b 100644
--- a/tests/unit/test-coroutine.c
+++
This backend is similar to the one that was written for the "Continuation
Passing C" precompiler[1]. The main advantages of stackless coroutines,
in the context of QEMU, are two. First, they do not make any assumption
on the layout of the stack (e.g. they do not need any special treatment
for
In preparation for splitting "from coroutine" ("awaitable" in other
languages) and "not from coroutine" functions, remove the CoMutex case
from QemuLockable---thus making qemu_lockable_lock and qemu_lockable_unlock
"not awaitable".
To satisfy the qemu_co_queue_wait use case, introduce
Disable a lot of code that I can't be bothered to convert right now.
Signed-off-by: Paolo Bonzini
---
tests/unit/meson.build | 2 +-
tests/unit/test-coroutine.c | 6 ++
util/meson.build| 10 +-
util/qemu-coroutine-lock.c | 2 ++
util/qemu-coroutine-sleep.c | 2
CoRwlock can only be taken or released from a coroutine, and it
can yield. Mark it as coroutine_fn.
Signed-off-by: Paolo Bonzini
---
include/qemu/coroutine.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index
Some functions only make sense from coroutine context, but never yield.
Mark them as "coroutine_only_fn".
Signed-off-by: Paolo Bonzini
---
include/qemu/coroutine.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index
On Thu, Mar 03, 2022 at 04:13:07PM +0100, Nicolas Saenz Julienne wrote:
> @@ -537,10 +546,19 @@
> # 0 means that the engine will use its default
> # (default:0, since 6.1)
> #
> +# @thread-pool-min: minimum number of threads readily available in the thread
> +#
On Thu, Mar 03, 2022 at 03:58:21PM +0100, Nicolas Saenz Julienne wrote:
> 'event-loop-base' provides basic property handling for all 'AioContext'
> based event loops. So let's define a new 'MainLoopClass' that inherits
> from it. This will permit tweaking the main loop's properties through
> qapi
Am 08/03/2022 um 15:04 schrieb Stefan Hajnoczi:
> On Tue, Feb 08, 2022 at 09:35:12AM -0500, Emanuele Giuseppe Esposito wrote:
>> diff --git a/include/qemu/job.h b/include/qemu/job.h
>> index ca46e46f5b..574110a1f2 100644
>> --- a/include/qemu/job.h
>> +++ b/include/qemu/job.h
>> @@ -75,11
On Thu, Mar 03, 2022 at 03:58:20PM +0100, Nicolas Saenz Julienne wrote:
> @@ -2935,13 +2947,6 @@ qemu_syms = custom_target('qemu.syms', output:
> 'qemu.syms',
> capture: true,
> command: [undefsym, nm, '@INPUT@'])
>
> -qom_ss =
On Thu, 2022-03-10 at 09:20 +, Stefan Hajnoczi wrote:
> On Thu, Mar 03, 2022 at 03:58:19PM +0100, Nicolas Saenz Julienne wrote:
> > Upon freeing a thread pool we need to get rid of any remaining worker.
> > This is achieved by setting the thread pool's topping flag, waking the
>
>
Am 08/03/2022 um 14:41 schrieb Stefan Hajnoczi:
> It's not clear to me that .get_parent_aio_context() should only be
> called from the main thread. The API is read-only so someone might try
> to call from I/O code in the future expecting it to work like other
> read-only graph APIs that are
On Thu, Mar 03, 2022 at 03:58:19PM +0100, Nicolas Saenz Julienne wrote:
> Upon freeing a thread pool we need to get rid of any remaining worker.
> This is achieved by setting the thread pool's topping flag, waking the
s/topping/stopping/
> workers up, and waiting for them to exit one by one. The
51 matches
Mail list logo