[PATCH v2 00/30] bsd-user: arm (32-bit) support

2021-11-02 Thread Warner Losh
This series of patches brings in 32-bit arm support for bsd-user. It implements all the bits needed to do image activation, signal handling, stack management and threading. This allows us to get to the "Hello World" level and also to satisfy all linking requirements. I've sliced up the current

Re: [PULL v2 04/12] tests/qtest/libqos: add SDHCI commands

2021-11-02 Thread Hao Wu
Hi, I've sent a new patch set which uses memcpy here. Thank you! On Tue, Nov 2, 2021 at 11:25 AM Richard Henderson < richard.hender...@linaro.org> wrote: > From: Shengtan Mao > > Signed-off-by: Shengtan Mao > Signed-off-by: Hao Wu > Reviewed-by: Hao Wu > Reviewed-by: Chris Rauer >

[PATCH v2 02/30] bsd-user/arm/target_arch_sysarch.h: Use consistent include guards

2021-11-02 Thread Warner Losh
As part of upstreaming, the include guards have been made more consistent. Update this file to use the new guards. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_sysarch.h | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v2 01/30] bsd-user: Add stubs for new signal routines

2021-11-02 Thread Warner Losh
Until the signal support is merged from the bsd-user fork, we need stubs for cpu_loop_exit_sigsegv and cpu_loop_exit_sigbus to link. These call abort after logging a message. Since singals aren't supported here yet, this is sufficient. Signed-off-by: Warner Losh --- bsd-user/signal.c | 21

[PATCH v3 3/5] hw/arm: Attach MMC to quanta-gbs-bmc

2021-11-02 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- hw/arm/npcm7xx_boards.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/arm/npcm7xx_boards.c

[PATCH v3 5/5] tests/qtest: add qtests for npcm7xx sdhci

2021-11-02 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- tests/qtest/meson.build | 1 + tests/qtest/npcm7xx_sdhci-test.c | 209 +++ 2

[PATCH v3 2/5] hw/arm: Add Nuvoton SD module to board

2021-11-02 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- hw/arm/npcm7xx.c | 12 +++- include/hw/arm/npcm7xx.h | 2 ++ 2 files changed, 13 insertions(+), 1

[PATCH v3 4/5] tests/qtest/libqos: add SDHCI commands

2021-11-02 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- tests/qtest/libqos/meson.build | 1 + tests/qtest/libqos/sdhci-cmd.c | 116 +

[PATCH v3 1/5] hw/sd: add nuvoton MMC

2021-11-02 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell --- hw/sd/meson.build | 1 + hw/sd/npcm7xx_sdhci.c | 182 ++

[PATCH v3 0/5] hw/arm: Add MMC device for NPCM7XX boards

2021-11-02 Thread Hao Wu
This patch set implements the Nuvoton MMC device for NPCM7XX boards. The MMC device is compatible with the SDHCI interface in QEMU. It allows the user to attach an SD card image to it. Changes since v2: 1. Fix an error use of strcmp in qtest. Changes since v1: 1. Rearrange the "add SDHCI

Re: [PATCH] MAINTAINERS: Change status to Odd Fixes

2021-11-02 Thread Andrew Jeffery
On Wed, 3 Nov 2021, at 02:48, Peter Maydell wrote: > On Mon, 1 Nov 2021 at 18:31, Cédric Le Goater wrote: >> >> I haven't done any Aspeed development for a couple of years now and >> maintaining the Aspeed QEMU machines has been a side project since. >> I don't have time anymore. > > Thanks

[RFC PATCH v2 2/2] s390x: Implement the USER_SIGP_BUSY capability

