Re: [PATCH] target/i386: cmpxchg should not touch accumulator

2021-08-02 Thread Richard Henderson
On 7/31/21 9:06 AM, yqwfh wrote: Signed-off-by: Daniele Ahmed --- target/i386/tcg/translate.c | 9 - 1 file changed, 9 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index aacb605..41386dd 100644 --- a/target/i386/tcg/translate.c +++

Re: [PATCH-for-6.2 2/4] target/mips: Decode vendor extensions before MIPS ISAs

2021-08-02 Thread Richard Henderson
On 8/1/21 1:42 PM, Philippe Mathieu-Daudé wrote: In commit ffc672aa977 ("target/mips/tx79: Move MFHI1 / MFLO1 opcodes to decodetree") we misplaced the decoder call. Move it to the correct place. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/translate.c | 8 +--- 1 file

Re: [PATCH-for-6.2 4/4] target/mips: Rename 'rtype' as 'r'

2021-08-02 Thread Richard Henderson
On 8/1/21 1:42 PM, Philippe Mathieu-Daudé wrote: We'll soon have more opcode and decoded arguments, and 'rtype' is not very helpful. Naming it simply 'r' ease reviewing the .decode files when we have many opcodes. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/msa.decode | 4

Re: [PATCH-for-6.2 4/5] target/mips: Convert Vr54xx MUL* opcodes to decodetree

2021-08-02 Thread Richard Henderson
On 8/1/21 1:59 PM, Philippe Mathieu-Daudé wrote: Convert the following Integer Multiply-Accumulate opcodes: * MULHIMultiply and move HI * MULHIU Unsigned multiply and move HI * MULS Multiply, negate, and move LO * MULSHI Multiply, negate, and move HI *

Re: [PATCH-for-6.2 5/5] target/mips: Convert Vr54xx MSA* opcodes to decodetree

2021-08-02 Thread Richard Henderson
On 8/1/21 1:59 PM, Philippe Mathieu-Daudé wrote: Convert the following Integer Multiply-Accumulate opcodes: * MSAC Multiply, negate, accumulate, and move LO * MSACHI Multiply, negate, accumulate, and move HI * MSACHIU Unsigned multiply, negate, accumulate, and move HI

Re: [PATCH for-6.2 01/10] docs: qom: Replace old GTK-Doc #symbol syntax with `symbol`

2021-08-02 Thread Peter Maydell
On Thu, 29 Jul 2021 at 19:00, Eduardo Habkost wrote: > > Replace leftover of GTK-Doc #name syntax with `name`, and use > default-role:: any, so we can add references to other functions, > types, and macros. > > There are 3 cases that required extra care: > - #TypeInfo.class_init: kernel-doc

[PATCH 5/5] seccomp: block setns, unshare and execveat syscalls

2021-08-02 Thread Daniel P . Berrangé
setns/unshare are used to change namespaces which is not something QEMU needs to be able todo. execveat is a new variant of execve so should be blocked just like execve already is. Signed-off-by: Daniel P. Berrangé --- softmmu/qemu-seccomp.c | 5 + 1 file changed, 5 insertions(+) diff

[Bug 1890160] Re: Abort in vmxnet3_validate_queues

2021-08-02 Thread Thomas Huth
Fixed here: https://gitlab.com/qemu-project/qemu/-/commit/9010b0c7a9a097590e183 ** Changed in: qemu Status: In Progress => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1890160

Re: [PATCH for-6.2 00/43] Unaligned accesses for user-only

2021-08-02 Thread Peter Maydell
On Thu, 29 Jul 2021 at 01:50, Richard Henderson wrote: > > This began with Peter wanting a cpu_ldst.h interface that can handle > alignment info for Arm M-profile system mode, which will also compile > for user-only without ifdefs. This is patch 32. > > Once I had that interface, I thought I

Re: [PATCH] hw/char/virtio-serial-bus: fix: Unpop throttled VirtQueueElement to queue before discard vq data

2021-08-02 Thread Laurent Vivier
On 30/07/2021 03:58, AIERPATIJIANG1 [艾尔帕提江·阿布都赛买提] wrote: > Ports enter a "throttled" state when writing to the chardev would block. > The current output VirtQueueElement is kept around until the chardev > becomes writable again. > > Because closing the virtio serial device does not reset the

Re: [PATCH v1] softmmu/physmem: fix wrong assertion in qemu_ram_alloc_internal()

2021-08-02 Thread Philippe Mathieu-Daudé
On 8/2/21 5:22 PM, David Hildenbrand wrote: > When adding RAM_NORESERVE, we forgot to remove the old assertion when > adding the updated one, most probably when reworking the patches or > rebasing. We can easily crash QEMU by adding > -object memory-backend-ram,id=mem0,size=500G,reserve=off > to

