Re: Your clang TSA patches

2023-05-09 Thread Marc-André Lureau
Hi Stefan On Mon, May 8, 2023 at 6:54 PM Stefan Hajnoczi wrote: > Hi Marc-André, > clang's Thread Safety Analysis is being used more in the QEMU block > layer and a few limitations have been hit: > 1. Mutexes that are struct fields are not supported (only global mutexes > work). > 2. Analysis do

Re: [PATCH 03/17] qapi: Fix crash on stray double quote character

2023-05-09 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> When the lexer chokes on a stray character, its shows the characters >> until the next structural character in the error message. > > You have a problem > >> It uses a regular expression > > You use regular expresions. > > Now you have two prob

Re: [PATCH 04/17] meson: Fix to make QAPI generator output depend on main.py

2023-05-09 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> @qapi_gen_depends is missing scripts/qapi/main.py. Fix that, and drop >> a duplicate scripts/qapi/common.py. >> >> Signed-off-by: Markus Armbruster > > Reviewed-by: Juan Quintela > > >> --- >> meson.build | 2 +- >> 1 file changed, 1 insert

Re: [PATCH 07/17] qapi: Tidy up a slightly awkward TODO comment

2023-05-09 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> MigrateSetParameters has a TODO comment sitting right behind its doc >> comment. I wrote it this way to keep it out of the manual, but that >> reason is not obvious. >> >> The previous commit (sphinx/qapidoc: Do not emit TODO sections into >>

Re: [PATCH] ui/cursor: incomplete check for integer overflow in cursor_alloc

2023-05-09 Thread Marc-André Lureau
Hi On Mon, May 8, 2023 at 6:21 PM Mauro Matteo Cascella wrote: > The cursor_alloc function still accepts a signed integer for both the > cursor > width and height. A specially crafted negative width/height could make > datasize > wrap around and cause the next allocation to be 0, potentially lea

Re: [PATCH 1/4] virtio-dmabuf: introduce virtio-dmabuf

2023-05-09 Thread Albert Esteve
On Mon, May 8, 2023 at 3:12 PM Cornelia Huck wrote: > On Wed, May 03 2023, Albert Esteve wrote: > > > This API manages objects (in this iteration, > > dmabuf fds) that can be shared along different > > virtio devices. > > > > The API allows the different devices to add, > > remove and/or retriev

Re: [PATCH 10/17] tests/qapi-schema/doc-good: Improve argument description tests

2023-05-09 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Improve the comments to better describe what they test. >> >> Cover argument description starting on a new line indented. This >> style isn't documented in docs/devel/qapi-code-gen.rst. qapi-gen.py >> accepts it, but messes up indentation: it

Re: [PATCH 12/17] qapi: Rewrite parsing of doc comment section symbols and tags

2023-05-09 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> To recognize a line starting with a section symbol and or tag, we >> first split it at the first space, then examine the part left of the >> space. We can just as well examine the unsplit line, so do that. >> >> Signed-off-by: Markus Armbruste

Re: [PATCH 13/17] qapi: Relax doc string @name: description indentation rules

2023-05-09 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> The QAPI schema doc comment language provides special syntax for >> command and event arguments, struct and union members, alternate >> branches, enumeration values, and features: descriptions starting with >> "@name:". >> >> By convention, we

[PATCH v2] virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request

2023-05-09 Thread Mauro Matteo Cascella
Ensure op_info is not NULL in case of QCRYPTODEV_BACKEND_ALG_SYM algtype. Fixes: 0e660a6f90a ("crypto: Introduce RSA algorithm") Signed-off-by: Mauro Matteo Cascella Reported-by: Yiming Tao --- v2: - updated 'Fixes:' tag hw/virtio/virtio-crypto.c | 20 +++- 1 file changed, 11 i

Re: RE: [PATCH] virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request

2023-05-09 Thread Mauro Matteo Cascella
On Tue, May 9, 2023 at 3:47 AM zhenwei pi wrote: > > > > On 5/9/23 09:02, Gonglei (Arei) wrote: > > > > > >> -Original Message- > >> From: Mauro Matteo Cascella [mailto:mcasc...@redhat.com] > >> Sent: Monday, May 8, 2023 11:02 PM > >> To: qemu-devel@nongnu.org > >> Cc: m...@redhat.com; Gon

[PULL 04/17] meson: Fix to make QAPI generator output depend on main.py

2023-05-09 Thread Markus Armbruster
@qapi_gen_depends is missing scripts/qapi/main.py. Fix that, and drop a duplicate scripts/qapi/common.py. Signed-off-by: Markus Armbruster Message-Id: <20230428105429.1687850-5-arm...@redhat.com> Reviewed-by: Juan Quintela --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PULL 08/17] qapi/dump: Indent bulleted lists consistently