2021-11-02 Thread Eric Farman
With the USER_SIGP capability, the kernel will pass most (but not all) SIGP orders to userspace for processing. But that means that the kernel is unable to determine if/when the order has been completed by userspace, and could potentially return an incorrect answer (CC1 with status bits versus CC2

[RFC PATCH v2 1/2] Temporary linux-headers update

2021-11-02 Thread Eric Farman
This should be replaced with ./scripts/update-linux-headers.sh But this is enough for the RFC. Signed-off-by: Eric Farman --- linux-headers/linux/kvm.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index bcaf66cc4d..b70b3b3148

[RFC PATCH v2 0/2] s390x: Improvements to SIGP handling [QEMU]

2021-11-02 Thread Eric Farman
Here is an update to the SIGP handling I brought up a few weeks ago [1]. It doesn't share anything with v1, as one of the patches has already been pulled to master [2] and the other is now dropped in favor of this direction. Here, we take advantage of a new KVM ioctl [3] to indicate when

Re: [PULL 00/60] accel/tcg patch queue

2021-11-02 Thread Richard Henderson
://gitlab.com/rth7680/qemu.git tags/pull-tcg-20211102 for you to fetch changes up to 742f07628c0a0bd847b47ee0a0b20c44531e0ba5: linux-user: Handle BUS_ADRALN in host_signal_handler (2021-11-02 07:00:52 -0400) - Split out host signal

Re: [PATCH 2/3] sev/i386: Warn if using -kernel with invalid OVMF hashes table area

2021-11-02 Thread Philippe Mathieu-Daudé
On 11/2/21 19:38, Dr. David Alan Gilbert wrote: > * Dov Murik (dovmu...@linux.ibm.com) wrote: >>> however, maybe it needs to be more thorough before using area->base to >>> qemu_map_ram_ptr? - I think it'll get unhappy if it's a bad address not >>> in a ram block. (Or check you're running over

Re: [RFC 4/6] target/riscv: rvk: add implementation of instructions for Zk*

2021-11-02 Thread Richard Henderson
On 11/1/21 11:11 PM, liweiwei wrote: +uint8_t AES_ENC_SBOX[] = { + 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, + 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, + 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, + 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, Use "crypto/aes.h".

[PATCH v5 3/4] docs: (further further) remove non-reference uses of single backticks

2021-11-02 Thread John Snow
Signed-off-by: John Snow --- docs/devel/build-system.rst | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 7f106d2f1c..48e56d7ea9 100644 --- a/docs/devel/build-system.rst +++

[PATCH v5 4/4] docs/sphinx: change default role to "any"

2021-11-02 Thread John Snow
This interprets single-backtick syntax in all of our Sphinx docs as a cross-reference to *something*, including Python symbols. >From here on out, new uses of `backticks` will cause a build failure if the target cannot be referenced. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost

[PATCH v5 2/4] docs: (further) remove non-reference uses of single backticks

2021-11-02 Thread John Snow
The series rotted already. Here's the new changes. Signed-off-by: John Snow --- docs/system/i386/sgx.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/system/i386/sgx.rst b/docs/system/i386/sgx.rst index f103ae2a2f..9aa161af1a 100644 ---

Re: [PATCH 2/3] sev/i386: Warn if using -kernel with invalid OVMF hashes table area

2021-11-02 Thread Dr. David Alan Gilbert
* Dov Murik (dovmu...@linux.ibm.com) wrote: > > > On 02/11/2021 14:36, Dr. David Alan Gilbert wrote: > > * Dov Murik (dovmu...@linux.ibm.com) wrote: > >> Commit cff03145ed3c ("sev/i386: Introduce sev_add_kernel_loader_hashes > >> for measured linux boot", 2021-09-30) introduced measured direct

[PULL v2 07/12] target/arm: Introduce store_cpu_field_constant() helper

2021-11-02 Thread Richard Henderson
From: Philippe Mathieu-Daudé Similarly to the store_cpu_field() helper which takes a TCG temporary, store its value to the CPUState, introduce the store_cpu_field_constant() helper which store a constant to CPUState (without using any TCG temporary). Suggested-by: Richard Henderson

[PATCH v5 1/4] docs: remove non-reference uses of single backticks

2021-11-02 Thread John Snow
The single backtick markup in ReST is the "default role". Currently, Sphinx's default role is called "content". Sphinx suggests you can use the "Any" role instead to turn any single-backtick enclosed item into a cross-reference. This is useful for things like autodoc for Python docstrings, where

[PATCH v5 0/4] docs/sphinx: change default `role` to "any"

2021-11-02 Thread John Snow
(Patches 1-3 can be squashed on merge, I just found it easier to tack on new changes as part of the rebase so that reviewers can easily see what's new each time.) V5: Rebased V4: Rebased V3: Removed bad rebase confetti fixed the OSS-Fuzz link to ... actually be a link. --js John Snow (4):

[PULL v2 10/12] target/arm: Use tcg_constant_i32() in gen_rev16()

2021-11-02 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since the mask is a constant value, use tcg_constant_i32() instead of a TCG temporary. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20211029231834.2476117-6-f4...@amsat.org> Signed-off-by: Richard Henderson ---

[PULL v2 12/12] hvf: arm: Ignore cache operations on MMIO

2021-11-02 Thread Richard Henderson
From: Alexander Graf Apple's Hypervisor.Framework forwards cache operations as MMIO traps into user space. For MMIO however, these have no meaning: There is no cache attached to them. So let's just treat cache data exits as nops. This fixes OpenBSD booting as guest. Reported-by: AJ Barris

[PULL v2 08/12] target/arm: Use the constant variant of store_cpu_field() when possible

2021-11-02 Thread Richard Henderson
From: Philippe Mathieu-Daudé When using a constant variable, we can replace the store_cpu_field() call by store_cpu_field_constant() which avoid using TCG temporaries. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20211029231834.2476117-4-f4...@amsat.org>

[PULL v2 11/12] hw/arm/virt: Rename default_bus_bypass_iommu

2021-11-02 Thread Richard Henderson
From: Jean-Philippe Brucker Since commit d8fb7d0969d5 ("vl: switch -M parsing to keyval"), machine parameter definitions cannot use underscores, because keyval_dashify() transforms them to dashes and the parser doesn't find the parameter. This affects option default_bus_bypass_iommu which was

[PULL v2 04/12] tests/qtest/libqos: add SDHCI commands

2021-11-02 Thread Richard Henderson
From: Shengtan Mao Signed-off-by: Shengtan Mao Signed-off-by: Hao Wu Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Reviewed-by: Peter Maydell Message-Id: <20211008002628.1958285-5-wuhao...@google.com> Signed-off-by: Richard Henderson ---

[PULL v2 05/12] target/arm: Advertise MVE to gdb when present

2021-11-02 Thread Richard Henderson
From: Peter Maydell Cortex-M CPUs with MVE should advertise this fact to gdb, using the org.gnu.gdb.arm.m-profile-mve XML feature, which defines the VPR register. Presence of this feature also tells gdb to create pseudo-registers Q0..Q7, so we do not need to tell gdb about them separately.

[PULL v2 03/12] hw/arm: Attach MMC to quanta-gbs-bmc

2021-11-02 Thread Richard Henderson
From: Shengtan Mao Signed-off-by: Shengtan Mao Signed-off-by: Hao Wu Reviewed-by: Hao Wu Reviewed-by: Tyrone Ting Reviewed-by: Peter Maydell Message-Id: <20211008002628.1958285-4-wuhao...@google.com> Signed-off-by: Richard Henderson --- hw/arm/npcm7xx_boards.c | 20 1

[PULL v2 06/12] target/arm: Use tcg_constant_i32() in op_smlad()

2021-11-02 Thread Richard Henderson
From: Philippe Mathieu-Daudé Avoid using a TCG temporary for a read-only constant. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20211029231834.2476117-2-f4...@amsat.org> Signed-off-by: Richard Henderson --- target/arm/translate.c | 3 +-- 1 file changed,

[PULL v2 09/12] target/arm: Use tcg_constant_i64() in do_sat_addsub_64()

2021-11-02 Thread Richard Henderson
From: Philippe Mathieu-Daudé The immediate value used for comparison is constant and read-only. Move it to the constant pool. This frees a TCG temporary for unsigned saturation opcodes. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

Re: [PATCH v2] hvf: arm: Ignore cache operations on MMIO

2021-11-02 Thread Richard Henderson
On 11/2/21 7:15 AM, Richard Henderson wrote: On 11/2/21 6:42 AM, Peter Maydell wrote: On Tue, 2 Nov 2021 at 10:01, Richard Henderson wrote: On 11/1/21 3:35 PM, Peter Maydell wrote: On Mon, 1 Nov 2021 at 19:28, Richard Henderson wrote: On 10/26/21 3:12 AM, Alexander Graf wrote: Apple's

[PULL v2 00/12] target/arm patch queue

2021-11-02 Thread Richard Henderson
-0400) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-arm-20211102-2 for you to fetch changes up to 5fd6a3e23669444026f84f466a7ed402c203a84e: hvf: arm: Ignore cache operations on MMIO (2021-11-02 14:18:33 -0400

[PULL v2 02/12] hw/arm: Add Nuvoton SD module to board

2021-11-02 Thread Richard Henderson
From: Shengtan Mao Signed-off-by: Shengtan Mao Signed-off-by: Hao Wu Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Reviewed-by: Peter Maydell Message-Id: <20211008002628.1958285-3-wuhao...@google.com> Signed-off-by: Richard Henderson --- include/hw/arm/npcm7xx.h |

[PULL v2 01/12] hw/sd: add nuvoton MMC

2021-11-02 Thread Richard Henderson
From: Shengtan Mao Signed-off-by: Shengtan Mao Signed-off-by: Hao Wu Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting Reviewed-by: Peter Maydell Message-Id: <20211008002628.1958285-2-wuhao...@google.com> [rth: Fix typos of "nonexistent"] Signed-off-by: Richard

Re: [PATCH 2/2] failover: don't allow to migrate a paused VM that needs PCI unplug

2021-11-02 Thread Juan Quintela
On Tue, Nov 2, 2021, 18:47 Laurent Vivier wrote: > On 02/11/2021 18:26, Juan Quintela wrote: > > "Michael S. Tsirkin" wrote: > >> On Tue, Nov 02, 2021 at 06:06:51PM +0100, Laurent Vivier wrote: > >>> On 02/11/2021 16:04, Michael S. Tsirkin wrote: > On Wed, Sep 29, 2021 at 04:43:11PM +0200,

[PULL 18/18] qapi: introduce x-query-opcount QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info opcount" command. It is being added with an "x-" prefix because this QMP command is intended as an ad hoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command

[PULL 17/18] qapi: introduce x-query-jit QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info jit" command. It is being added with an "x-" prefix because this QMP command is intended as an ad hoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is

[PULL 15/18] qapi: introduce x-query-ramblock QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info ramblock" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command

[PULL 16/18] qapi: introduce x-query-irq QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info irq" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is

[PULL 13/18] qapi: introduce x-query-usb QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info usb" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is

[PULL 14/18] qapi: introduce x-query-rdma QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info rdma" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is

[PULL 10/18] qapi: introduce x-query-roms QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info roms" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is

[PULL 11/18] qapi: introduce x-query-profile QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info profile" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command

[PULL 12/18] qapi: introduce x-query-numa QMP command

2021-11-02 Thread Daniel P . Berrangé
This is a counterpart to the HMP "info numa" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is

[PULL 09/18] docs/devel: document expectations for HMP commands in the future

2021-11-02 Thread Daniel P . Berrangé
We no longer wish to have commands implemented in HMP only. All commands should start with a QMP implementation and the HMP merely be a shim around this. To reduce the burden of implementing QMP commands where there is low expectation of machine usage, requirements for QAPI modelling are relaxed

[PULL 08/18] docs/devel: add example of command returning unstructured text

2021-11-02 Thread Daniel P . Berrangé
This illustrates how to add a QMP command returning unstructured text, following the guidelines added in the previous patch. The example uses a simplified version of 'info roms'. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé --- docs/devel/writing-monitor-commands.rst | 101

[PULL 06/18] monitor: introduce HumanReadableText and HMP support

2021-11-02 Thread Daniel P . Berrangé
This provides a foundation on which to convert simple HMP commands to use QMP. The QMP implementation will generate formatted text targeted for human consumption, returning it in the HumanReadableText data type. The HMP command handler will simply print out the formatted string within the

[PULL 07/18] docs/devel: document expectations for QAPI data modelling for QMP

2021-11-02 Thread Daniel P . Berrangé
Traditionally we have required that newly added QMP commands will model any returned data using fine grained QAPI types. This is good for commands that are intended to be consumed by machines, where clear data representation is very important. Commands that don't satisfy this have generally been

[PULL 04/18] docs/devel: tweak headings in monitor command docs

2021-11-02 Thread Daniel P . Berrangé
The new headings reflect the intended structure of the document and will better suit additions that follow. Reviewed-by: Markus Armbruster Signed-off-by: Daniel P. Berrangé --- docs/devel/writing-monitor-commands.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PULL 02/18] monitor: make hmp_handle_error return a boolean

2021-11-02 Thread Daniel P . Berrangé
This turns the pattern if (err) { hmp_handle_error(mon, err); return; } into if (hmp_handle_error(mon, err)) { return; } Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé --- hw/core/machine-hmp-cmds.c | 3 +--

[PULL 00/18] HMP-to-QMP info command patches

2021-11-02 Thread Daniel P . Berrangé
The following changes since commit 91e8394415f9bc9cd81c02bfafe02012855d4f98: Merge remote-tracking branch 'remotes/juanquintela/tags/migration-20211031-pull-request' into staging (2021-11-02 10:07:27 -0400) are available in the Git repository at: https://gitlab.com/berrange/qemu

[PULL 05/18] docs/devel: update error handling guidance for HMP commands

2021-11-02 Thread Daniel P . Berrangé
Best practice is to use the 'hmp_handle_error' function, not 'monitor_printf' or 'error_report_err'. This ensures that the message always gets an 'Error: ' prefix, distinguishing it from normal command output. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé ---

[PULL 03/18] docs/devel: rename file for writing monitor commands

2021-11-02 Thread Daniel P . Berrangé
The file already covers writing HMP commands, in addition to the QMP commands, so it deserves a more general name. Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé --- docs/devel/index.rst| 2 +-

[PULL 01/18] monitor: remove 'info ioapic' HMP command

2021-11-02 Thread Daniel P . Berrangé
This command was turned into a no-op four years ago in commit 0c8465440d50c18a7bb13d0a866748f0593e193a Author: Peter Xu Date: Fri Dec 29 15:31:04 2017 +0800 hmp: obsolete "info ioapic" Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé

Re: [RFC 3/6] target/riscv: rvk: add flag support for Zk/Zkn/Zknd/Zknd/Zkne/Zknh/Zks/Zksed/Zksh/Zkr

2021-11-02 Thread Richard Henderson
On 11/1/21 11:11 PM, liweiwei wrote: +if (cpu->cfg.ext_zk) { +cpu->cfg.ext_zbkb = true; +cpu->cfg.ext_zbkc = true; +cpu->cfg.ext_zbkx = true; +cpu->cfg.ext_zknd = true; +cpu->cfg.ext_zkne = true; +cpu->cfg.ext_zknh =

Re: [PATCH] softmmu/qdev-monitor: fix use-after-free in qdev_set_id()

2021-11-02 Thread Kevin Wolf
Am 02.11.2021 um 17:33 hat Stefan Hajnoczi geschrieben: > Reported by Coverity (CID 1465222). > > Fixes: 4a1d937796de0fecd8b22d7dbebf87f38e8282fd ("softmmu/qdev-monitor: add > error handling in qdev_set_id") > Cc: Damien Hedde > Cc: Kevin Wolf > Cc: Michael S. Tsirkin > Signed-off-by: Stefan

Re: [PATCH] vhost-vdpa: fix memory leak in vhost_vdpa_get_max_queue_pairs()

2021-11-02 Thread Philippe Mathieu-Daudé
On 11/2/21 17:39, Stefan Hajnoczi wrote: > Reported by Coverity (CID 1465228). > > Fixes: 402378407dbdce79ce745a13f5c84815f929cfdd ("vhost-vdpa: multiqueue > support") > Cc: Jason Wang > Signed-off-by: Stefan Hajnoczi > --- > net/vhost-vdpa.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PULL 05/12] tests/qtest: add qtests for npcm7xx sdhci

2021-11-02 Thread Philippe Mathieu-Daudé
Hi, On 11/2/21 11:59, Richard Henderson wrote: > From: Shengtan Mao > > Signed-off-by: Shengtan Mao > Signed-off-by: Hao Wu > Reviewed-by: Hao Wu > Reviewed-by: Chris Rauer > Reviewed-by: Tyrone Ting > Reviewed-by: Peter Maydell > Message-Id: <20211008002628.1958285-6-wuhao...@google.com>

Re: [PATCH 2/2] failover: don't allow to migrate a paused VM that needs PCI unplug

2021-11-02 Thread Laurent Vivier
On 02/11/2021 18:26, Juan Quintela wrote: "Michael S. Tsirkin" wrote: On Tue, Nov 02, 2021 at 06:06:51PM +0100, Laurent Vivier wrote: On 02/11/2021 16:04, Michael S. Tsirkin wrote: On Wed, Sep 29, 2021 at 04:43:11PM +0200, Laurent Vivier wrote: As the guest OS is paused, we will never

Re: [PATCH 2/2] failover: don't allow to migrate a paused VM that needs PCI unplug

2021-11-02 Thread Laurent Vivier
On 02/11/2021 18:08, Michael S. Tsirkin wrote: On Tue, Nov 02, 2021 at 06:06:51PM +0100, Laurent Vivier wrote: On 02/11/2021 16:04, Michael S. Tsirkin wrote: On Wed, Sep 29, 2021 at 04:43:11PM +0200, Laurent Vivier wrote: As the guest OS is paused, we will never receive the unplug event from

Re: [PATCH v2 5/5] tests/qtest: add qtests for npcm7xx sdhci

2021-11-02 Thread Richard Henderson
On 10/7/21 8:26 PM, Hao Wu wrote: +static void write_sdread(QTestState *qts, const char *msg) +{ +size_t len = strlen(msg); +char *rmsg = g_malloc(len); + +/* write message to sd */ +int fd = open(sd_path, O_WRONLY); +int ret; + +g_assert(fd > 0); +ret = write(fd,

Re: [PATCH 05/15] hw/nvme: Add support for SR-IOV

2021-11-02 Thread Lukasz Maniak
On Tue, Nov 02, 2021 at 03:33:15PM +0100, Klaus Jensen wrote: > On Oct 7 18:23, Lukasz Maniak wrote: > > This patch implements initial support for Single Root I/O Virtualization > > on an NVMe device. > > > > Essentially, it allows to define the maximum number of virtual functions > > supported

Re: [PATCH v5 06/26] arm: qemu: Add a devicetree file for qemu_arm64

2021-11-02 Thread Tom Rini
On Tue, Nov 02, 2021 at 09:00:53AM -0600, Simon Glass wrote: > Hi Tom, > > On Mon, 1 Nov 2021 at 12:07, Tom Rini wrote: > > > > On Mon, Nov 01, 2021 at 06:33:35PM +0100, François Ozog wrote: > > > Hi Simon > > > > > > Le lun. 1 nov. 2021 à 17:58, Simon Glass a écrit : > > > > > > > Hi Peter, >

Re: [PATCH 2/2] failover: don't allow to migrate a paused VM that needs PCI unplug

2021-11-02 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > On Tue, Nov 02, 2021 at 06:06:51PM +0100, Laurent Vivier wrote: >> On 02/11/2021 16:04, Michael S. Tsirkin wrote: >> > On Wed, Sep 29, 2021 at 04:43:11PM +0200, Laurent Vivier wrote: >> > > As the guest OS is paused, we will never receive the unplug event >> > > from

Re: [PATCH 2/2] failover: don't allow to migrate a paused VM that needs PCI unplug

2021-11-02 Thread Michael S. Tsirkin
On Tue, Nov 02, 2021 at 06:06:51PM +0100, Laurent Vivier wrote: > On 02/11/2021 16:04, Michael S. Tsirkin wrote: > > On Wed, Sep 29, 2021 at 04:43:11PM +0200, Laurent Vivier wrote: > > > As the guest OS is paused, we will never receive the unplug event > > > from the kernel and the migration

Re: [PATCH v1 00/12] virtio-mem: Expose device memory via multiple memslots

2021-11-02 Thread David Hildenbrand
On 02.11.21 18:06, Michael S. Tsirkin wrote: > On Tue, Nov 02, 2021 at 12:55:17PM +0100, David Hildenbrand wrote: >> On 02.11.21 12:35, Michael S. Tsirkin wrote: >>> On Tue, Nov 02, 2021 at 09:33:55AM +0100, David Hildenbrand wrote: On 01.11.21 23:15, Michael S. Tsirkin wrote: > On Wed,

Re: [PATCH] softmmu/qdev-monitor: fix use-after-free in qdev_set_id()

2021-11-02 Thread Michael S. Tsirkin
On Tue, Nov 02, 2021 at 04:33:42PM +, Stefan Hajnoczi wrote: > Reported by Coverity (CID 1465222). > > Fixes: 4a1d937796de0fecd8b22d7dbebf87f38e8282fd ("softmmu/qdev-monitor: add > error handling in qdev_set_id") > Cc: Damien Hedde > Cc: Kevin Wolf > Cc: Michael S. Tsirkin >

Re: [PATCH 2/2] failover: don't allow to migrate a paused VM that needs PCI unplug

2021-11-02 Thread Laurent Vivier
On 02/11/2021 16:04, Michael S. Tsirkin wrote: On Wed, Sep 29, 2021 at 04:43:11PM +0200, Laurent Vivier wrote: As the guest OS is paused, we will never receive the unplug event from the kernel and the migration cannot continue. Signed-off-by: Laurent Vivier Well ... what if user previously

Re: [PATCH] migration: RDMA registrations interval optimization

2021-11-02 Thread Juan Quintela
Zhiwei Jiang wrote: > RDMA migration very hard to complete when VM run mysql > benchmark on 1G host hugepage.I think the time between > ram_control_before_iterate(f, RAM_CONTROL_ROUND) and > after_iterate is too large when 1G host pagesize,so 1M > buffer size match with mlx driver that will be

Re: [PATCH v1 00/12] virtio-mem: Expose device memory via multiple memslots

2021-11-02 Thread Michael S. Tsirkin
On Tue, Nov 02, 2021 at 12:55:17PM +0100, David Hildenbrand wrote: > On 02.11.21 12:35, Michael S. Tsirkin wrote: > > On Tue, Nov 02, 2021 at 09:33:55AM +0100, David Hildenbrand wrote: > >> On 01.11.21 23:15, Michael S. Tsirkin wrote: > >>> On Wed, Oct 27, 2021 at 02:45:19PM +0200, David

[PATCH v3 0/3] memory: memory_region_is_mapped() cleanups

2021-11-02 Thread David Hildenbrand
Playing with memory_region_is_mapped(), I realized that memory regions mapped via an alias behave a little bit "differently", as they don't have their ->container set. * memory_region_is_mapped() will never succeed for memory regions mapped via an alias * memory_region_to_address_space(),

Re: [PATCH] MAINTAINERS: Change status to Odd Fixes

2021-11-02 Thread Cédric Le Goater
On 11/2/21 17:18, Peter Maydell wrote: On Mon, 1 Nov 2021 at 18:31, Cédric Le Goater wrote: I haven't done any Aspeed development for a couple of years now and maintaining the Aspeed QEMU machines has been a side project since. I don't have time anymore. Thanks for the work you've done on

Re: [PATCH v5 06/26] arm: qemu: Add a devicetree file for qemu_arm64

2021-11-02 Thread Tom Rini
On Tue, Nov 02, 2021 at 08:59:45AM -0600, Simon Glass wrote: > Hi François, > > On Mon, 1 Nov 2021 at 11:33, François Ozog wrote: > > > > Hi Simon > > > > Le lun. 1 nov. 2021 à 17:58, Simon Glass a écrit : > >> > >> Hi Peter, > >> > >> On Mon, 1 Nov 2021 at 04:48, Peter Maydell > >> wrote: >

[PATCH] vhost-vdpa: fix memory leak in vhost_vdpa_get_max_queue_pairs()

2021-11-02 Thread Stefan Hajnoczi
Reported by Coverity (CID 1465228). Fixes: 402378407dbdce79ce745a13f5c84815f929cfdd ("vhost-vdpa: multiqueue support") Cc: Jason Wang Signed-off-by: Stefan Hajnoczi --- net/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c

RE: [PULL 28/30] Hexagon HVX (tests/tcg/hexagon) hvx_misc test

2021-11-02 Thread Taylor Simpson
> -Original Message- > From: Alex Bennée > Sent: Tuesday, November 2, 2021 11:42 AM > To: Taylor Simpson > Cc: Richard Henderson ; Philippe Mathieu- > Daudé ; qemu-devel@nongnu.org; > peter.mayd...@linaro.org > Subject: Re: [PULL 28/30] Hexagon HVX (tests/tcg/hexagon) hvx_misc test >

Re: [PULL 6/6] hw/input/lasips2: QOM'ify the Lasi PS/2

2021-11-02 Thread Philippe Mathieu-Daudé
Hi Laurent, On 11/1/21 16:43, Philippe Mathieu-Daudé wrote: > On 11/1/21 16:31, Richard Henderson wrote: >> On 11/1/21 4:27 AM, Laurent Vivier wrote: >>> From: Philippe Mathieu-Daudé >>> >>> Signed-off-by: Philippe Mathieu-Daudé >>> Reviewed-by: Damien Hedde >>> Message-Id:

[PATCH] ppc/pnv: Fix check on block device before updating drive contents

2021-11-02 Thread Cédric Le Goater
Test is wrong and the backend can never updated. It could have led to a QEMU crash but since the firmware deactivates flash access if a valid layout is not detected, it went unnoticed. Reported-by: Coverity CID 1465223 Fixes: 35dde5766211 ("ppc/pnv: Add a PNOR model") Signed-off-by: Cédric Le

Re: [PATCH] softmmu/qdev-monitor: fix use-after-free in qdev_set_id()

2021-11-02 Thread Philippe Mathieu-Daudé
On 11/2/21 17:33, Stefan Hajnoczi wrote: > Reported by Coverity (CID 1465222). > > Fixes: 4a1d937796de0fecd8b22d7dbebf87f38e8282fd ("softmmu/qdev-monitor: add > error handling in qdev_set_id") > Cc: Damien Hedde > Cc: Kevin Wolf > Cc: Michael S. Tsirkin > Signed-off-by: Stefan Hajnoczi > ---

[PATCH v3 3/3] memory: Update description of memory_region_is_mapped()

2021-11-02 Thread David Hildenbrand
Let's update the documentation, making it clearer what the semantics of memory_region_is_mapped() actually are. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand --- include/exec/memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 2/3] memory: Make memory_region_is_mapped() succeed when mapped via an alias

2021-11-02 Thread David Hildenbrand
memory_region_is_mapped() currently does not return "true" when a memory region is mapped via an alias. Assuming we have: alias (A0) -> alias (A1) -> region (R0) Mapping A0 would currently only make memory_region_is_mapped() succeed on A0, but not on A1 and R0. Let's fix that by adding a

[PULL 03/10] microvm: add device tree support.

2021-11-02 Thread Gerd Hoffmann
Allows edk2 detect virtio-mmio devices and pcie ecam. See comment in hw/i386/microvm-dt.c for more details. Signed-off-by: Gerd Hoffmann Reviewed-by: Sergio Lopez Message-Id: <20211014193617.2475578-1-kra...@redhat.com> --- hw/i386/microvm-dt.h | 8 + include/hw/i386/microvm.h

[PATCH v3 1/3] machine: Use host_memory_backend_is_mapped() in machine_consume_memdev()

2021-11-02 Thread David Hildenbrand
memory_region_is_mapped() is the wrong check, we actually want to check whether the backend is already marked mapped. For example, memory regions mapped via an alias, such as NVDIMMs, currently don't make memory_region_is_mapped() return "true". As the machine is initialized before any memory

[PULL 05/10] ui/gtk: skip any extra draw of same guest scanout blob res

2021-11-02 Thread Gerd Hoffmann
From: Dongwon Kim Any extra draw call for the same blob resource representing guest scanout before the previous drawing is not finished can break synchronous draw sequence. To prevent this, drawing is now done only once for each draw submission (when draw_submitted == true). v2: - removed

Re: [PULL 28/30] Hexagon HVX (tests/tcg/hexagon) hvx_misc test

2021-11-02 Thread Alex Bennée
Taylor Simpson writes: >> -Original Message- >> From: Richard Henderson >> Sent: Monday, November 1, 2021 10:03 AM >> To: Philippe Mathieu-Daudé ; Taylor Simpson >> ; qemu-devel@nongnu.org; Alex Bennée >> >> Cc: peter.mayd...@linaro.org >> Subject: Re: [PULL 28/30] Hexagon HVX

[PULL 01/10] MAINTAINERS: Add myself as a reviewer for SDL audio

2021-11-02 Thread Gerd Hoffmann
From: Thomas Huth I've got some experience with the SDL library, so I can help reviewing patches here. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211030062106.46024-1-h...@tuxfamily.org> Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 1 + 1 file changed, 1

[PULL 10/10] usb-storage: tag usb_msd_csw as packed struct

2021-11-02 Thread Gerd Hoffmann
Without this the struct has the wrong size: sizeof() evaluates to 16 instead of 13. In most cases the bug is hidden by the fact that guests submits a buffer which is exactly 13 bytes long, so the padding added by the compiler is simply ignored. But sometimes guests submit a larger buffer and

[PATCH] softmmu/qdev-monitor: fix use-after-free in qdev_set_id()

2021-11-02 Thread Stefan Hajnoczi
Reported by Coverity (CID 1465222). Fixes: 4a1d937796de0fecd8b22d7dbebf87f38e8282fd ("softmmu/qdev-monitor: add error handling in qdev_set_id") Cc: Damien Hedde Cc: Kevin Wolf Cc: Michael S. Tsirkin Signed-off-by: Stefan Hajnoczi --- softmmu/qdev-monitor.c | 2 +- 1 file changed, 1

Re: [PATCH v2 5/7] Removed the qemu_fclose() in colo_process_incoming_thread

2021-11-02 Thread Juan Quintela
"Rao, Lei" wrote: > From: "Rao, Lei" > > After the live migration, the related fd will be cleanup in > migration_incoming_state_destroy(). So, the qemu_close() > in colo_process_incoming_thread is not necessary. > > Signed-off-by: Lei Rao Reviewed-by: Juan Quintela queued.

[PULL 09/10] hw/misc: deprecate the 'sga' device

2021-11-02 Thread Gerd Hoffmann
From: Daniel P. Berrangé This is obsolete since SeaBIOS 1.11.0 introduced native support for sending messages to the serial console. The new support can be activated using -machine graphics=off on x86 targets. Signed-off-by: Daniel P. Berrangé Reviewed-by: Gerd Hoffmann Message-Id:

[PULL 06/10] ui/console: replace QEMUFIFO with Fifo8

2021-11-02 Thread Gerd Hoffmann
From: Volker Rümelin One of the two FIFO implementations QEMUFIFO and Fifo8 is redundant. Replace QEMUFIFO with Fifo8. Signed-off-by: Volker Rümelin Reviewed-by: Marc-André Lureau Message-Id: <20210916192239.18742-1-vr_q...@t-online.de> Signed-off-by: Gerd Hoffmann --- ui/console.c | 86

RE: [PULL 28/30] Hexagon HVX (tests/tcg/hexagon) hvx_misc test

2021-11-02 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Monday, November 1, 2021 10:03 AM > To: Philippe Mathieu-Daudé ; Taylor Simpson > ; qemu-devel@nongnu.org; Alex Bennée > > Cc: peter.mayd...@linaro.org > Subject: Re: [PULL 28/30] Hexagon HVX (tests/tcg/hexagon) hvx_misc test > >

[PULL 04/10] ui/gtk: Update the refresh rate for gl-area too

2021-11-02 Thread Gerd Hoffmann
From: Nikola Pavlica This is a bugfix that stretches all the way back to January 2020, where I initially introduced this problem and potential solutions. A quick recap of the issue: QEMU did not sync up with the monitors refresh rate causing the VM to render frames that were NOT displayed to

[PULL 07/10] ui/console: replace kbd_timer with chr_accept_input callback

2021-11-02 Thread Gerd Hoffmann
From: Volker Rümelin There's a ChardevClass chr_accept_input() callback function that can replace the write retry timer. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin Message-Id: <20210916192239.18742-2-vr_q...@t-online.de> Signed-off-by: Gerd Hoffmann --- ui/console.c | 28

[PULL 07/12] linux-aio: add `dev_max_batch` parameter to laio_co_submit()

2021-11-02 Thread Kevin Wolf
From: Stefano Garzarella This new parameter can be used by block devices to limit the Linux AIO batch size more than the limit set by the AIO context. file-posix backend supports this, passing its `aio-max-batch` option previously added. Add an helper function to calculate the maximum batch

[PULL 00/10] Misc 20211102 patches

2021-11-02 Thread Gerd Hoffmann
The following changes since commit 8cb41fda78c7ebde0dd248c6afe1d336efb0de50: Merge remote-tracking branch 'remotes/philmd/tags/machine-20211101' into staging (2021-11-02 05:53:45 -0400) are available in the Git repository at: git://git.kraxel.org/qemu tags/misc-20211102-pull-request

[PULL 08/10] ui/console: remove chardev frontend connected test

2021-11-02 Thread Gerd Hoffmann
From: Volker Rümelin The test if the chardev frontend is connected in kbd_put_keysym_console() is redundant, because the call to qemu_chr_be_can_write() in kbd_send_chars() tests the connected condition again. Remove the redundant test whether the chardev frontend is connected. Reviewed-by:

[PULL 02/10] MAINTAINERS: add myself as partial audio reviewer

2021-11-02 Thread Gerd Hoffmann
From: Christian Schoenebeck Volunteering as reviewer for some of the audio backends; namely ALSA, CoreAudio and JACK. Signed-off-by: Christian Schoenebeck Reviewed-by: Philippe Mathieu-Daudé Message-Id: Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+)

<    1   2   3   4   5   6   >