Re: [PATCH-for-6.1] softmmu/physmem: fix wrong assertion in qemu_ram_alloc_internal()

2021-08-02 Thread David Hildenbrand
On 02.08.21 17:27, Philippe Mathieu-Daudé wrote: 6.1 material btw. Indeed, should have tagged that right away. thanks! -- Thanks, David / dhildenb

[PULL 8/8] coverity-model: write models fully for non-array allocation functions

2021-08-02 Thread Paolo Bonzini
Coverity seems to have issues figuring out the properties of g_malloc0 and other non *_n functions. While this was "fixed" by removing the custom second argument to __coverity_mark_as_afm_allocated__, inline the code from the array-based allocation functions to avoid future issues.

Re: QEMU on x64

2021-08-02 Thread Alex Bennée
Peter Maydell writes: > On Fri, 30 Jul 2021 at 19:05, Christopher Caulfield > wrote: >> This is Christopher from the debugging experiences team at Microsoft focused >> on kernel debugging. I am reaching out with a few questions about QEMU on >> x64. >> >> Is it possible for the QEMU-x86-64

Re: [PATCH 10/16] migration: Handle migration_incoming_setup() errors consistently

2021-08-02 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Commit b673eab4e2 "multifd: Make multifd_load_setup() get an Error > parameter" changed migration_incoming_setup() to take an Error ** > argument, and adjusted the callers accordingly. It neglected to > change adjust multifd_load_setup(): it still

[PATCH 6/8] qdev: realize BlockParentClass

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- softmmu/qdev-monitor.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 0117989009..2e149aa9b8 100644 --- a/softmmu/qdev-monitor.c +++

[PATCH 8/8] qapi: add blockdev-replace command

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
Add command that can add and remove filters. Key points of functionality: What the command does is simply replace some BdrvChild.bs by some other nodes. The tricky thing is selecting there BdrvChild objects. To be able to select any kind of BdrvChild we use a generic parent_id, which may be a

Re: [PATCH-for-6.2 2/5] target/mips: Introduce decodetree structure for NEC Vr54xx extension

2021-08-02 Thread Richard Henderson
On 8/1/21 1:59 PM, Philippe Mathieu-Daudé wrote: The decoder is called but doesn't decode anything. This will ease reviewing the next commit. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/translate.h| 1 + target/mips/tcg/vr54xx.decode | 8

Re: [PATCH-for-6.2 3/5] target/mips: Convert Vr54xx MACC* opcodes to decodetree

2021-08-02 Thread Richard Henderson
On 8/1/21 1:59 PM, Philippe Mathieu-Daudé wrote: Convert the following Integer Multiply-Accumulate opcodes: * MACC Multiply, accumulate, and move LO * MACCHI Multiply, accumulate, and move HI * MACCHIU Unsigned multiply, accumulate, and move HI * MACCUUnsigned

Re: [PATCH v4 1/2] plugins/cache: supported multicore cache modelling

2021-08-02 Thread Alex Bennée
Mahmoud Mandour writes: > Multicore L1 cache modelling is introduced and is supported for both > full system emulation and linux-user. > > For full-system emulation, L1 icache and dcache are maintained for each > available core, since this information is exposed to the plugin through >

[PATCH 2/8] block: add BlockParentClass class

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
Add a class that will unify block parents for blockdev-replace functionality we are going to add. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-parent.h | 32 + block/block-parent.c | 66 block/meson.build

[PATCH 5/8] qdev: improve find_device_state() to distinguish simple not found case

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
We'll need this for realizing qdev_find_child() in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- softmmu/qdev-monitor.c | 48 +- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/softmmu/qdev-monitor.c

[PATCH 7/8] block: improve bdrv_replace_node_noperm()

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
Add optional block edge name filter and new mode: "exactly one", which we are going to use soon. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index

Re: [PATCH 12/16] vhost: Clean up how VhostOpts method vhost_get_config() fails

2021-08-02 Thread Philippe Mathieu-Daudé
On 7/20/21 2:54 PM, Markus Armbruster wrote: > vhost_user_get_config() can fail without setting an error. Unclean. > Its caller vhost_dev_get_config() compensates by substituting a > generic error then. Goes back to commit 50de51387f "vhost: > Distinguish errors in vhost_dev_get_config()". > >

Re: [PATCH-for-6.1?] target/mips: Remove MOVZ/MOVN opcodes from Loongson 2E

2021-08-02 Thread Maciej W. Rozycki
On Mon, 2 Aug 2021, Philippe Mathieu-Daudé wrote: > > At least this trivial program: > > > > int main(void) > > { > > asm volatile(".set push; .set mips4; movn $0,$0,$0; .set pop"); > > return 0; > > } > > > > does not trap on actual hardware. > > Thank you very much for your time and