2023-05-09 Thread Markus Armbruster
Documentation of dump-guest-memory contains two bulleted lists. The first one is indented, the second one isn't. Delete the first one's indentation for a more consistent look. Signed-off-by: Markus Armbruster Message-Id: <20230428105429.1687850-9-arm...@redhat.com> Reviewed-by: Juan Quintela -

[PULL 01/17] docs/devel/qapi-code-gen: Clean up use of quotes a bit

2023-05-09 Thread Markus Armbruster
Section "Definition documentation" uses both single and double quotes around doc text snippets. Stick to double quotes. Signed-off-by: Markus Armbruster Message-Id: <20230428105429.1687850-2-arm...@redhat.com> Reviewed-by: Juan Quintela --- docs/devel/qapi-code-gen.rst | 12 ++-- 1 fil

[PULL 11/17] qapi: Fix argument description indentation stripping

2023-05-09 Thread Markus Armbruster
When an argument's description starts on the line after the "#arg: " line, indentation is stripped only from the description's first line, as demonstrated by the previous commit. Moreover, subsequent lines with less indentation are not rejected. Make the first line's indentation the expected inde

[PULL 10/17] tests/qapi-schema/doc-good: Improve argument description tests

2023-05-09 Thread Markus Armbruster
Improve the comments to better describe what they test. Cover argument description starting on a new line indented. This style isn't documented in docs/devel/qapi-code-gen.rst. qapi-gen.py accepts it, but messes up indentation: it's stripped from the first line, not subsequent ones. The next co

[PULL 00/17] QAPI patches patches for 2023-05-09

2023-05-09 Thread Markus Armbruster
The following changes since commit 792f77f376adef944f9a03e601f6ad90c2f891b2: Merge tag 'pull-loongarch-20230506' of https://gitlab.com/gaosong/qemu into staging (2023-05-06 08:11:52 +0100) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2023-05-09

[PULL 03/17] qapi: Fix crash on stray double quote character

2023-05-09 Thread Markus Armbruster
When the lexer chokes on a stray character, its shows the characters until the next structural character in the error message. It uses a regular expression to match a non-empty string of non-structural characters. Bug: the regular expression treats '"' as structural. When the lexer chokes on '"',

[PULL 16/17] qga/qapi-schema: Reformat doc comments to conform to current conventions

2023-05-09 Thread Markus Armbruster
Change # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed #do eiusmod tempor incididunt ut labore et dolore magna aliqua. to # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed # do eiusmod tempor incididunt ut labore et dolore mag

[PULL 02/17] docs/devel/qapi-code-gen: Turn FIXME admonitions into comments

2023-05-09 Thread Markus Armbruster
We have two FIXME notes. These FIXMEs are for QAPI developers. They are not useful for QAPI schema developers. They are marked up as admonitions, which makes them look important in generated HTML. Turn them into comments. QAPI developers will still see them (they read and write the .rst). QAP

[PULL 12/17] qapi: Rewrite parsing of doc comment section symbols and tags

2023-05-09 Thread Markus Armbruster
To recognize a line starting with a section symbol and or tag, we first split it at the first space, then examine the part left of the space. We can just as well examine the unsplit line, so do that. Signed-off-by: Markus Armbruster Message-Id: <20230428105429.1687850-13-arm...@redhat.com> Revie

[PULL 09/17] tests/qapi-schema/doc-good: Improve a comment

2023-05-09 Thread Markus Armbruster
The QAPI generator doesn't reject undocumented members and features (yet). doc-good.json covers this, with clear "is undocumented" notes to signal intent. Except for @Variant1 member @var1, where it's "(but no @var: line)". Less clear. Replace by "@var1 is undocumented". Signed-off-by: Markus A

[PULL 14/17] qapi: Section parameter @indent is no longer used, drop

2023-05-09 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230428105429.1687850-15-arm...@redhat.com> Reviewed-by: Juan Quintela --- scripts/qapi/parser.py | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py i

[PULL 13/17] qapi: Relax doc string @name: description indentation rules

2023-05-09 Thread Markus Armbruster
The QAPI schema doc comment language provides special syntax for command and event arguments, struct and union members, alternate branches, enumeration values, and features: descriptions starting with "@name:". By convention, we format them like this: # @name: Lorem ipsum dolor sit amet, cons

[PULL 06/17] sphinx/qapidoc: Do not emit TODO sections into user manuals

2023-05-09 Thread Markus Armbruster
QAPI doc comments are for QMP users: they go into the "QEMU QMP Reference Manual" and the "QEMU Storage Daemon QMP Reference Manual". The doc comment TODO sections are for somebody else, namely for the people who can do: developers. Do not emit them into the user manuals. This elides the followi

[PULL 15/17] docs/devel/qapi-code-gen: Update doc comment conventions

2023-05-09 Thread Markus Armbruster
The commit before previous relaxed the indentation rules to let us improve the doc comment conventions. This commit changes the written conventions. The next commits will update QAPI schemas to conform to them. Signed-off-by: Markus Armbruster Message-Id: <20230428105429.1687850-16-arm...@redha

