Re: [PATCH 1/4] block.c: fix compilation error on possible unitialized variable

2021-06-09 Thread Thomas Huth
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

Re: Prevent compiler warning on block.c

2021-06-09 Thread Thomas Huth
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

Re: [RFC PATCH 0/5] ppc/Pegasos2 VOF

2021-06-09 Thread Alexey Kardashevskiy
On 6/7/21 01:46, BALATON Zoltan wrote: Based-on: <20210520090557.435689-1-...@ozlabs.ru> ^ That is v20 of Alexey's VOF patch Hello, Posting these for early review now. I plan to rebase on the next VOF patch that hopefully fixes those points that I had to circumvent in patch 1 for now. I've

Re: [PATCH] KVM: Fix dirty ring mmap incorrect size due to renaming accident

2021-06-09 Thread Paolo Bonzini
On 09/06/21 03:43, Peter Xu wrote: Found this when I wanted to try the per-vcpu dirty rate series out, then I found that it's not really working and it can quickly hang death a guest. I found strange errors (e.g. guest crash after migration) happens even without the per-vcpu dirty rate series.

Re: [PATCH v2 2/3] hw/timer: Initial commit of Ibex Timer

2021-06-09 Thread Paolo Bonzini
On 09/06/21 01:48, Alistair Francis wrote: Add support for the Ibex timer. This is used with the RISC-V mtime/mtimecmp similar to the SiFive CLINT. We currently don't support changing the prescale or the timervalue. Signed-off-by: Alistair Francis Any chance this could have a qtest? It woul

[PATCH] vl: Fix an assert failure in error path

2021-06-09 Thread Zhenzhong Duan
Based on the description of error_setg(), the local variable err in qemu_maybe_daemonize() should be initialized to NULL. Without fix, the uninitialized *errp triggers assert failure which doesn't show much valuable information. Before the fix: qemu-system-x86_64: ../util/error.c:59: error_setv:

Re: [PATCH v3 1/5] block-copy: streamline choice of copy_range vs. read/write

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

Re: [PATCH v14 2/8] arm64: Handle MTE tags zeroing in __alloc_zeroed_user_highpage()

2021-06-09 Thread Steven Price
On 07/06/2021 18:07, Catalin Marinas wrote: > On Mon, Jun 07, 2021 at 12:08:10PM +0100, Steven Price wrote: >> From: Catalin Marinas >> >> Currently, on an anonymous page fault, the kernel allocates a zeroed >> page and maps it in user space. If the mapping is tagged (PROT_MTE), >> set_pte_at() ad

Re: [PATCH v14 8/8] KVM: arm64: Document MTE capability and ioctl

2021-06-09 Thread Steven Price
On 07/06/2021 18:32, Catalin Marinas wrote: > On Mon, Jun 07, 2021 at 12:08:16PM +0100, Steven Price wrote: >> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst >> index 22d077562149..fc6f0cbc30b3 100644 >> --- a/Documentation/virt/kvm/api.rst >> +++ b/Documentation/virt/

Re: Prevent compiler warning on block.c

2021-06-09 Thread Kevin Wolf
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

Re: [PATCH v4 00/26] s390x/tcg: Implement Vector enhancements facility and switch to z14

2021-06-09 Thread Cornelia Huck
On Tue, Jun 08 2021, David Hildenbrand wrote: > @Conny, I think this should be good to go. > > > This series adds support for the "Vector enhancements facility" and bumps > the qemu CPU model to a stripped-down z14. > > I tested most vector FP instructions by generating random instructions > and

Re: [PATCH v3 2/5] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

Re: [PATCH] vl: Fix an assert failure in error path

2021-06-09 Thread Paolo Bonzini
On 10/06/21 10:47, Zhenzhong Duan wrote: Based on the description of error_setg(), the local variable err in qemu_maybe_daemonize() should be initialized to NULL. Without fix, the uninitialized *errp triggers assert failure which doesn't show much valuable information. Before the fix: qemu-syst

Re: [PATCH v3 1/5] block-copy: streamline choice of copy_range vs. read/write

2021-06-09 Thread Paolo Bonzini
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)