[PATCH 4/8] block/export: realize BlockParentClass functionality

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/export/export.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a/block/export/export.c b/block/export/export.c index 6d3b9964c8..39b45feafe 100644 --- a/block/export/export.c +++

Re: [PATCH-for-6.2 1/4] target/mips: Simpify PREF opcode

2021-08-02 Thread Richard Henderson
On 8/1/21 1:41 PM, Philippe Mathieu-Daudé wrote: check_insn() checks for any bit in the set, and INSN_R5900 is just another bit added to the set. No need to special-case it. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6

Re: [PULL 0/1] Libslirp update

2021-08-02 Thread Peter Maydell
On Mon, 2 Aug 2021 at 19:58, Marc-André Lureau wrote: > > Hi Peter > > On Sun, Aug 1, 2021 at 4:10 PM Peter Maydell wrote: >> >> On Wed, 28 Jul 2021 at 16:47, Marc-André Lureau >> wrote: >> > I wish my previous pull request with the submodule change would >> > receive more help or attention, as

Re: [PATCH 4/6] coverity-model: clean up the models for array allocation functions

2021-08-02 Thread Paolo Bonzini
On 02/08/21 14:36, Peter Maydell wrote: Reviewed-by: Peter Maydell The real g_malloc_n() returns failure if the multiplication would overflow; I guess Coverity currently doesn't have any warnings it generates as a result of assuming overflow might happen? I couldn't find any Coverity-specific

Re: [PATCH v2 24/24] python/aqmp: add AsyncProtocol unit tests

2021-08-02 Thread John Snow
On Tue, Jul 20, 2021 at 4:34 PM Beraldo Leal wrote: > On Fri, Jul 16, 2021 at 08:32:53PM -0400, John Snow wrote: > > This tests most of protocol.py -- From a hacked up Coverage.py run, it's > > at about 86%. There's a few error cases that aren't very well tested > > yet, they're hard to induce

Re: [PATCH-for-6.1 0/3] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-02 Thread Philippe Mathieu-Daudé
On 8/2/21 2:10 PM, Peter Maydell wrote: > On Wed, 28 Jul 2021 at 19:17, Philippe Mathieu-Daudé wrote: >> >> Fix an assertion reported by OSS-Fuzz, add corresponding qtest. >> >> The change simple enough for the next rc. >> >> Philippe Mathieu-Daudé (3): >> hw/sd/sdcard: Document out-of-range

Re: [PATCH 0/4] chardev fixes

2021-08-02 Thread Marc-André Lureau
Hi On Fri, Jul 23, 2021 at 2:29 PM wrote: > From: Marc-André Lureau > > Hi, > > Two small fixes related to fd handling for "serial" and "file" backend and > some > API comments and minor improvement. > > Marc-André Lureau (4): > chardev: fix qemu_chr_open_fd() being called with fd=-1 >

Re: [PATCH 02/16] spapr: Plug memory leak when we can't add a migration blocker

2021-08-02 Thread Philippe Mathieu-Daudé
On 7/20/21 2:53 PM, Markus Armbruster wrote: > Fixes: 2500fb423adb17995485de0b4d507cf2f09e3a7f > Cc: Aravinda Prasad > Cc: Ganesh Goudar > Cc: David Gibson > Signed-off-by: Markus Armbruster > --- > hw/ppc/spapr_events.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by:

[PATCH 1/8] block-backend: blk_root(): drop const specifier on return type

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
We'll need get non-const child pointer for graph modifications in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 2 +- block/block-backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 3/4] chardev: remove needless class method

2021-08-02 Thread Philippe Mathieu-Daudé
On 7/23/21 12:28 PM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > "chr_option_parsed" is only implemented by the "mux" chardev, we can > specialize the code there to avoid the needless generic class method. > > Signed-off-by: Marc-André Lureau > --- >

Re: [PULL 0/8] vl.c, coverity patches for QEMU 6.1-rc2

2021-08-02 Thread Peter Maydell
On Mon, 2 Aug 2021 at 17:18, Paolo Bonzini wrote: > > The following changes since commit 7742fe64e5c2c2c9f9787d107b693eaac602eaae: > > Merge remote-tracking branch > 'remotes/kraxel/tags/usb-20210729-pull-request' into staging (2021-07-29 > 18:49:39 +0100) > > are available in the Git

Re: [PULL 0/1] Libslirp update

2021-08-02 Thread Peter Maydell
On Mon, 2 Aug 2021 at 21:54, Peter Maydell wrote: > A simple fix/workaround would be to set "b_lundef = false" in > default_options in your meson.build (which will suppress the > -Wl,--no-undefined option). ...though I just tried that as a local change in my tree and it didn't seem to cause

[PATCH 3/8] block: realize BlockParentClass for BlockDriverState

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 49 + 1 file changed, 49 insertions(+) diff --git a/block.c b/block.c index e97ce0b1c8..449f933661 100644 --- a/block.c +++ b/block.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include