[PULL 07/17] qapi: Tidy up a slightly awkward TODO comment

2023-05-09 Thread Markus Armbruster
MigrateSetParameters has a TODO comment sitting right behind its doc comment. I wrote it this way to keep it out of the manual, but that reason is not obvious. The previous commit (sphinx/qapidoc: Do not emit TODO sections into user manuals) lets me move it into the doc comment as a TODO section.

[PULL 05/17] Revert "qapi: BlockExportRemoveMode: move comments to TODO"

2023-05-09 Thread Markus Armbruster
This reverts commit 97cd74f77231f3897838f8db32b659d94803e01f. The next commit will hide TODO: sections. See there for rationale. Signed-off-by: Markus Armbruster Message-Id: <20230428105429.1687850-6-arm...@redhat.com> Reviewed-by: Juan Quintela --- qapi/block-export.json | 10 +- 1 f

Re: [PATCH] virtio-net: not enable vq reset feature unconditionally

2023-05-09 Thread Eugenio Perez Martin
On Mon, May 8, 2023 at 8:11 PM Michael S. Tsirkin wrote: > > On Mon, May 08, 2023 at 07:31:35PM +0200, Eugenio Perez Martin wrote: > > On Mon, May 8, 2023 at 12:22 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 08, 2023 at 11:09:46AM +0200, Eugenio Perez Martin wrote: > > > > On Sat, May 6,

Re: [PATCH v20 10/21] machine: adding s390 topology to info hotpluggable-cpus

2023-05-09 Thread Pierre Morel
On 5/8/23 21:49, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch

Re: Your clang TSA patches

2023-05-09 Thread Kevin Wolf
Am 09.05.2023 um 09:00 hat Marc-André Lureau geschrieben: > Hi Stefan > > On Mon, May 8, 2023 at 6:54 PM Stefan Hajnoczi wrote: > > > Hi Marc-André, > > clang's Thread Safety Analysis is being used more in the QEMU block > > layer and a few limitations have been hit: > > 1. Mutexes that are stru

[PATCH v2] vhost: fix possible wrap in SVQ descriptor ring

2023-05-09 Thread Hawkins Jiawei
QEMU invokes vhost_svq_add() when adding a guest's element into SVQ. In vhost_svq_add(), it uses vhost_svq_available_slots() to check whether QEMU can add the element into SVQ. If there is enough space, then QEMU combines some out descriptors and some in descriptors into one descriptor chain, and a

Re: [PATCH v20 08/21] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-05-09 Thread Pierre Morel
On 5/8/23 21:42, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor p

Re: [PATCH 13/17] qapi: Relax doc string @name: description indentation rules

2023-05-09 Thread Markus Armbruster
Markus Armbruster writes: > Juan Quintela writes: [...] >>> docs/devel/qapi-code-gen.rst | 10 ++-- >>> scripts/qapi/parser.py| 73 +++ >>> tests/qapi-schema/doc-bad-indent.err | 2 +- >>> tests/qapi-schema/doc-bad-indent.json | 3 +- >> >> b

Re: [PATCH 0/4] vhost-user-fs: Internal migration

2023-05-09 Thread Hanna Czenczek
On 08.05.23 23:10, Stefan Hajnoczi wrote: On Fri, May 05, 2023 at 02:51:55PM +0200, Hanna Czenczek wrote: On 05.05.23 11:53, Eugenio Perez Martin wrote: On Fri, May 5, 2023 at 11:03 AM Hanna Czenczek wrote: On 04.05.23 23:14, Stefan Hajnoczi wrote: On Thu, 4 May 2023 at 13:39, Hanna Czenczek

Re: [PATCH 0/4] vhost-user-fs: Internal migration

2023-05-09 Thread Hanna Czenczek
On 08.05.23 21:31, Eugenio Perez Martin wrote: On Mon, May 8, 2023 at 7:51 PM Eugenio Perez Martin wrote: On Mon, May 8, 2023 at 7:00 PM Hanna Czenczek wrote: On 05.05.23 16:37, Hanna Czenczek wrote: On 05.05.23 16:26, Eugenio Perez Martin wrote: On Fri, May 5, 2023 at 11:51 AM Hanna Czencz

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-05-09 Thread Hanna Czenczek
On 09.05.23 08:31, Eugenio Perez Martin wrote: On Mon, May 8, 2023 at 9:12 PM Stefan Hajnoczi wrote: [...] VHOST_USER_GET_VRING_BASE itself isn't really enough because it stops a specific virtqueue but not the whole device. Unfortunately stopping all virtqueues is not the same as SUSPEND sin

[RFC PATCH] QCOW2: Add zeroes discard option

2023-05-09 Thread Jean-Louis Dupond
When we have a sparse qcow2 image and discard: unmap is enabled, there is a lot of fragmentation in the image after some time. Surely on VM's that do a lot of writes/deletes. This causes the qcow2 image to grow even over 110% of its virtual size, this because the free gaps in the image get to small