Re: [PATCH v3 06/33] util/async: aio_co_schedule(): support reschedule in same ctx

2021-06-09 Thread Paolo Bonzini
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

[RFC PATCH] cputlb: implement load_helper_unaligned() for unaligned loads

2021-06-09 Thread Mark Cave-Ayland
[RFC because this is currently only lightly tested and there have been some discussions about whether this should be handled elsewhere in the memory API] If an unaligned load is required then the load is split into 2 separate accesses and combined together within load_helper(). This does not work

[PATCH 0/3] virtio-pci: Checks for virtio device presence on the bus.

2021-06-09 Thread Andrew Melnychenko
At some point, after unplugging virtio-pci the virtio device may be unrealised, but the memory regions may be present in flatview. So, it's a possible situation when memory region's callbacks are called for "unplugged" device. In patches were added checks for virtio device presence on virtio-bus.

Re: [PATCH 11/55] target/arm: Implement MVE VLDR/VSTR (non-widening forms)

2021-06-09 Thread Peter Maydell
On Tue, 8 Jun 2021 at 22:33, Richard Henderson wrote: > > On 6/7/21 9:57 AM, Peter Maydell wrote: > > +static uint16_t mve_element_mask(CPUARMState *env) > > +{ > > +/* > > + * Return the mask of which elements in the MVE vector should be > > + * updated. This is a combination of multi

Re: [PATCH v3 19/28] tcg: Tidy split_cross_256mb

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > Return output buffer and size via output pointer arguments, > rather than returning size via tcg_ctx->code_gen_buffer_size. > > Signed-off-by: Richard Henderson This is giving off string "lipstick on a pig" energy but given it's to work around mips foibles: Review

[PATCH 2/3] virtio-pci: Added check for virtio device in PCI config cbs.

2021-06-09 Thread Andrew Melnychenko
Now, if virtio device is not present on virtio-bus - pci config callbacks will not lead to possible crush. The read will return "-1" which should be interpreted by a driver that pci device may be unplugged. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 10 ++ 1 file chan

[RFC PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds.

2021-06-09 Thread Andrew Melnychenko
eBPF RSS program and maps now may be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 77 -- include/hw/virtio/virtio-net.h | 1 + 2 file

[RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-09 Thread Andrew Melnychenko
Libvirt usually launches qemu with strict permissions. To enable eBPF RSS steering, qemu-ebpf-rss-helper was added. Added property "ebpf_rss_fds" for "virtio-net" that allows to initialize eBPF RSS context with passed program & maps fds. Added qemu-ebpf-rss-helper - simple helper that loads eBPF

[RFC PATCH 3/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-06-09 Thread Andrew Melnychenko
Helper program. Loads eBPF RSS program and maps and passes them through unix socket. Libvirt may launch this helper and pass eBPF fds to qemu virtio-net. Signed-off-by: Andrew Melnychenko --- ebpf/qemu-ebpf-rss-helper.c | 130 meson.build |

Re: A bug of Monitor Chardev ?

2021-06-09 Thread Marc-André Lureau
Hi On Wed, Jun 9, 2021 at 4:21 AM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > 在 2021/6/8 23:37, Daniel P. Berrangé 写道: > > On Tue, Jun 08, 2021 at 04:07:30PM +0200, Markus Armbruster wrote: > >> "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" > >> writ

Re: [PATCH v3 20/28] tcg: Move in_code_gen_buffer and tests to region.c

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > Shortly, the full code_gen_buffer will only be visible > to region.c, so move in_code_gen_buffer out-of-line. > > Move the debugging versions of tcg_splitwx_to_{rx,rw} > to region.c as well, so that the compiler gets to see > the implementation of in_code_gen_buffer.

[RFC PATCH 5/5] meson: libbpf dependency now exclusively for Linux.

2021-06-09 Thread Andrew Melnychenko
Libbpf is used for eBPF RSS steering, which is supported only by Linux TAP. There is no reason yet to build eBPF loader and helper for non Linux systems, even if libbpf is present. Signed-off-by: Andrew Melnychenko --- meson.build | 29 - 1 file changed, 16 insertions

[PATCH 1/3] virtio-pci: Added check for virtio device presence in mm callbacks.

2021-06-09 Thread Andrew Melnychenko
During unplug the virtio device is unplugged from virtio-bus on pci. In some cases, requests to virtio-pci mm may acquire during/after unplug. Added check that virtio device is on the bus, for "common" memory region. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 8 1

QEmu ARC port - decoder implementation feedback

2021-06-09 Thread Cupertino Miranda
Hi Richard, Last few weeks I have been working on cleaning up ARC port for further reviewing. In the context of the decoder, if I recall well, your observation was that a linear search was not Ok. Your suggestion was not to reinvent the wheel and generate decodetree to create the decoder. We sta

[PATCH 3/3] virtio-pci: Changed return values for "notify", "device" and "isr" read.

2021-06-09 Thread Andrew Melnychenko
Added check for "notify" memory region. Now reads will return "-1" if a virtio device is not present on a virtio bus. Signed-off-by: Andrew Melnychenko --- hw/virtio/virtio-pci.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virti

Re: [PATCH v3 1/5] block-copy: streamline choice of copy_range vs. read/write

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-06-09 Thread BALATON Zoltan
On Wed, 9 Jun 2021, Alexey Kardashevskiy wrote: On 6/8/21 08:54, BALATON Zoltan wrote: On Mon, 7 Jun 2021, David Gibson wrote: On Fri, Jun 04, 2021 at 03:59:22PM +0200, BALATON Zoltan wrote: On Fri, 4 Jun 2021, David Gibson wrote: On Wed, Jun 02, 2021 at 02:29:29PM +0200, BALATON Zoltan wrote

[RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Thomas Huth
Libvirt's "domcapabilities" command has a way to state whether certain graphic frontends are available in QEMU or not. Originally, libvirt looked at the "--help" output of the QEMU binary to determine whether SDL was available or not (by looking for the "-sdl" parameter in the help text), but since

Re: [PATCH 20/55] target/arm: Implement MVE VDUP

2021-06-09 Thread Peter Maydell
On Wed, 9 Jun 2021 at 00:17, Richard Henderson wrote: > > On 6/7/21 9:57 AM, Peter Maydell wrote: > > +#define DO_VDUP(OP, ESIZE, TYPE, H) \ > > +void HELPER(mve_##OP)(CPUARMState *env, void *vd, uint32_t val) \ > > +{

[RFC PATCH 4/5] qmp: Added qemu-ebpf-rss-path command.

2021-06-09 Thread Andrew Melnychenko
New qmp command to query ebpf helper. It's crucial that qemu and helper are in sync and in touch. Technically helper should pass eBPF fds that qemu may accept. And different qemu's builds may have different eBPF programs and helpers. Qemu returns helper that should "fit" to virtio-net. Signed-off-

[RFC PATCH 1/5] ebpf: Added eBPF initialization by fds.

2021-06-09 Thread Andrew Melnychenko
eBPF RSS context may be initialized by program fd and map fds. virtio-net may provide fds passed by libvirt. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 31 --- ebpf/ebpf_rss.h | 5 + 3 files changed, 39 ins

Re: [PATCH v3 06/33] util/async: aio_co_schedule(): support reschedule in same ctx

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

Re: [RFC PATCH 0/5] ppc/Pegasos2 VOF

2021-06-09 Thread BALATON Zoltan
On Wed, 9 Jun 2021, Alexey Kardashevskiy wrote: On 6/7/21 01:46, BALATON Zoltan wrote: Based-on: <20210520090557.435689-1-...@ozlabs.ru> ^ That is v20 of Alexey's VOF patch Hello, Posting these for early review now. I plan to rebase on the next VOF patch that hopefully fixes those points that

Re: [RFC PATCH] cputlb: implement load_helper_unaligned() for unaligned loads

2021-06-09 Thread Philippe Mathieu-Daudé
On 6/9/21 11:35 AM, Mark Cave-Ayland wrote: > [RFC because this is currently only lightly tested and there have been some > discussions about whether this should be handled elsewhere in the memory API] > > If an unaligned load is required then the load is split into 2 separate > accesses > and co

Re: [PATCH v3 21/28] tcg: Allocate code_gen_buffer into struct tcg_region_state

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > Do not mess around with setting values within tcg_init_ctx. > Put the values into 'region' directly, which is where they > will live for the lifetime of the program. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v14 1/8] arm64: mte: Handle race when synchronising tags

2021-06-09 Thread Marc Zyngier
On Mon, 07 Jun 2021 12:08:09 +0100, Steven Price wrote: > > mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag > before restoring/zeroing the MTE tags. However if another thread were to > race and attempt to sync the tags on the same page before the first > thread had completed

Re: [PATCH v3 22/28] tcg: Return the map protection from alloc_code_gen_buffer

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > Change the interface from a boolean error indication to a > negative error vs a non-negative protection. For the moment > this is only interface change, not making use of the new data. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v3 23/28] tcg: Sink qemu_madvise call to common code

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > Move the call out of the N versions of alloc_code_gen_buffer > and into tcg_region_init. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v3 24/28] util/osdep: Add qemu_mprotect_rw

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > For --enable-tcg-interpreter on Windows, we will need this. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v3 25/28] tcg: Round the tb_size default from qemu_get_host_physmem

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > If qemu_get_host_physmem returns an odd number of pages, > then physmem / 8 will not be a multiple of the page size. > > The following was observed on a gitlab runner: > > ERROR qtest-arm/boot-serial-test - Bail out! > ERROR:../util/osdep.c:80:qemu_mprotect__osdep: \

Re: [PATCH v3 26/28] tcg: Merge buffer protection and guard page protection

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > Do not handle protections on a case-by-case basis in the > various alloc_code_gen_buffer instances; do it within a > single loop in tcg_region_init. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 3/3] qapi: deprecate drive-backup

2021-06-09 Thread Markus Armbruster
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

Re: [PATCH v14 1/8] arm64: mte: Handle race when synchronising tags

2021-06-09 Thread Steven Price
On 09/06/2021 11:30, Marc Zyngier wrote: > On Mon, 07 Jun 2021 12:08:09 +0100, > Steven Price wrote: >> >> mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag >> before restoring/zeroing the MTE tags. However if another thread were to >> race and attempt to sync the tags on the s

[PATCH] async: the main AioContext is only "current" if under the BQL

2021-06-09 Thread Paolo Bonzini
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

Re: [PATCH v3 1/5] block-copy: streamline choice of copy_range vs. read/write

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

[PATCH 0/2] hw/misc: DPS310 temp and pressure sensor model

2021-06-09 Thread Joel Stanley
This is a model for the Infineon DPS310 temperature and barometric pressure sensor. Joel Stanley (2): hw/misc: Add Infineon DPS310 sensor model arm/aspeed: Add DPS310 to Witherspoon and Rainier hw/arm/aspeed.c | 4 +- hw/misc/dps310.c| 357 ++

[PATCH 1/2] hw/misc: Add Infineon DPS310 sensor model

2021-06-09 Thread Joel Stanley
This contains some hardcoded register values that were obtained from the hardware after reading the temperature. It does enough to test the Linux kernel driver. Signed-off-by: Joel Stanley --- hw/misc/dps310.c| 357 hw/arm/Kconfig | 1 + h

[PATCH 2/2] arm/aspeed: Add DPS310 to Witherspoon and Rainier

2021-06-09 Thread Joel Stanley
Witherspoon uses the DPS310 as a temperature sensor. Rainier uses it as a temperature and humidity sensor. Signed-off-by: Joel Stanley --- hw/arm/aspeed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 0eafc791540d..619ad869dd71 10

Re: [RFC PATCH] cputlb: implement load_helper_unaligned() for unaligned loads

2021-06-09 Thread Mark Cave-Ayland
On 09/06/2021 11:28, Philippe Mathieu-Daudé wrote: On 6/9/21 11:35 AM, Mark Cave-Ayland wrote: [RFC because this is currently only lightly tested and there have been some discussions about whether this should be handled elsewhere in the memory API] If an unaligned load is required then the loa

Re: [PATCH v14 1/8] arm64: mte: Handle race when synchronising tags

2021-06-09 Thread Marc Zyngier
On Wed, 09 Jun 2021 11:51:34 +0100, Steven Price wrote: > > On 09/06/2021 11:30, Marc Zyngier wrote: > > On Mon, 07 Jun 2021 12:08:09 +0100, > > Steven Price wrote: > >> > >> mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag > >> before restoring/zeroing the MTE tags. However

Re: [PATCH v3 27/28] tcg: When allocating for !splitwx, begin with PROT_NONE

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > There's a change in mprotect() behaviour [1] in the latest macOS > on M1 and it's not yet clear if it's going to be fixed by Apple. > > In this case, instead of changing permissions of N guard pages, > we change permissions of N rwx regions. The same number of > sys

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Gerd Hoffmann
On Wed, Jun 09, 2021 at 12:02:40PM +0200, Thomas Huth wrote: > Libvirt's "domcapabilities" command has a way to state whether > certain graphic frontends are available in QEMU or not. Originally, > libvirt looked at the "--help" output of the QEMU binary to determine > whether SDL was available or

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Daniel P . Berrangé
On Wed, Jun 09, 2021 at 01:24:05PM +0200, Gerd Hoffmann wrote: > On Wed, Jun 09, 2021 at 12:02:40PM +0200, Thomas Huth wrote: > > Libvirt's "domcapabilities" command has a way to state whether > > certain graphic frontends are available in QEMU or not. Originally, > > libvirt looked at the "--help"

Re: [PATCH v3 28/28] tcg: Move tcg_init_ctx and tcg_ctx from accel/tcg/

2021-06-09 Thread Alex Bennée
Richard Henderson writes: > These variables belong to the jit side, not the user side. > > Since tcg_init_ctx is no longer used outside of tcg/, move > the declaration to tcg/internal.h. > > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --

Re: [PATCH] async: the main AioContext is only "current" if under the BQL

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

Re: [PATCH v4 1/3] qemu-config: parse configuration files to a QDict

2021-06-09 Thread Philippe Mathieu-Daudé
Hi Paolo, On 5/24/21 12:57 PM, Paolo Bonzini wrote: > Change the parser to put the values into a QDict and pass them > to a callback. qemu_config_parse's QemuOpts creation is > itself turned into a callback function. > > This is useful for -readconfig to support keyval-based options; > getting a

Re: [PATCH] async: the main AioContext is only "current" if under the BQL

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

Re: [RFC v3 04/29] vhost: Add x-vhost-enable-shadow-vq qmp

2021-06-09 Thread Markus Armbruster
Eugenio Perez Martin writes: > On Tue, Jun 8, 2021 at 4:23 PM Markus Armbruster wrote: >> >> Eugenio Perez Martin writes: >> >> > On Fri, May 21, 2021 at 9:05 AM Markus Armbruster >> > wrote: >> >> >> >> Eugenio Pérez writes: >> >> >> >> > Command to enable shadow virtqueue looks like: >> >>

[PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Heinrich Schuchardt
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/system/nvme.rst | 4 +++ hw/nvme/ctrl.c | 58 +

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Gerd Hoffmann
On Wed, Jun 09, 2021 at 12:29:58PM +0100, Daniel P. Berrangé wrote: > On Wed, Jun 09, 2021 at 01:24:05PM +0200, Gerd Hoffmann wrote: > > On Wed, Jun 09, 2021 at 12:02:40PM +0200, Thomas Huth wrote: > > > Libvirt's "domcapabilities" command has a way to state whether > > > certain graphic frontends

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Daniel P . Berrangé
On Wed, Jun 09, 2021 at 01:49:21PM +0200, Gerd Hoffmann wrote: > On Wed, Jun 09, 2021 at 12:29:58PM +0100, Daniel P. Berrangé wrote: > > On Wed, Jun 09, 2021 at 01:24:05PM +0200, Gerd Hoffmann wrote: > > > On Wed, Jun 09, 2021 at 12:02:40PM +0200, Thomas Huth wrote: > > > > Libvirt's "domcapabiliti

Re: GSoC Intro - TUI interface for QMP

2021-06-09 Thread Markus Armbruster
John Snow writes: > On 6/8/21 11:01 AM, Markus Armbruster wrote: >> John Snow writes: >> [...] >> >>> A challenge will be where to pull the help text from. The QEMU server >>> is not capable (today) of sending help information over the QMP socket >>> itself. >>> >>> We will need to implement a

Re: [PATCH v8 02/12] accel: Introduce 'query-accels' QMP command

2021-06-09 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 6/8/21 3:27 PM, Thomas Huth wrote: >> On 26/05/2021 19.04, Philippe Mathieu-Daudé wrote: >>> Introduce the 'query-accels' QMP command which returns a list >>> of built-in accelerator names. >>> >>> - Accelerator is a QAPI enum of all existing accelerators, >>>

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Thomas Huth
On 09/06/2021 13.49, Gerd Hoffmann wrote: On Wed, Jun 09, 2021 at 12:29:58PM +0100, Daniel P. Berrangé wrote: On Wed, Jun 09, 2021 at 01:24:05PM +0200, Gerd Hoffmann wrote: On Wed, Jun 09, 2021 at 12:02:40PM +0200, Thomas Huth wrote: Libvirt's "domcapabilities" command has a way to state wheth

Re: GSoC Intro - TUI interface for QMP

2021-06-09 Thread Daniel P . Berrangé
On Tue, Jun 08, 2021 at 05:01:28PM +0200, Markus Armbruster wrote: > John Snow writes: > > [...] > > > A challenge will be where to pull the help text from. The QEMU server > > is not capable (today) of sending help information over the QMP socket > > itself. > > > > We will need to implement a

Re: GSoC Intro - TUI interface for QMP

2021-06-09 Thread Daniel P . Berrangé
On Tue, Jun 08, 2021 at 11:49:41AM -0400, John Snow wrote: > On 6/8/21 11:01 AM, Markus Armbruster wrote: > > John Snow writes: > > > > [...] > > > > > A challenge will be where to pull the help text from. The QEMU server > > > is not capable (today) of sending help information over the QMP sock

Re: [PATCH] vl: Fix an assert failure in error path

2021-06-09 Thread Markus Armbruster
Paolo Bonzini writes: > On 10/06/21 10:47, Zhenzhong Duan wrote: >> Based on the description of error_setg(), the local variable err in >> qemu_maybe_daemonize() should be initialized to NULL. >> Without fix, the uninitialized *errp triggers assert failure which >> doesn't show much valuable info

Re: [PATCH 0/3] Acceptance Tests: support choosing specific distro and version

2021-06-09 Thread Eric Auger
Hi CLeber, On 4/15/21 12:14 AM, Cleber Rosa wrote: > Because Fedora 31 will not suit all tests that depend on a Linux > guest, this allows for the configuration of the guest distribution. > It came out of a suggestion from Eric Auger, and it was actually a > feature I planned to submit for a while

Re: [PATCH 4/5] esp: revert 75ef849696 "esp: correctly fill bus id with requested lun"

2021-06-09 Thread Paolo Bonzini
On 19/05/21 12:08, Mark Cave-Ayland wrote: This commit from nearly 10 years ago no longer appears to be required and in its current form prevents the MacOS CDROM driver from detecting the CDROM drive. The error is caused by the MacOS CDROM driver sending this CDB without DMA: 0x12 0x00 0x00

Re: [PATCH 0/2] esp: minor fixes for older Linux versions

2021-06-09 Thread Paolo Bonzini
On 18/05/21 23:25, Mark Cave-Ayland wrote: Following on from the ESP changes in QEMU 6.0 someone pointed out that the old Linux 2.6 ESP driver as used in Aurelian's SPARC image at https://people.debian.org/~aurel32/qemu/sparc/ emits a constant stream of "esp0: STEP_ASEL for tgt 0" messages to the

Re: [PATCH 0/5] esp: fixes for MacOS toolbox ROM

2021-06-09 Thread Paolo Bonzini
On 19/05/21 12:07, Mark Cave-Ayland wrote: This patchset contains more ESP fixes from my attempts to boot MacOS under the QEMU q800 machine (along with a related NetBSD fix). With these patches it is possible for the MacOS toolbox ROM and MacOS drivers to detect and access SCSI drives and CDROMs

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Klaus Jensen
On Jun 9 13:46, 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/system/nvme.rst | 4 +++ hw/nvme

Re: [PATCH] vl: Fix an assert failure in error path

2021-06-09 Thread Daniel P . Berrangé
On Wed, Jun 09, 2021 at 02:09:47PM +0200, Markus Armbruster wrote: > Paolo Bonzini writes: > > > On 10/06/21 10:47, Zhenzhong Duan wrote: > >> Based on the description of error_setg(), the local variable err in > >> qemu_maybe_daemonize() should be initialized to NULL. > >> Without fix, the unini

Re: [PATCH v3 06/33] util/async: aio_co_schedule(): support reschedule in same ctx

2021-06-09 Thread Paolo Bonzini
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

Re: [PATCH] async: the main AioContext is only "current" if under the BQL

2021-06-09 Thread Paolo Bonzini
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

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Heinrich Schuchardt
On 6/9/21 2:14 PM, Klaus Jensen wrote: On Jun  9 13:46, 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 -

[PATCH v2] async: the main AioContext is only "current" if under the BQL

2021-06-09 Thread Paolo Bonzini
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

Re: [PATCH] vnc: avoid deprecation warnings for SASL on OS X

2021-06-09 Thread Daniel P . Berrangé
On Fri, Jun 04, 2021 at 02:09:15PM +0200, Paolo Bonzini wrote: > Apple has deprecated sasl.h functions in OS X 10.11. Therefore, > all files that use SASL API need to disable -Wdeprecated-declarations. > Remove the only use that is outside vnc-auth-sasl.c and add the > relevant #pragma GCC diagnos

Re: [PATCH v3 4/5] block-copy: add a CoMutex

2021-06-09 Thread Vladimir Sementsov-Ogievskiy
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

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Heinrich Schuchardt
+cc qemu-bl...@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

[PATCH] configure: map x32 to cpu_family x86_64 for meson

2021-06-09 Thread David Michael
The meson.build file defines supported_cpus which does not contain x32, and x32 is not one of meson's stable built-in values: https://mesonbuild.com/Reference-tables.html#cpu-families Signed-off-by: David Michael --- Hi, QEMU fails to build for x32 due to that cpu_family not being defined in su

Re: [PATCH] tests/unit/test-char.c: Fix error handling issues

2021-06-09 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 8 Jun 2021 at 20:51, Marc-André Lureau > wrote: >> >> Hi >> >> On Tue, Jun 8, 2021 at 9:06 PM Peter Maydell >> wrote: >>> I think that improving the quality of the failure reporting >>> in 'make check' is useful, and that we should probably turn >>> on g_test_se

Re: [PATCH v4 01/13] qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful.

2021-06-09 Thread Stefan Hajnoczi
On Tue, Jun 01, 2021 at 03:24:02PM +0200, Gerd Hoffmann wrote: > Setting SYSTEMTAP_TAPSET to some value other than > /usr/share/systemtap/tapsets results in systemtap not finding the > standard tapset library any more, which in turn breaks tracing because > pid() and other standard systemtap functi

Re: [PATCH v4 0/3] vl: add -object support back into -readconfig

2021-06-09 Thread Paolo Bonzini
On 08/06/21 15:14, Markus Armbruster wrote: Regressions are hard to avoid when automated tests are lacking. You touched it, you own it, now write the tests, please;-P Patch sent. Tests will come too. Paolo

[PATCH] qemu-config: use qemu_opts_from_qdict

2021-06-09 Thread Paolo Bonzini
Using qemu_opts_absorb_qdict, and then checking for any leftover options, is redundant because there is already a function that does the same, qemu_opts_from_qdict. qemu_opts_from_qdict consumes the whole dictionary and therefore can just return an error message if an option fails to validate. Th

Re: [PATCH 1/1] hw/nvme: namespace parameter for EUI64

2021-06-09 Thread Klaus Jensen
On Jun 9 14:21, Heinrich Schuchardt wrote: On 6/9/21 2:14 PM, Klaus Jensen wrote: On Jun  9 13:46, 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

Re: [PATCH v4 07/13] meson: move up hw subdir (specifically before trace subdir)

2021-06-09 Thread Stefan Hajnoczi
On Tue, Jun 01, 2021 at 03:24:08PM +0200, Gerd Hoffmann wrote: > Needed so trace/meson.build can see trace_events_config[] > changes done in hw/*/meson.build. > > Signed-off-by: Gerd Hoffmann > --- > meson.build | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Stefan Haj

Re: [PATCH] configure: map x32 to cpu_family x86_64 for meson

2021-06-09 Thread Daniel P . Berrangé
On Wed, Jun 09, 2021 at 08:28:39AM -0400, David Michael wrote: > The meson.build file defines supported_cpus which does not contain > x32, and x32 is not one of meson's stable built-in values: > https://mesonbuild.com/Reference-tables.html#cpu-families > > Signed-off-by: David Michael > --- > >

Re: [PATCH] configure: Check whether we can compile the s390-ccw bios with -msoft-float

2021-06-09 Thread Cornelia Huck
On Tue, May 25 2021, Thomas Huth wrote: > The -msoft-float switch is not available in older versions of Clang. > Since we rely on the compiler to not generate floating point instructions > unexpectedly, we block those old compilers now via a test in the configure > script. Note that for some weir

Re: [PATCH v4 09/13] trace/stap: build stap files for modules

2021-06-09 Thread Stefan Hajnoczi
On Tue, Jun 01, 2021 at 03:24:10PM +0200, Gerd Hoffmann wrote: > @@ -2027,6 +2028,37 @@ foreach d, list : modules >else > softmmu_mods += sl >endif > + if 'CONFIG_TRACE_SYSTEMTAP' in config_host and module_trace_evt != '' > +modname = d + '-' + m > + modlib

Re: [PATCH v4 11/13] virtio-gpu: split trace points

2021-06-09 Thread Stefan Hajnoczi
On Tue, Jun 01, 2021 at 03:24:12PM +0200, Gerd Hoffmann wrote: > Create separate trace points for the simple and virgl > variants of the virtio-gpu device. > > Signed-off-by: Gerd Hoffmann > --- > hw/display/virtio-gpu-virgl.c | 48 +-- > hw/display/trace-events

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Gerd Hoffmann
Hi, > > The #if CONFIG_SDL approach will not work because qemu will continue to > > report sdl as supported even when the sdl module is not installed any > > more. > > I guess we'd need a separate QMP command to fix that, which tries to load > the modules first when being called? Something simi

Re: [PATCH] configure: map x32 to cpu_family x86_64 for meson

2021-06-09 Thread David Michael
On Wed, Jun 9, 2021 at 8:45 AM Daniel P. Berrangé wrote: > On Wed, Jun 09, 2021 at 08:28:39AM -0400, David Michael wrote: > > The meson.build file defines supported_cpus which does not contain > > x32, and x32 is not one of meson's stable built-in values: > > https://mesonbuild.com/Reference-table

Re: [PATCH v2] async: the main AioContext is only "current" if under the BQL

2021-06-09 Thread Kevin Wolf
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

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Markus Armbruster
Gerd Hoffmann writes: > On Wed, Jun 09, 2021 at 12:02:40PM +0200, Thomas Huth wrote: >> Libvirt's "domcapabilities" command has a way to state whether >> certain graphic frontends are available in QEMU or not. Originally, >> libvirt looked at the "--help" output of the QEMU binary to determine >>

Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional

2021-06-09 Thread Markus Armbruster
Thomas Huth writes: > Libvirt's "domcapabilities" command has a way to state whether > certain graphic frontends are available in QEMU or not. Originally, > libvirt looked at the "--help" output of the QEMU binary to determine > whether SDL was available or not (by looking for the "-sdl" paramete

  1   2   3   4   >