[PATCH RFC 0/8] blockdev-replace

2021-08-02 Thread Vladimir Sementsov-Ogievskiy
Hi all! As a continuation of "Qemu block filter insertion/removal API" discussion, here is my proposal of blockdev-replace. The realization allows: - replace children of different parents: BDS, block devices, block exports - automatically replace all parents of specific BDS, excluding

Re: [PULL 0/1] Libslirp update

2021-08-02 Thread Marc-André Lureau
Hi Peter On Sun, Aug 1, 2021 at 4:10 PM Peter Maydell wrote: > On Wed, 28 Jul 2021 at 16:47, Marc-André Lureau > wrote: > > I wish my previous pull request with the submodule change would > > receive more help or attention, as I either couldn't reproduce the > > failure (neither CI) or it was

Re: [PATCH 12/16] vhost: Clean up how VhostOpts method vhost_get_config() fails

2021-08-02 Thread Philippe Mathieu-Daudé
On 7/20/21 2:54 PM, Markus Armbruster wrote: > vhost_user_get_config() can fail without setting an error. Unclean. > Its caller vhost_dev_get_config() compensates by substituting a > generic error then. Goes back to commit 50de51387f "vhost: > Distinguish errors in vhost_dev_get_config()". > >

Re: [PATCH 14/16] Remove superfluous ERRP_GUARD()

2021-08-02 Thread Philippe Mathieu-Daudé
Cc'ing Marc-André as he recently disagreed with this. On 7/20/21 2:54 PM, Markus Armbruster wrote: > Macro ERRP_GUARD() is only needed when we want to dereference @errp or > pass it to error_prepend() or error_append_hint(). Delete superfluous > ones. > > Signed-off-by: Markus Armbruster > ---

Re: [PATCH 01/16] error: Use error_fatal to simplify obvious fatal errors (again)

2021-08-02 Thread Philippe Mathieu-Daudé
On 7/20/21 2:53 PM, Markus Armbruster wrote: > We did this with scripts/coccinelle/use-error_fatal.cocci before, in > commit 50beeb68094 and 007b06578ab. This commit cleans up rarer > variations that don't seem worth matching with Coccinelle. > > Cc: Thomas Huth > Cc: Cornelia Huck > Cc: Peter

Re: [PATCH 13/16] vhost: Clean up how VhostOpts method vhost_backend_init() fails

2021-08-02 Thread Philippe Mathieu-Daudé
On 7/20/21 2:54 PM, Markus Armbruster wrote: > vhost_user_backend_init() can fail without setting an error. Unclean. > Its caller vhost_dev_init() compensates by substituting a generic > error then. Goes back to commit 28770ff935 "vhost: Distinguish errors > in vhost_backend_init()". > > Clean

Re: [PATCH 0/6] Updates for Coverity modeling file