[PULL 04/16] call_rcu: stop using mb_set/mb_read

2023-05-09 Thread Paolo Bonzini
Use a store-release when enqueuing a new call_rcu, and a load-acquire when dequeuing; and read the tail after checking that node->next is consistent, which is the standard message passing pattern and it is clearer than mb_read/mb_set. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini -

[PULL 00/16] Misc patches for 2023-05-09

2023-05-09 Thread Paolo Bonzini
The following changes since commit 792f77f376adef944f9a03e601f6ad90c2f891b2: Merge tag 'pull-loongarch-20230506' of https://gitlab.com/gaosong/qemu into staging (2023-05-06 08:11:52 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you

[PULL 13/16] target/i386: Add VNMI and automatic IBRS feature bits

2023-05-09 Thread Paolo Bonzini
From: Babu Moger Add the following featute bits. vnmi: Virtual NMI (VNMI) allows the hypervisor to inject the NMI into the guest without using Event Injection mechanism meaning not required to track the guest NMI and intercepting the IRET. The presence of this feature is indica

[PULL 06/16] MAINTAINERS: add stanza for Kconfig files

2023-05-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 55102f476184..f757369373f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3910,6 +3910,16 @@ F: configure F: scripts/mtest2make.py F: tests/Makefile.inclu

[PULL 01/16] rcu: remove qatomic_mb_set, expand comments

2023-05-09 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/qemu/rcu.h | 5 - util/rcu.c | 24 +++- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 313fc414bc2a..661c1a146872 100644 --- a/

[PULL 03/16] test-aio-multithread: simplify test_multi_co_schedule

2023-05-09 Thread Paolo Bonzini
Instead of using qatomic_mb_{read,set} mindlessly, just use a per-coroutine flag that requires no synchronization. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- tests/unit/test-aio-multithread.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --gi

[PULL 15/16] docs: clarify --without-default-devices

2023-05-09 Thread Paolo Bonzini
--without-default-devices is a specialized option that should only be used when configs/devices/ is changed manually. Explain the model towards which we should tend, with respect to failures to start guests and to run "make check". Signed-off-by: Paolo Bonzini --- docs/devel/kconfig.rst | 16 ++

[PULL 12/16] target/i386: Add missing feature bits in EPYC-Milan model

2023-05-09 Thread Paolo Bonzini
From: Babu Moger Add the following feature bits for EPYC-Milan model and bump the version. vaes: Vector VAES(ENC|DEC), VAES(ENC|DEC)LAST instruction support vpclmulqdq : Vector VPCLMULQDQ instruction support stibp-always-on : Single Thread Indirect Branch Prediction Mode has enha

[PULL 08/16] target/i386: allow versioned CPUs to specify new cache_info

2023-05-09 Thread Paolo Bonzini
From: Michael Roth New EPYC CPUs versions require small changes to their cache_info's. Because current QEMU x86 CPU definition does not support versioned cach_info, we would have to declare a new CPU type for each such case. To avoid the dup work, add "cache_info" in X86CPUVersionDefinition", to

[PULL 10/16] target/i386: Add a couple of feature bits in 8000_0008_EBX

2023-05-09 Thread Paolo Bonzini
From: Babu Moger Add the following feature bits. amd-psfd : Predictive Store Forwarding Disable: PSF is a hardware-based micro-architectural optimization designed to improve the performance of code execution by predicting address dependencies between loads and st

[PULL 09/16] target/i386: Add new EPYC CPU versions with updated cache_info

2023-05-09 Thread Paolo Bonzini
From: Michael Roth Introduce new EPYC cpu versions: EPYC-v4 and EPYC-Rome-v3. The only difference vs. older models is an updated cache_info with the 'complex_indexing' bit unset, since this bit is not currently defined for AMD and may cause problems should it be used for something else in the fut

[PULL 05/16] tb-maint: do not use mb_read/mb_set

2023-05-09 Thread Paolo Bonzini
The load side can use a relaxed load, which will surely happen before the work item is run by async_safe_run_on_cpu() or before double-checking under mmap_lock. The store side can use an atomic RMW operation. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- accel/tcg/tb-maint.c

[PULL 02/16] test-aio-multithread: do not use mb_read/mb_set for simple flags

2023-05-09 Thread Paolo Bonzini
The remaining use of mb_read/mb_set is just to force a thread to exit eventually. It does not order two memory accesses and therefore can be just read/set. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- tests/unit/test-aio-multithread.c | 12 ++-- 1 file changed, 6 ins

[PULL 14/16] target/i386: Add EPYC-Genoa model to support Zen 4 processor series

2023-05-09 Thread Paolo Bonzini
From: Babu Moger Adds the support for AMD EPYC Genoa generation processors. The model display for the new processor will be EPYC-Genoa. Adds the following new feature bits on top of the feature bits from the previous generation EPYC models. avx512f : AVX-512 Foundation instruction avx51

[PULL 16/16] meson: leave unnecessary modules out of the build

2023-05-09 Thread Paolo Bonzini
meson.build files choose whether to build modules based on foo.found() expressions. If a feature is enabled (e.g. --enable-gtk), these expressions are true even if the code is not used by any emulator, and this results in an unexpected difference between modular and non-modular builds. For non-mo

[PULL 07/16] include/qemu/osdep.h: Bump _WIN32_WINNT to the Windows 8 API

2023-05-09 Thread Paolo Bonzini
From: Thomas Huth Commit cf60ccc330 ("cutils: Introduce bundle mechanism") abandoned compatibility with Windows older than 8 - we should reflect this in our _WIN32_WINNT and set it to the value that corresponds to Windows 8. Signed-off-by: Thomas Huth Message-Id: <20230504081351.125140-1-th...@

Re: [PATCH 0/2] target/i386: add support for cpu FLUSH_L1D feature and FB_CLEAR capability

2023-05-09 Thread Paolo Bonzini
Queued, thanks. Paolo

[PULL 11/16] target/i386: Add feature bits for CPUID_Fn80000021_EAX

2023-05-09 Thread Paolo Bonzini
From: Babu Moger Add the following feature bits. no-nested-data-bp : Processor ignores nested data breakpoints. lfence-always-serializing : LFENCE instruction is always serializing. null-sel-cls-base : Null Selector Clears Base. When this bit is set, a

[PATCH] target/arm: Correct AArch64.S2MinTxSZ 32-bit EL1 input size check

2023-05-09 Thread Peter Maydell
In check_s2_mmu_setup() we have a check that is attempting to implement the part of AArch64.S2MinTxSZ that is specific to when EL1 is AArch32: if !s1aarch64 then // EL1 is AArch32 min_txsz = Min(min_txsz, 24); Unfortunately we got this wrong in two ways: (1) The minimum txsz

Re: [PATCH v4 30/57] tcg/sparc64: Allocate %g2 as a third temporary

2023-05-09 Thread Peter Maydell
On Mon, 8 May 2023 at 16:17, Richard Henderson wrote: > > On 5/5/23 13:19, Peter Maydell wrote: > > On Wed, 3 May 2023 at 08:17, Richard Henderson > > wrote: > >> > >> Signed-off-by: Richard Henderson > >> --- > >> tcg/sparc64/tcg-target.c.inc | 15 +++ > >> 1 file changed, 7 inse

Re: [PATCH 05/22] hw/arm: Select VIRTIO_NET for virt machine

2023-05-09 Thread Peter Maydell
On Mon, 8 May 2023 at 23:24, Paolo Bonzini wrote: > --without-default-devices is not about choosing to not build > some devices; it is about making non-selected devices opt-in > rather than opt-out. Hmm, so it's basically "the person doing the configuration needs to know what they're doing, the K

RE: [PATCH v2] virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request

2023-05-09 Thread Gonglei (Arei)
> -Original Message- > From: Mauro Matteo Cascella [mailto:mcasc...@redhat.com] > Sent: Tuesday, May 9, 2023 3:53 PM > To: qemu-devel@nongnu.org > Cc: m...@redhat.com; Gonglei (Arei) ; > pizhen...@bytedance.com; ta...@zju.edu.cn; mcasc...@redhat.com > Subject: [PATCH v2] virtio-crypto: f

Re: [PATCH v2] vfio/pci: Static Resizable BAR capability

2023-05-09 Thread Cédric Le Goater
On 5/6/23 01:23, Alex Williamson wrote: The PCI Resizable BAR (ReBAR) capability is currently hidden from the VM because the protocol for interacting with the capability does not support a mechanism for the device to reject an advertised supported BAR size. However, when assigned to a VM, the ac

Re: [PATCH v3 2/6] ui: add the infrastructure to support MT events

2023-05-09 Thread Sergio Lopez
On Mon, Apr 17, 2023 at 12:57:08PM +0200, Markus Armbruster wrote: > Sergio Lopez writes: > > > Add the required infrastructure to support generating multitouch events. > > > > Signed-off-by: Sergio Lopez > > Reviewed-by: Marc-André Lureau > > --- > > include/ui/input.h| 3 +++ > > qapi/u

Re: [PATCH 05/22] hw/arm: Select VIRTIO_NET for virt machine

2023-05-09 Thread Paolo Bonzini
On 5/9/23 11:27, Peter Maydell wrote: On Mon, 8 May 2023 at 23:24, Paolo Bonzini wrote: --without-default-devices is not about choosing to not build some devices; it is about making non-selected devices opt-in rather than opt-out. Hmm, so it's basically "the person doing the configuration nee

Re: [PATCH 6/6] target/ppc: Implement HEIR SPR