2021-08-02 Thread Paolo Bonzini
On 02/08/21 14:46, Peter Maydell wrote: This series is a sort of FYI; since the only way to debug the model file is to upload it to scan.coverity.com, these changes are all already live. The last will be as of the next build, but was effective last Thursday and worked (I tried disabling it on

Re: [PATCH-for-6.2 3/4] target/mips: Merge 32-bit/64-bit release6 decodetree definitions

2021-08-02 Thread Richard Henderson
On 8/1/21 1:42 PM, Philippe Mathieu-Daudé wrote: We don't need to maintain 2 sets of decodetree definitions. Merge them into a single file. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/mips64r6.decode | 27 --- .../mips/tcg/{mips32r6.decode =>

Re: [PULL 0/1] Libslirp update

2021-08-02 Thread Peter Maydell
On Mon, 2 Aug 2021 at 19:58, Marc-André Lureau wrote: > > Hi Peter > > On Sun, Aug 1, 2021 at 4:10 PM Peter Maydell wrote: >> >> On Wed, 28 Jul 2021 at 16:47, Marc-André Lureau >> wrote: >> > I wish my previous pull request with the submodule change would >> > receive more help or attention, as

[PULL 10/21] docs/devel/migration.rst: Format literals correctly

2021-08-02 Thread Peter Maydell
In rST markup, single backticks `like this` represent "interpreted text", which can be handled as a bunch of different things if tagged with a specific "role": https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-text (the most common one for us is "reference to a URL,

[PULL 02/21] docs: Add documentation of Arm 'kzm' board

2021-08-02 Thread Peter Maydell
Add brief documentation of the Arm 'kzm' board. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20210722175229.29065-3-peter.mayd...@linaro.org --- docs/system/arm/kzm.rst| 18 ++ docs/system/target-arm.rst | 1 + MAINTAINERS| 1 +

[PULL 12/21] docs/system/s390x/protvirt.rst: Format literals correctly

2021-08-02 Thread Peter Maydell
In rST markup, single backticks `like this` represent "interpreted text", which can be handled as a bunch of different things if tagged with a specific "role": https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-text (the most common one for us is "reference to a URL,

[PULL 07/21] docs/devel/build-system.rst: Format literals correctly

2021-08-02 Thread Peter Maydell
In rST markup, single backticks `like this` represent "interpreted text", which can be handled as a bunch of different things if tagged with a specific "role": https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-text (the most common one for us is "reference to a URL,

Re: [PATCH-for-6.1 1/3] hw/sd/sdcard: Document out-of-range addresses for SEND_WRITE_PROT

2021-08-02 Thread Peter Maydell
On Wed, 28 Jul 2021 at 19:18, Philippe Mathieu-Daudé wrote: > > Per the 'Physical Layer Simplified Specification Version 3.01', > Table 4-22: 'Block Oriented Write Protection Commands' > > SEND_WRITE_PROT (CMD30) > > If the card provides write protection features, this command asks > the

Re: [PATCH-for-6.1 0/3] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-02 Thread Peter Maydell
On Wed, 28 Jul 2021 at 19:17, Philippe Mathieu-Daudé wrote: > > Fix an assertion reported by OSS-Fuzz, add corresponding qtest. > > The change simple enough for the next rc. > > Philippe Mathieu-Daudé (3): > hw/sd/sdcard: Document out-of-range addresses for SEND_WRITE_PROT > hw/sd/sdcard: Fix

Re: [PATCH v2] block/io_uring: resubmit when result is -EAGAIN

2021-08-02 Thread Kevin Wolf
Am 29.07.2021 um 11:10 hat Fabian Ebner geschrieben: > Linux SCSI can throw spurious -EAGAIN in some corner cases in its > completion path, which will end up being the result in the completed > io_uring request. > > Resubmitting such requests should allow block jobs to complete, even > if such

Re: [PATCH 6/6] coverity-model: write models fully for non-array allocation functions

2021-08-02 Thread Peter Maydell
On Sat, 31 Jul 2021 at 07:33, Paolo Bonzini wrote: > > Coverity seems to have issues figuring out the properties of g_malloc0 > and other non *_n functions. While this was "fixed" by removing the > custom second argument to __coverity_mark_as_afm_allocated__, inline > the code from the

Re: [PULL 00/21] target-arm queue

2021-08-02 Thread Peter Maydell
into > staging (2021-08-02 09:47:07 +0100) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20210802 > > for you to fetch changes up to 4a64939db76b10d8d41d2af3c6aad8142da55450: > > docs: Mov

Re: [PATCH v6 05/11] qapi: introduce QAPISchemaIfCond.cgen()

2021-08-02 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Instead of building prepocessor conditions from a list of string, use > the result generated from QAPISchemaIfCond.cgen() and hide the > implementation details. > > Signed-off-by: Marc-André Lureau Please mention that the patch

[PULL 7/8] coverity-model: constrain g_malloc/g_malloc0/g_realloc as never returning NULL

2021-08-02 Thread Paolo Bonzini
g_malloc/g_malloc0/g_realloc only return NULL if the size is 0; we do not need to cover that in the model, and so far have expected __coverity_alloc__ to model a non-NULL return value. But that apparently does not work anymore, so add some extra conditionals that invoke __coverity_panic__ for

[PULL 5/8] coverity-model: remove model for more allocation functions

2021-08-02 Thread Paolo Bonzini
These models are not needed anymore now that Coverity does not check anymore that the result is used with "g_free". Coverity understands GCC attributes and uses them to detect leaks. Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/model.c | 105 +- 1 file

[PULL 2/8] vl: stop recording -smp in QemuOpts

2021-08-02 Thread Paolo Bonzini
-readconfig is still recording SMP options in QemuOpts instead of using machine_opts_dict. This means that SMP options from -readconfig are ignored. Just stop using QemuOpts for -smp, making it return false for is_qemuopts_group. Configuration files will merge the values in machine_opts_dict

[PULL 4/8] coverity-model: make g_free a synonym of free

2021-08-02 Thread Paolo Bonzini
Recently, Coverity has started complaining about using g_free() to free memory areas allocated by GLib functions not included in model.c, such as g_strfreev. This unfortunately goes against the GLib documentation, which suggests that g_malloc() should be matched with g_free() and plain malloc()

[PULL 3/8] coverity-model: update address_space_read/write models

2021-08-02 Thread Paolo Bonzini
Use void * for consistency with the actual function; provide a model for MemoryRegionCache functions and for address_space_rw. These let Coverity understand the bounds of the data that various functions read and write even at very high levels of inlining (e.g. pci_dma_read). Signed-off-by: Paolo

[PULL 0/8] vl.c, coverity patches for QEMU 6.1-rc2

2021-08-02 Thread Paolo Bonzini
The following changes since commit 7742fe64e5c2c2c9f9787d107b693eaac602eaae: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210729-pull-request' into staging (2021-07-29 18:49:39 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

[PULL 18/21] docs: Move bootindex.txt into system section and rstify

2021-08-02 Thread Peter Maydell
Move bootindex.txt into the system section of the manual and turn it into rST format. To make the document make more sense in the context of the system manual, expand the title and introductory paragraphs to give more context. Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster

[PULL 17/21] hw/arm/boot: Report error if there is no fw_cfg device in the machine

2021-08-02 Thread Peter Maydell
If the user provides both a BIOS/firmware image and also a guest kernel filename, arm_setup_firmware_boot() will pass the kernel image to the firmware via the fw_cfg device. However we weren't checking whether there really was a fw_cfg device present, and if there wasn't we would crash. This

Re: [PATCH for-6.2 04/10] docs: qom: Fix "API Reference" heading level

2021-08-02 Thread Peter Maydell
On Thu, 29 Jul 2021 at 18:58, Eduardo Habkost wrote: > > The API reference section was being rendered as a subsection of > the "Standard type declaration and definition macros" subsection. > Fix that. > > Signed-off-by: Eduardo Habkost > --- > docs/devel/qom.rst | 2 +- > 1 file changed, 1

Re: [PATCH for-6.2 09/10] docs: qom: Remove OBJECT_CHECK macro examples

2021-08-02 Thread Peter Maydell
On Thu, 29 Jul 2021 at 19:05, Eduardo Habkost wrote: > > We shouldn't encourage people to keep defining typecast macros > manually, when we have the OBJECT_DECLARE* macros. Remove the > section showing how to define them, and replace with a section > explaining how typecasting works. > >

Re: [PATCH for-6.2 10/10] MAINTAINERS: Add qom.rst to QOM section

2021-08-02 Thread Peter Maydell
On Thu, 29 Jul 2021 at 19:05, Eduardo Habkost wrote: > > Add qom.rst to the QOM section of MAINTAINERS. > > Signed-off-by: Eduardo Habkost > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 42ac45c3e50..dc3f04242eb 100644 > ---

Re: [PATCH 1/6] coverity-model: update address_space_read/write models

2021-08-02 Thread Peter Maydell
On Sat, 31 Jul 2021 at 07:29, Paolo Bonzini wrote: > > Use void * for consistency with the actual function; provide a model > for MemoryRegionCache functions and for address_space_rw. These > let Coverity understand the bounds of the data that various functions > read and write even at very high

Re: [PATCH 2/6] coverity-model: make g_free a synonym of free

2021-08-02 Thread Peter Maydell
On Sat, 31 Jul 2021 at 07:29, Paolo Bonzini wrote: > > Recently, Coverity has started complaining about using g_free() to free > memory areas allocated by GLib functions not included in model.c, > such as g_strfreev. This unfortunately goes against the GLib > documentation, which suggests that

[PATCH] linux-user/syscall: add support for CLONE_PIDFD

2021-08-02 Thread Andreas Schwab
Add basic support for CLONE_PIDFD, only fork-like clone without additional flags. This is enough to make Qt/forkfd working. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 52 ++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git

[PATCH 4/5] seccomp: block use of clone3 syscall

2021-08-02 Thread Daniel P . Berrangé
Modern glibc will use clone3 instead of clone, when it detects that it is available. We need to compare flags in order to decide whether to allow clone (thread create vs process fork), but in clone3 the flags are hidden inside a struct. Seccomp can't currently match on data inside a struct, so our

[PATCH 3/5] seccomp: fix blocking of process spawning

2021-08-02 Thread Daniel P . Berrangé
When '-sandbox on,spawn=deny' is given, we are supposed to block the ability to spawn processes. We naively blocked the 'fork' syscall, forgetting that any modern libc will use the 'clone' syscall instead. We can't simply block the 'clone' syscall though, as that will break thread creation. We

Re: Windows on ARM64 not able to use attached TPM 2

2021-08-02 Thread Philippe Mathieu-Daudé
Adding Leif who might add someone who knows ;) On 8/2/21 2:09 PM, Ard Biesheuvel wrote: > On Mon, 2 Aug 2021 at 11:51, Eric Auger wrote: >> >> and also adding Ard if he is aware of any limitation the TPM2 >> integration may suffer for Windows support. On my end I am only able to >> test on Linux

[PULL 1/8] vl: introduce machine_merge_property

2021-08-02 Thread Paolo Bonzini
It will be used to parse smp-opts config groups from configuration files. The point to note is that it does not steal a reference from the caller. This is better because this function will be called from qemu_config_foreach's callback; qemu_config_foreach does not cede its reference to the qdict

Re: [PATCH v3 0/5] plugins/cache: multicore cache modelling and minor tweaks

2021-08-02 Thread Alex Bennée
Mahmoud Mandour writes: > Hello, > > This series introduce some minor improvements/bug fixes in the cache > plugins and multicore cache modelling. > > Multi-core cache modelling is handled such that for full-system > emulation, a private L1 cache is maintained to each core available to > the

[PULL 05/21] docs: Remove stale TODO comments about license and version

2021-08-02 Thread Peter Maydell
Since commits 13f934e79fa and 3a50c8f3067aaf, our HTML docs include a footer to all pages stating the license and version. We can therefore delete the TODO comments suggesting we should do that from our .rst files. Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Cleber

Re: [PATCH-for-6.1 2/3] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-02 Thread Peter Maydell
On Wed, 28 Jul 2021 at 19:19, Philippe Mathieu-Daudé wrote: > > OSS-Fuzz found sending illegal addresses when querying the write > protection bits triggers the assertion added in commit 84816fb63e5 > ("hw/sd/sdcard: Assert if accessing an illegal group"): > >

Re: "make check-acceptance" takes way too long

2021-08-02 Thread Alex Bennée
Daniel P. Berrangé writes: > On Fri, Jul 30, 2021 at 04:12:27PM +0100, Peter Maydell wrote: >> "make check-acceptance" takes way way too long. I just did a run >> on an arm-and-aarch64-targets-only debug build and it took over >> half an hour, and this despite it skipping or cancelling 26 out

[PATCH v4 0/2] plugins/cache: multicore cache modelling

2021-08-02 Thread Mahmoud Mandour
Hello, This series introduce multicore cache modelling in contrib/plugins/cache.c Multi-core cache modelling is handled such that for full-system emulation, a private L1 cache is maintained to each core available to the system. For multi-threaded userspace emulation, a static number of cores is

Re: Windows on ARM64 not able to use attached TPM 2

2021-08-02 Thread Philippe Mathieu-Daudé
On 8/2/21 11:04 AM, Philippe Mathieu-Daudé wrote: > Cc'ing Marc-André who is your EDK2 co-maintainer. Oops sorry, I meant your EDK2 "co-designated Package Reviewer" R: Package Reviewer: Cc address for patches and questions. Reviewers help maintainers review code, but don't have push

[PATCH v5] docs/deprecated: deprecate passing plugin args through `arg=`

2021-08-02 Thread Mahmoud Mandour
Signed-off-by: Mahmoud Mandour --- v4 -> v5: 1. Mentioned that short-form booleans are still usable but not preferable. docs/system/deprecated.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index

Re: [PATCH-for-6.1] softmmu/physmem: fix wrong assertion in qemu_ram_alloc_internal()

2021-08-02 Thread Philippe Mathieu-Daudé
6.1 material btw. On 8/2/21 5:26 PM, Philippe Mathieu-Daudé wrote: > On 8/2/21 5:22 PM, David Hildenbrand wrote: >> When adding RAM_NORESERVE, we forgot to remove the old assertion when >> adding the updated one, most probably when reworking the patches or >> rebasing. We can easily crash QEMU by

Re: [PATCH 1/1] migration: Terminate multifd threads on yank

2021-08-02 Thread Dr. David Alan Gilbert
* Leonardo Bras (leob...@redhat.com) wrote: > From source host viewpoint, losing a connection during migration will > cause the sockets to get stuck in sendmsg() syscall, waiting for > the receiving side to reply. > > In migration, yank works by shutting-down the migration QIOChannel fd. > This

[PULL 6/8] coverity-model: clean up the models for array allocation functions

2021-08-02 Thread Paolo Bonzini
sz is only used in one place, so replace it with nmemb * size in that one place. Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/model.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scripts/coverity-scan/model.c b/scripts/coverity-scan/model.c index

[PULL 20/21] ui/input-barrier: Move TODOs from barrier.txt to a comment

2021-08-02 Thread Peter Maydell
docs/barrier.txt has a couple of TODO notes about things to be implemented in this device; move them into a comment in the source code. Signed-off-by: Peter Maydell Reviewed-by: Paolo Bonzini Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-id:

[PULL 03/21] docs: Add documentation of Arm 'imx25-pdk' board

2021-08-02 Thread Peter Maydell
Add brief documentation of the Arm 'imx25-pdk' board. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20210722175229.29065-4-peter.mayd...@linaro.org --- docs/system/arm/imx25-pdk.rst | 19 +++ docs/system/target-arm.rst| 1 + MAINTAINERS

[PULL 11/21] docs/devel: Format literals correctly

2021-08-02 Thread Peter Maydell
In rST markup, single backticks `like this` represent "interpreted text", which can be handled as a bunch of different things if tagged with a specific "role": https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-text (the most common one for us is "reference to a URL,

[PULL 13/21] docs/system/arm/cpu-features.rst: Format literals correctly

2021-08-02 Thread Peter Maydell
In rST markup, single backticks `like this` represent "interpreted text", which can be handled as a bunch of different things if tagged with a specific "role": https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-text (the most common one for us is "reference to a URL,

[PULL 16/21] docs/tools/virtiofsd.rst: Delete stray backtick

2021-08-02 Thread Peter Maydell
The documentation of the posix_acl option has a stray backtick at the end of the text (which is rendered literally into the HTML). Delete it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Acked-by: Dr. David Alan Gilbert Message-id:

[PULL 14/21] docs: Format literals correctly

2021-08-02 Thread Peter Maydell
In rST markup, single backticks `like this` represent "interpreted text", which can be handled as a bunch of different things if tagged with a specific "role": https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-text (the most common one for us is "reference to a URL,

Re: [PATCH for-6.2 08/10] docs: qom: Show actual typecast functions in examples

2021-08-02 Thread Peter Maydell
On Thu, 29 Jul 2021 at 19:03, Eduardo Habkost wrote: > > For clarity and to avoid encouraging people to copy the examples, > show the actual typecast functions being defined by > OBJECT_DECLARE* macros in the examples. > > Signed-off-by: Eduardo Habkost > --- > docs/devel/qom.rst | 24

Re: [PATCH for-6.2 07/10] docs: qom: Fix OBJECT_DECLARE_SIMPLE_TYPE documentation

2021-08-02 Thread Peter Maydell
On Thu, 29 Jul 2021 at 19:03, Eduardo Habkost wrote: > > The OBJECT_DECLARE_SIMPLE_TYPE documentation was inaccurate: it > doesn't define a class struct or class type checking helpers. > > OBJECT_DECLARE_TYPE expansion looks very similar to the existing > example, though. Rewrite that section to

Re: "make check-acceptance" takes way too long

2021-08-02 Thread Alex Bennée
Daniel P. Berrangé writes: > On Fri, Jul 30, 2021 at 04:12:27PM +0100, Peter Maydell wrote: >> "make check-acceptance" takes way way too long. I just did a run >> on an arm-and-aarch64-targets-only debug build and it took over >> half an hour, and this despite it skipping or cancelling 26 out

Re: "make check-acceptance" takes way too long

2021-08-02 Thread Daniel P . Berrangé
On Mon, Aug 02, 2021 at 01:55:44PM +0100, Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > On Fri, Jul 30, 2021 at 04:12:27PM +0100, Peter Maydell wrote: > >> "make check-acceptance" takes way way too long. I just did a run > >> on an arm-and-aarch64-targets-only debug build and it took

Re: "make check-acceptance" takes way too long

2021-08-02 Thread Peter Maydell
On Mon, 2 Aug 2021 at 13:57, Alex Bennée wrote: > > > Daniel P. Berrangé writes: > > > On Fri, Jul 30, 2021 at 04:12:27PM +0100, Peter Maydell wrote: > >> "make check-acceptance" takes way way too long. I just did a run > >> on an arm-and-aarch64-targets-only debug build and it took over > >>

Re: [PATCH v2] hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

2021-08-02 Thread Marcel Apfelbaum
Hi Daniel, On Mon, Aug 2, 2021 at 12:05 PM Daniel P. Berrangé wrote: > On Mon, Aug 02, 2021 at 12:00:57PM +0300, Marcel Apfelbaum wrote: > > Q35 has now ACPI hotplug enabled by default for PCI(e) devices. > > As opposed to native PCIe hotplug, guests like Fedora 34 > > will not assign IO range

[PATCH v1] softmmu/physmem: fix wrong assertion in qemu_ram_alloc_internal()

2021-08-02 Thread David Hildenbrand
When adding RAM_NORESERVE, we forgot to remove the old assertion when adding the updated one, most probably when reworking the patches or rebasing. We can easily crash QEMU by adding -object memory-backend-ram,id=mem0,size=500G,reserve=off to the QEMU cmdline: qemu-system-x86_64:

[PULL 08/21] docs/devel/build-system.rst: Correct typo in example code

2021-08-02 Thread Peter Maydell
One of the example meson.build fragments incorrectly quotes some symbols as 'CONFIG_FOO`; the correct syntax here is 'CONFIG_FOO'. (This isn't a rST formatting mistake because the example is displayed literally; it's just the wrong kind of quote.) Signed-off-by: Peter Maydell Reviewed-by:

[PULL 06/21] docs: Move licence/copyright from HTML output to rST comments

2021-08-02 Thread Peter Maydell
Our built HTML documentation now has a standard footer which gives the license for QEMU (and its documentation as a whole). In almost all pages, we either don't bother to state the copyright/license for the individual rST sources, or we put it in an rST comment. There are just three pages which

  1   2   3   >