2023-05-09 Thread Harsh Prateek Bora
On Thu, Mar 23, 2023 at 12:22:37PM +1000, Nicholas Piggin wrote: > The hypervisor emulation assistance interrupt modifies HEIR to > contain the value of the instruction which caused the exception. > > Signed-off-by: Nicholas Piggin > --- > target/ppc/cpu.h | 1 + > target/ppc/cpu_init.c

[PATCH v4 0/6] Implement virtio-multitouch and enable GTK3 to use it

2023-05-09 Thread Sergio Lopez
This series adds a virtio-multitouch device to the family of devices emulated by virtio-input implementing the Multi-touch protocol as descripted here: https://www.kernel.org/doc/html/latest/input/multi-touch-protocol.html?highlight=multi+touch It also extends the GTK UI backend to be able to rec

[PATCH v4 2/6] ui: add the infrastructure to support MT events

2023-05-09 Thread Sergio Lopez
Add the required infrastructure to support generating multitouch events. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --- include/ui/input.h| 3 +++ qapi/ui.json | 58 --- replay/replay-input.c | 18 ++ ui/input.c

[PATCH v4 3/6] virtio-input: add a virtio-mulitouch device

2023-05-09 Thread Sergio Lopez
Add a virtio-multitouch device to the family of devices emulated by virtio-input implementing the Multi-touch protocol as descripted here: https://www.kernel.org/doc/html/latest/input/multi-touch-protocol.html?highlight=multi+touch This patch just add the device itself, without connecting it to a

[PATCH v4 4/6] virtio-input-pci: add virtio-multitouch-pci

2023-05-09 Thread Sergio Lopez
Add virtio-multitouch-pci, a Multitouch-capable input device, to the list of devices that can be provided by virtio-input-pci. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --- hw/virtio/virtio-input-pci.c | 25 + 1 file changed, 21 insertions(+), 4 deletion

[PATCH v4 6/6] ui/gtk: enable backend to send multi-touch events

2023-05-09 Thread Sergio Lopez
GTK3 provides the infrastructure to receive and process multi-touch events through the "touch-event" signal and the GdkEventTouch type. Make use of it to transpose events from the host to the guest. This allows users of machines with hardware capable of receiving multi-touch events to run guests t

[PATCH v4 1/6] virtio-input: generalize virtio_input_key_config()

2023-05-09 Thread Sergio Lopez
As there are other bitmap-based config properties that need to be dealt in a similar fashion as VIRTIO_INPUT_CFG_EV_BITS, generalize the function to receive select and subsel as arguments, and rename it to virtio_input_extend_config() Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --

[PATCH v4 5/6] ui: add helpers for virtio-multitouch events

2023-05-09 Thread Sergio Lopez
Add helpers for generating Multi-touch events from the UI backends that can be sent to the guest through a virtio-multitouch device. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --- include/ui/input.h | 5 + ui/input.c | 36 2 file

Re: [PATCH] block/export: call blk_set_dev_ops(blk, NULL, NULL)

2023-05-09 Thread Kevin Wolf
Am 02.05.2023 um 23:11 hat Stefan Hajnoczi geschrieben: > Most export types install BlockDeviceOps pointers. It is easy to forget > to remove them because that happens automatically via the "drive" qdev > property in hw/ but not block/export/. > > Put blk_set_dev_ops(blk, NULL, NULL) calls in the

Re: [PATCH 05/22] hw/arm: Select VIRTIO_NET for virt machine

2023-05-09 Thread Peter Maydell
On Tue, 9 May 2023 at 10:42, Paolo Bonzini wrote: > > On 5/9/23 11:27, Peter Maydell wrote: > > On Mon, 8 May 2023 at 23:24, Paolo Bonzini wrote: > >> --without-default-devices is not about choosing to not build > >> some devices; it is about making non-selected devices opt-in > >> rather than op

Re: [PATCH 10/17] tests/qapi-schema/doc-good: Improve argument description tests

2023-05-09 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Markus Armbruster wrote: >>> Improve the comments to better describe what they test. >>> >>> Cover argument description starting on a new line indented. This >>> style isn't documented in docs/devel/qapi-code-gen.rst. qapi-gen.py >>> accept

Re: [PATCH 4/4] libvhost-user: add write_msg cb to dev struct

2023-05-09 Thread Marc-André Lureau
Hi On Wed, May 3, 2023 at 12:21 PM Albert Esteve wrote: > Add vu_write_msg_cb type as a member of the VuDev > struct. > > In order to interact with the virtio-dmabuf > API, vhost-user backends have available a special > message type that can be sent to the frontend > in Qemu, in order to add, lo

Re: [RFC v2 1/1] migration: Update error description whenever migration fails

2023-05-09 Thread Juan Quintela
"tejus.gk" wrote: > There are places in the code where the migration is marked failed with > MIGRATION_STATUS_FAILED, but the failiure reason is never updated. Hence > libvirt doesn't know why the migration failed when it queries for it. > > Signed-off-by: tejus.gk > --- > migration/migration.c

Re: Question about graph locking preconditions regarding qemu_in_main_thread()

2023-05-09 Thread Fiona Ebner
Am 08.05.23 um 12:40 schrieb Kevin Wolf: > Am 05.05.2023 um 11:35 hat Fiona Ebner geschrieben: >> Hi, >> I noticed that the bdrv_graph_co_rd_lock() and bdrv_graph_co_rd_unlock() >> functions use qemu_in_main_thread() as a conditional to return early. >> What high-level requirements ensure that qemu

[PATCH] libvhost-user: Fix update of signalled_used

2023-05-09 Thread Nir Soffer
When we check if a driver needs a signal, we compare: - used_event: written by the driver each time it consumes an item - new: current idx written to the used ring, updated by us - old: last idx we signaled about We call vring_need_event() which does: return (__u16)(new_idx - event_idx - 1)

Re: [PATCH 10/21] migration: Move rate_limit_max and rate_limit_used to migration_stats

2023-05-09 Thread Harsh Prateek Bora
On 5/8/23 18:38, Juan Quintela wrote: This way we can make them atomic and use this functions from any s/this/these place. I also moved all functions that use rate_limit to migration-stats. Functions got renamed, they are not qemu_file anymore. qemu_file_rate_limit -> migration_rate_lim

Re: Cortex-R52 support in Qemu

2023-05-09 Thread Ayan Kumar Halder
On 05/05/2023 15:15, Tobias Röhmel wrote: Hi Ayan, Hi Tobias, as far as I know, there is no board/SoC that uses the Cortex-R52 in Qemu right now. If you want, I can try to find the one that I used during development. I was able to run Zephyr in Qemu with that code. Appreciate your pointers

Re: [PATCH v2 2/6] ram: Let colo_flush_ram_cache take the bitmap_mutex

2023-05-09 Thread Juan Quintela
Lukas Straub wrote: > This is not required, colo_flush_ram_cache does not run concurrently > with the multifd threads since the cache is only flushed after > everything has been received. But it makes me more comfortable. > > This will be used in the next commits to add colo support to multifd. >

Re: [PATCH v2 1/6] ram: Add public helper to set colo bitmap

2023-05-09 Thread Juan Quintela
Lukas Straub wrote: > The overhead of the mutex in non-multifd mode is negligible, > because in that case its just the single thread taking the mutex. > > This will be used in the next commits to add colo support to multifd. > > Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela queued.

Re: [PATCH v2 5/6] multifd: Add the ramblock to MultiFDRecvParams

2023-05-09 Thread Juan Quintela
Lukas Straub wrote: > This will be used in the next commits to add colo support to multifd. > > Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela queued.

[PATCH v2] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-09 Thread Narayana Murty N
Currently on PPC64 qemu always dumps the guest memory in Big Endian (BE) format even though the guest running in Little Endian (LE) mode. So crash tool fails to load the dump as illustrated below: Log : $ virsh dump DOMAIN --memory-only dump.file Domain 'DOMAIN' dumped to dump.file $ crash vmlin

Re: [PATCH 1/4] virtio-dmabuf: introduce virtio-dmabuf

2023-05-09 Thread Marc-André Lureau
Hi On Wed, May 3, 2023 at 12:21 PM Albert Esteve wrote: > This API manages objects (in this iteration, > dmabuf fds) that can be shared along different > virtio devices. > > The API allows the different devices to add, > remove and/or retrieve the objects by simply > invoking the public function

Re: [PULL 47/53] target/i386: reimplement 0x0f 0x28-0x2f, add AVX

2023-05-09 Thread Peter Maydell
On Tue, 18 Oct 2022 at 15:32, Paolo Bonzini wrote: > > Here the code is a bit uglier due to the truncation and extension > of registers to and from 32-bit. There is also a mistake in the > manual with respect to the size of the memory operand of CVTPS2PI > and CVTTPS2PI, reported by Ricky Zhou. >

Re: [PATCH 05/22] hw/arm: Select VIRTIO_NET for virt machine

2023-05-09 Thread Paolo Bonzini
On 5/9/23 12:00, Peter Maydell wrote: On Tue, 9 May 2023 at 10:42, Paolo Bonzini wrote: On 5/9/23 11:27, Peter Maydell wrote: On Mon, 8 May 2023 at 23:24, Paolo Bonzini wrote: --without-default-devices is not about choosing to not build some devices; it is about making non-selected devices

Re: Your clang TSA patches

2023-05-09 Thread Stefan Hajnoczi
On Tue, 9 May 2023 at 03:01, Marc-André Lureau wrote: > > Hi Stefan > > On Mon, May 8, 2023 at 6:54 PM Stefan Hajnoczi wrote: >> >> Hi Marc-André, >> clang's Thread Safety Analysis is being used more in the QEMU block >> layer and a few limitations have been hit: >> 1. Mutexes that are struct fie

Re: [PATCH v1 0/1] Add support for namespace attach/detach during runtime

2023-05-09 Thread Klaus Jensen
On May 5 14:12, Daniel Wagner wrote: > This is a follow up on a very old thread[1]. My aim is to attach/detatch nvme > devices during runtime and test the Linux nvme subsystem in the guest. > > In order to it working, I had first to add hotplug able PCI bus and the > nvme-subsystem. The nvme-subs

[PATCH] iotests: Test resizing image attached to an iothread

2023-05-09 Thread Kevin Wolf
This tests that trying to resize an image with QMP block_resize doesn't hang or otherwise fail when the image is attached to a device running in an iothread. This is a regression test for the recent fix that changed qmp_block_resize, which is a coroutine based QMP handler, to avoid calling no_coro

Re: [PATCH 10/21] migration: Move rate_limit_max and rate_limit_used to migration_stats

2023-05-09 Thread Juan Quintela
Harsh Prateek Bora wrote: > On 5/8/23 18:38, Juan Quintela wrote: >> This way we can make them atomic and use this functions from any > > s/this/these > Fixed. Thanks.

Re: [PATCH 4/4] libvhost-user: add write_msg cb to dev struct

2023-05-09 Thread Albert Esteve
Hi! On Tue, May 9, 2023 at 12:12 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Wed, May 3, 2023 at 12:21 PM Albert Esteve wrote: > >> Add vu_write_msg_cb type as a member of the VuDev >> struct. >> >> In order to interact with the virtio-dmabuf >> API, vhost-user backends

Re: [PATCH] libvhost-user: Fix update of signalled_used

2023-05-09 Thread Stefan Hajnoczi
On Tue, 9 May 2023 at 06:28, Nir Soffer wrote: > > When we check if a driver needs a signal, we compare: > > - used_event: written by the driver each time it consumes an item In practice drivers tend to update it as you described, but devices cannot make that assumption. used_event is simply the

Re: [PATCH 05/22] hw/arm: Select VIRTIO_NET for virt machine

2023-05-09 Thread Alex Bennée
Paolo Bonzini writes: > On 5/9/23 12:00, Peter Maydell wrote: >> On Tue, 9 May 2023 at 10:42, Paolo Bonzini wrote: >>> >>> On 5/9/23 11:27, Peter Maydell wrote: On Mon, 8 May 2023 at 23:24, Paolo Bonzini wrote: > --without-default-devices is not about choosing to not build > some

Re: [PATCH 02/21] migration: Don't use INT64_MAX for unlimited rate

2023-05-09 Thread Harsh Prateek Bora
On 5/8/23 18:38, Juan Quintela wrote: Use 0 instead. Signed-off-by: Juan Quintela --- migration/migration.c | 4 ++-- migration/qemu-file.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 1192f1ebf1..3979a98949 1

Re: [PATCH 02/21] migration: Don't use INT64_MAX for unlimited rate

2023-05-09 Thread Juan Quintela
Harsh Prateek Bora wrote: > On 5/8/23 18:38, Juan Quintela wrote: >> Use 0 instead. >> Signed-off-by: Juan Quintela >> --- >> migration/migration.c | 4 ++-- >> migration/qemu-file.c | 3 +++ >> 2 files changed, 5 insertions(+), 2 deletions(-) >> diff --git a/migration/migration.c b/migration

Re: [PATCH qemu] ui/dbus: Implement damage regions for GL

2023-05-09 Thread Marc-André Lureau
Hi On Tue, May 9, 2023 at 3:25 PM ~bilelmoussaoui wrote: > From: Christian Hergert > > Currently, when using `-display dbus,gl=on` all updates to the client > become "full scanout" updates, meaning there is no way for the client to > limit damage regions to the display server. > > Instead of us

Re: [PATCH 05/22] hw/arm: Select VIRTIO_NET for virt machine

2023-05-09 Thread Paolo Bonzini
On 5/9/23 13:37, Alex Bennée wrote: Then, an accurate description that uses "functional" in that sense could be as follows: The Kconfig system will include any devices and subsystems that are mandatory for a given machine type, and will flag any configuration conflicts. However, the person

Re: [RFC v2 1/1] migration: Update error description whenever migration fails

2023-05-09 Thread Tejus GK
On 08/05/23 10:19 pm, Thomas Huth wrote: >  Hi! > > On 08/05/2023 17.32, tejus.gk wrote: >> There are places in the code where the migration is marked failed with >> MIGRATION_STATUS_FAILED, but the failiure reason is never updated. Hence > > s/failiure/failure/ Ack > >> libvirt doesn't know

Re: [PATCH 02/21] migration: Don't use INT64_MAX for unlimited rate

2023-05-09 Thread Harsh Prateek Bora
On 5/9/23 17:21, Juan Quintela wrote: Harsh Prateek Bora wrote: On 5/8/23 18:38, Juan Quintela wrote: Use 0 instead. Signed-off-by: Juan Quintela --- migration/migration.c | 4 ++-- migration/qemu-file.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/migratio

  1   2   3   >