[PATCH 11/12] pci: Rename hmp_pcie_aer_inject_error()'s local variable @err

2022-11-28 Thread Markus Armbruster
I'd like to use @err for an Error *err. Rename PCIEAERErr err to aer_err. Signed-off-by: Markus Armbruster --- hw/pci/pci-hmp-cmds.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-cmds.c index b03ba

[PATCH 07/12] pci: Move pcibus_dev_print() to pci-hmp-cmds.c

2022-11-28 Thread Markus Armbruster
This method is for HMP command "info qtree". Signed-off-by: Markus Armbruster --- hw/pci/pci-internal.h | 1 + hw/pci/pci-hmp-cmds.c | 38 ++ hw/pci/pci.c | 38 -- 3 files changed, 39 insertions(+), 38 deletions(-)

[PATCH 09/12] pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c

2022-11-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/pci/pci-internal.h | 4 ++ include/monitor/hmp.h | 1 + include/sysemu/sysemu.h | 3 -- hw/pci/pci-hmp-cmds.c | 105 hw/pci/pci-stub.c | 1 - hw/pci/pcie_aer.c | 115 ++--

[PATCH 05/12] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI

2022-11-28 Thread Markus Armbruster
We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when CONFIG_PCI. hw/pci/pci-stub.c keeps the linker happy when !CONFIG_PCI. Build pci-hmp-cmds.c that way, too. Signed-off-by: Markus Armbruster --- hw/pci/pci-stub.c | 5 + hw/pci/meson.build | 2 +- 2 files changed, 6 insertions(

[PATCH 06/12] pci: Deduplicate get_class_desc()

2022-11-28 Thread Markus Armbruster
pcibus_dev_print() contains a copy of get_class_desc(). Call the function instead. Signed-off-by: Markus Armbruster --- hw/pci/pci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 81ffc74925..6711a75098 100644 --- a/hw/pci/pci.c ++

[PATCH 01/12] pci: Clean up a few things checkpatch.pl would flag later on

2022-11-28 Thread Markus Armbruster
Fix a few style violations so that checkpatch.pl won't complain when I move this code. Signed-off-by: Markus Armbruster --- hw/pci/pci.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 2f450f6a72..53ed447115 100644 --- a/hw/pci/pci.c

[PATCH 00/12] pci: Move and clean up monitor command code

2022-11-28 Thread Markus Armbruster
This is mainly about splitting off monitor-related code. There's also a few UI fixes to HMP command pcie_aer_inject_error. One UI issue remains: when the second argument is symbolic (found in table pcie_aer_error_list[]), then any -c is silently ignored. Should it be rejected? Should it overrid

[PATCH 02/12] pci: Move QMP commands to new hw/pci/pci-qmp-cmds.c

2022-11-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/pci/pci-internal.h | 20 + hw/pci/pci-qmp-cmds.c | 201 ++ hw/pci/pci.c | 188 +-- hw/pci/meson.build| 1 + 4 files changed, 226 insertions(+), 184 deletions(-)

[PATCH 10/12] pci: Inline do_pcie_aer_inject_error() into its only caller

2022-11-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/pci/pci-hmp-cmds.c | 41 ++--- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-cmds.c index 393ab4214a..b03badb1e6 100644 --- a/hw/pci/pci-hmp-cmds.c +++ b/hw/pci/pci-

[PATCH 12/12] pci: Improve do_pcie_aer_inject_error()'s error messages

2022-11-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/pci/pci-hmp-cmds.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/pci/pci-hmp-cmds.c b/hw/pci/pci-hmp-cmds.c index 0807a206e4..279851bfe6 100644 --- a/hw/pci/pci-hmp-cmds.c +++ b/hw/pci/pci-hmp-cmds.c

[PATCH 08/12] pci: Fix silent truncation of pcie_aer_inject_error argument

2022-11-28 Thread Markus Armbruster
PCI AER error status is 32 bit. When the HMP command's second argument parses as a number, values greater than ULONG_MAX get rejected, but values between UINT32_MAX+1 and ULONG_MAX get silently truncated. Fix to reject them, too. While there, use qemu_strtoul() instead of strtoul() so checkpatch

[PATCH 03/12] pci: Move HMP commands from monitor/ to new hw/pci/pci-hmp-cmds.c

2022-11-28 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "PCI". Signed-off-by: Markus Armbruster --- hw/pci/pci-hmp-cmds.c | 126 ++ monitor/hmp-cmds.c| 107 --- hw/pci/meson.build| 1 + 3 files

RE: [PATCH] target/i386/hax: Add XCR0 support

2022-11-28 Thread Wang, Wenchao
Hi, Philippe, It is just the full patch. Currently, the implementation of HAXM is simple, we did not synchronize the vCPU register for xcr0 from QEMU. HAXM will handle the xcr0 state within the kernel space, including initialization, update, etc. This patch adds the xcr0 variable for allocating

[PATCH 04/12] pci: Make query-pci stub consistent with the real one

2022-11-28 Thread Markus Armbruster
QMP query-pci and HMP info pci can behave differently when there are no PCI devices. They can report nothing, like this: qemu-system-aarch64 -S -M spitz -display none -monitor stdio QEMU 7.1.91 monitor - type 'help' for more information (qemu) info pci Or they can fail, like this:

Re: [PATCH 09/12] pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:01, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- hw/pci/pci-internal.h | 4 ++ include/monitor/hmp.h | 1 + include/sysemu/sysemu.h | 3 -- hw/pci/pci-hmp-cmds.c | 105 hw/pci/pci-stub.c | 1 - hw/pci

Re: [PATCH 11/12] pci: Rename hmp_pcie_aer_inject_error()'s local variable @err

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:02, Markus Armbruster wrote: I'd like to use @err for an Error *err. Rename PCIEAERErr err to aer_err. Signed-off-by: Markus Armbruster --- hw/pci/pci-hmp-cmds.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) Reviewed-by: Philippe

Re: [RFC PATCH-for-7.2 3/4] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Marc-André Lureau
On Fri, Nov 25, 2022 at 9:35 PM Philippe Mathieu-Daudé wrote: > > Currently qxl_phys2virt() doesn't check for buffer overrun. > In order to do so in the next commit, pass the buffer size > as argument. > > Signed-off-by: Philippe Mathieu-Daudé > --- > RFC: Please double-check qxl_render_update

Re: [PATCH 07/12] pci: Move pcibus_dev_print() to pci-hmp-cmds.c

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:01, Markus Armbruster wrote: This method is for HMP command "info qtree". Signed-off-by: Markus Armbruster --- hw/pci/pci-internal.h | 1 + hw/pci/pci-hmp-cmds.c | 38 ++ hw/pci/pci.c | 38 --

Re: [RFC PATCH-for-7.2 1/4] hw/display/qxl: Have qxl_log_command Return early if no log_cmd handler

2022-11-28 Thread Marc-André Lureau
Hi On Fri, Nov 25, 2022 at 7:41 PM Philippe Mathieu-Daudé wrote: > > Only 3 command types are logged: no need to call qxl_phys2virt() > for the other types. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/display/qxl-logger.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --

Re: [RFC PATCH-for-7.2 2/4] hw/display/qxl: Document qxl_phys2virt()

2022-11-28 Thread Marc-André Lureau
On Fri, Nov 25, 2022 at 7:41 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > hw/display/qxl.h | 19 +++ > 1 file changed, 19 insertions(+) > > diff --git a/hw/display/qxl.h b/hw/display/qxl.h > index e74de9579d

Re: [PATCH 05/12] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:01, Markus Armbruster wrote: We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when CONFIG_PCI. hw/pci/pci-stub.c keeps the linker happy when !CONFIG_PCI. Build pci-hmp-cmds.c that way, too. Signed-off-by: Markus Armbruster --- hw/pci/pci-stub.c | 5 + hw/pci/me

Re: [PATCH 03/12] pci: Move HMP commands from monitor/ to new hw/pci/pci-hmp-cmds.c

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:01, Markus Armbruster wrote: This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "PCI". Signed-off-by: Markus Armbruster --- hw/pci/pci-hmp-cmds.c | 126 ++ monitor/hmp-cmds.c| 107

Re: [PATCH 01/12] pci: Clean up a few things checkpatch.pl would flag later on

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:01, Markus Armbruster wrote: Fix a few style violations so that checkpatch.pl won't complain when I move this code. Signed-off-by: Markus Armbruster --- hw/pci/pci.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH-for-7.2 4/4] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt (CVE-2022-4144)

2022-11-28 Thread Marc-André Lureau
Hi On Fri, Nov 25, 2022 at 9:35 PM Philippe Mathieu-Daudé wrote: > > Return NULL if the requested buffer size does not fit > within the slot memory region. > > Reported-by: Wenxu Yin (@awxylitol) > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1336 > Signed-off-by: Philippe Mathieu-Daud

Re: [Virtio-fs] [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-28 Thread Marc Hartmayer
German Maglione writes: > On Fri, Nov 25, 2022 at 3:40 PM Marc Hartmayer wrote: >> >> The virtiofsd currently crashes on s390x. This is because of a >> `sigreturn` system call. See audit log below: >> >> type=SECCOMP msg=audit(1669382477.611:459): auid=4294967295 uid=0 gid=0 >> ses=4294967295 s

Re: [PATCH] vhost: configure all host notifiers in a single MR transaction

2022-11-28 Thread longpeng2--- via
在 2022/11/21 12:01, Jason Wang 写道: On Fri, Nov 18, 2022 at 10:49 PM Longpeng(Mike) wrote: From: Longpeng This allows the vhost device to batch the setup of all its host notifiers. This significantly reduces the device starting time, e.g. the vhost-vDPA generic device [1] start time reduce

Re: [PATCH v6 07/14] block: distinguish between bdrv_create running in coroutine and not

2022-11-28 Thread Emanuele Giuseppe Esposito
Am 25/11/2022 um 19:03 schrieb Vladimir Sementsov-Ogievskiy: > On 11/25/22 16:35, Emanuele Giuseppe Esposito wrote: >> Call two different functions depending on whether bdrv_create >> is in coroutine or not, following the same pattern as >> generated_co_wrapper functions. >> >> This allows to al

Re: [PATCH v6 10/14] block-coroutine-wrapper.py: introduce co_wrapper

2022-11-28 Thread Emanuele Giuseppe Esposito
Am 25/11/2022 um 21:32 schrieb Vladimir Sementsov-Ogievskiy: > >>     class FuncDecl: >> -    def __init__(self, return_type: str, name: str, args: str) -> None: >> +    def __init__(self, return_type: str, name: str, args: str, >> + variant: str) -> None: > > I'd prefer mixed:

Re: [PATCH 00/12] pci: Move and clean up monitor command code

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 09:01:50AM +0100, Markus Armbruster wrote: > This is mainly about splitting off monitor-related code. There's also > a few UI fixes to HMP command pcie_aer_inject_error. One UI issue > remains: when the second argument is symbolic (found in table > pcie_aer_error_list[]),

[PATCH v2 for-8.0 0/5] scripts/make-release: Decrease size of the release tarballs

2022-11-28 Thread Thomas Huth
Our release tarballs are huge - qemu-7.2.0-rc2.tar.xz has a size of 116 MiB. If you look at the contents, approx. 80% of the size is used for the firmware sources that we ship along to provide the sources for the ROM binaries. This feels very wrong, why do we urge users to download such huge tarbal

[PATCH v2 for-8.0 2/5] scripts/make-release: Only clone single branches to speed up the script

2022-11-28 Thread Thomas Huth
Using --single-branch and --depth 1 here helps to speed up the process a little bit and helps to save some networking bandwidth. Signed-off-by: Thomas Huth --- scripts/make-release | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/make-release b/scripts/make-

[PATCH v2 for-8.0 1/5] scripts/make-release: Add a simple help text for the script

2022-11-28 Thread Thomas Huth
Print a simple help text if the script has been called with the wrong amount of parameters. Signed-off-by: Thomas Huth --- scripts/make-release | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/make-release b/scripts/make-release index 05b14ecc95..4be9b3b9ce 100755 --- a/scripts/

[PATCH v2 for-8.0 4/5] roms: Add a README file with some basic information

2022-11-28 Thread Thomas Huth
We're going to ship the contents of the "roms" folder as a separate tarball, so we should have at least a short README in this folder for this. Signed-off-by: Thomas Huth --- roms/README.rst | 24 1 file changed, 24 insertions(+) create mode 100644 roms/README.rst diff

[PATCH v2 for-8.0 3/5] scripts/make-release: Remove CI yaml and more git files from the tarball

2022-11-28 Thread Thomas Huth
These files are of no use in a normal tarball and thus should not be included here. Signed-off-by: Thomas Huth --- scripts/make-release | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/make-release b/scripts/make-release index 44a9d86a04..febeb6cb36 100755 --- a/sc

[PATCH v2 for-8.0 5/5] scripts/make-release: Move roms into separate tarball

2022-11-28 Thread Thomas Huth
Our current release tarballs are huge and caused already some trouble with the server traffic in the past. However, the biggest chunk (~80%) of the tarball is caused by the firmware sources - which most users don't need anyway (assuming that they just want to compile QEMU itself on their own). So w

Re: [PATCH] 9pfs: Fix some return statements in the synth backend

2022-11-28 Thread Greg Kurz
On Mon, 28 Nov 2022 08:35:22 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > The qemu_v9fs_synth_mkdir() and qemu_v9fs_synth_add_file() functions > > currently return a positive errno value on failure. This causes > > checkpatch.pl to spit several errors like the one below: > > > > ERR

[PATCH v3 1/3] cleanup: Tweak and re-run return_directly.cocci

2022-11-28 Thread Markus Armbruster
Tweak the semantic patch to drop redundant parenthesis around the return expression. Coccinelle drops a comment in hw/rdma/vmw/pvrdma_cmd.c; restored manually. Coccinelle messes up vmdk_co_create(), not sure why. Change dropped, will be done manually in the next commit. Line breaks in target/av

[PATCH v3 3/3] ppc4xx_sdram: Simplify sdram_ddr_size() to return directly

2022-11-28 Thread Markus Armbruster
Suggested-by: BALATON Zoltan Signed-off-by: Markus Armbruster Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/ppc4xx_sdram.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/ppc/ppc4xx_sdram.c b/hw/ppc/ppc4xx_sdram.c index 54bf9a2b44.

[PATCH v3 2/3] block/vmdk: Simplify vmdk_co_create() to return directly

2022-11-28 Thread Markus Armbruster
Cc: Fam Zheng Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- block/vmdk.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/block/vmd

[PATCH v3 0/3] cleanup: Tweak and re-run return_directly.cocci

2022-11-28 Thread Markus Armbruster
v3: * Rebased onto Greg's "[PATCH] 9pfs: Fix some return statements in the synth backend", which replaces my change to hw/9pfs/9p-synth.c in PATCH 1/3, along with a paragraph on checkpatch.pl in the commit message. v2: * Changes to imported files dropped [Philippe, Max] * Handwritten change

Re: [RFC PATCH] migration: reduce time of loading non-iterable vmstate

2022-11-28 Thread Chuang Xu
On 2022/11/25 上午12:40, Peter Xu wrote: On Fri, Nov 18, 2022 at 04:36:48PM +0800, Chuang Xu wrote: The duration of loading non-iterable vmstate accounts for a significant portion of downtime (starting with the timestamp of source qemu stop and ending with the timestamp of target qemu start). Mos

[PATCH 03/11] multifd: We already account for this packet on the multifd thread

2022-11-28 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/multifd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 49fa76e5e1..61cafe4c76 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -622,10 +622,7 @@ int multifd_send_sync_main(QEMUFile *f)

[PATCH 07/11] multifd: Prepare to send a packet without the mutex held

2022-11-28 Thread Juan Quintela
We do the send_prepare() and the fill of the head packet without the mutex held. It will help a lot for compression and later in the series for zero pages. Notice that we can use p->pages without holding p->mutex because p->pending_job == 1. Signed-off-by: Juan Quintela --- migration/multifd.h

[PATCH 00/11] Multifd zero page support

2022-11-28 Thread Juan Quintela
Based on top of my next-8.0 branch. - rebased on top of latest upstream - lots of minor fixes - start support for atomic counters * we need to move ram_limit_used/max to migration.c * that means fixing rdma.c * and test-vmstate. So I am donig that right now. Juan Quintela (11): migration

[PATCH 04/11] multifd: Count the number of bytes sent correctly

2022-11-28 Thread Juan Quintela
Current code asumes that all pages are whole. That is not true for example for compression already. Fix it for creating a new field ->sent_bytes that includes it. All ram_counters are used only from the migration thread, so we have two options: - put a mutex and fill everything when we sent it (

[PATCH 01/11] migration: Update atomic stats out of the mutex

2022-11-28 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/multifd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 000ca4d4ec..20a81cd7f2 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -432,8 +432,8 @@ static int multifd_sen

[PATCH 02/11] migration: Make multifd_bytes atomic

2022-11-28 Thread Juan Quintela
In the spirit of: commit 394d323bc3451e4d07f13341cb8817fac8dfbadd Author: Peter Xu Date: Tue Oct 11 17:55:51 2022 -0400 migration: Use atomic ops properly for page accountings Signed-off-by: Juan Quintela --- migration/ram.h | 1 + migration/migration.c | 4 ++-- migration/multifd

[PATCH 08/11] multifd: Add capability to enable/disable zero_page

2022-11-28 Thread Juan Quintela
We have to enable it by default until we introduce the new code. Signed-off-by: Juan Quintela --- Change it to a capability. As capabilities are off by default, have to change MULTIFD_ZERO_PAGE to MAIN_ZERO_PAGE, so it is false for default, and true for older versions. --- qapi/migration.json

[PATCH 05/11] migration: Make ram_save_target_page() a pointer

2022-11-28 Thread Juan Quintela
We are going to create a new function for multifd latest in the series. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 334309f1c

[PATCH 11/11] So we use multifd to transmit zero pages.

2022-11-28 Thread Juan Quintela
Signed-off-by: Juan Quintela --- - Check zero_page property before using new code (Dave) --- migration/migration.c | 3 +-- migration/ram.c | 32 +++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c

[PATCH 06/11] multifd: Make flags field thread local

2022-11-28 Thread Juan Quintela
Use of flags with respect to locking was incensistant. For the sending side: - it was set to 0 with mutex held on the multifd channel. - MULTIFD_FLAG_SYNC was set with mutex held on the migration thread. - Everything else was done without the mutex held on the multifd channel. On the reception si

[PATCH 09/11] multifd: Support for zero pages transmission

2022-11-28 Thread Juan Quintela
This patch adds counters and similar. Logic will be added on the following patch. Signed-off-by: Juan Quintela --- Added counters for duplicated/non duplicated pages. Removed reviewed by from David. Add total_zero_pages --- migration/multifd.h| 17 - migration/multifd.c

[PATCH 10/11] multifd: Zero pages transmission

2022-11-28 Thread Juan Quintela
This implements the zero page dection and handling. Signed-off-by: Juan Quintela --- Add comment for offset (dave) Use local variables for offset/block to have shorter lines --- migration/multifd.h | 5 + migration/multifd.c | 45 +++-- 2 files chan

[PULL 1/2] update seabios source from 1.16.0 to 1.16.1

2022-11-28 Thread Gerd Hoffmann
git shortlog rel-1.16.0..rel-1.16.1 === Gerd Hoffmann (3): malloc: use variable for ZoneHigh size malloc: use large ZoneHigh when there is enough memory virtio-blk: use larger default request size Igor Mammedov (1): acpi: parse Alias object

[PULL 0/2] Seabios 1.16.1 20221128 patches

2022-11-28 Thread Gerd Hoffmann
The following changes since commit 7c09a7f6ae1770d15535980d15dffdb23f4d9786: Update VERSION for v7.2.0-rc2 (2022-11-22 18:59:56 -0500) are available in the Git repository at: https://gitlab.com/kraxel/qemu.git tags/seabios-1.16.1-20221128-pull-request for you to fetch changes up to

Re: [Virtio-fs] [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-28 Thread German Maglione
On Mon, Nov 28, 2022 at 10:00 AM Marc Hartmayer wrote: > > German Maglione writes: > > > On Fri, Nov 25, 2022 at 3:40 PM Marc Hartmayer > > wrote: > >> > >> The virtiofsd currently crashes on s390x. This is because of a > >> `sigreturn` system call. See audit log below: > >> > >> type=SECCOMP m

Re: [PATCH] 9pfs: Fix some return statements in the synth backend

2022-11-28 Thread Markus Armbruster
Greg Kurz writes: > On Mon, 28 Nov 2022 08:35:22 +0100 > Markus Armbruster wrote: > >> Greg Kurz writes: >> >> > The qemu_v9fs_synth_mkdir() and qemu_v9fs_synth_add_file() functions >> > currently return a positive errno value on failure. This causes >> > checkpatch.pl to spit several errors l

Re: [PATCH 05/12] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI

2022-11-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 28/11/22 09:01, Markus Armbruster wrote: >> We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when >> CONFIG_PCI. hw/pci/pci-stub.c keeps the linker happy when >> !CONFIG_PCI. Build pci-hmp-cmds.c that way, too. >> Signed-off-by: Markus Armbruster >>

Re: [PATCH 05/12] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 11:21:36AM +0100, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > > > On 28/11/22 09:01, Markus Armbruster wrote: > >> We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when > >> CONFIG_PCI. hw/pci/pci-stub.c keeps the linker happy when > >> !CONFIG_PC

Re: [PATCH 00/12] pci: Move and clean up monitor command code

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 09:01:50AM +0100, Markus Armbruster wrote: > This is mainly about splitting off monitor-related code. There's also > a few UI fixes to HMP command pcie_aer_inject_error. One UI issue > remains: when the second argument is symbolic (found in table > pcie_aer_error_list[]),

Re: [PATCH v3 for-7.2 0/6] Add format attributes and fix format strings

2022-11-28 Thread Michael S. Tsirkin
On Sat, Nov 26, 2022 at 04:25:01PM +0100, Stefan Weil wrote: > v3: > - Fix description for patch 3 > - Add patches 5 and 6 > > The patches 3 and 5 still need reviews! Series: Reviewed-by: Michael S. Tsirkin Stefan you said you want to merge this? > [PATCH v3 for-7.2 1/6] libvhost-user: Fix wro

Re: [PATCH] hw/intc: sifive_plic: fix out-of-bound access of source_priority array

2022-11-28 Thread Bin Meng
On Mon, Nov 28, 2022 at 12:59 AM Jim Shu wrote: > > If the number of interrupt is not multiple of 32, PLIC will have > out-of-bound access to source_priority array. Compute the number of > interrupt in the last word to avoid this out-of-bound access of array. > > Signed-off-by: Jim Shu > --- > h

Re: [PATCH 1/3] qemu-img: Add checksum command

2022-11-28 Thread Nir Soffer
On Mon, Nov 7, 2022 at 12:20 PM Hanna Reitz wrote: > On 30.10.22 18:37, Nir Soffer wrote: > > On Wed, Oct 26, 2022 at 4:00 PM Hanna Reitz wrote: > > > > On 01.09.22 16:32, Nir Soffer wrote: > [...] > > > --- > > > docs/tools/qemu-img.rst | 22 + > > > meson.build

Re: [PATCH 2/3] iotests: Test qemu-img checksum

2022-11-28 Thread Nir Soffer
On Mon, Nov 7, 2022 at 1:41 PM Hanna Reitz wrote: > On 30.10.22 18:38, Nir Soffer wrote: > > On Wed, Oct 26, 2022 at 4:31 PM Hanna Reitz wrote: > > > > On 01.09.22 16:32, Nir Soffer wrote: > > > Add simple tests creating an image with all kinds of extents, > > different > > > for

Re: [PATCH v3 for-7.2 0/6] Add format attributes and fix format strings

2022-11-28 Thread Stefan Hajnoczi
On Mon, Nov 28, 2022, 05:29 Michael S. Tsirkin wrote: > On Sat, Nov 26, 2022 at 04:25:01PM +0100, Stefan Weil wrote: > > v3: > > - Fix description for patch 3 > > - Add patches 5 and 6 > > > > The patches 3 and 5 still need reviews! > > Series: > Reviewed-by: Michael S. Tsirkin > > Stefan you sa

Re: [RFC PATCH-for-7.2 3/4] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:22, Marc-André Lureau wrote: On Fri, Nov 25, 2022 at 9:35 PM Philippe Mathieu-Daudé wrote: Currently qxl_phys2virt() doesn't check for buffer overrun. In order to do so in the next commit, pass the buffer size as argument. Signed-off-by: Philippe Mathieu-Daudé --- RFC: Pl

Re: [RFC PATCH-for-7.2 4/4] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt (CVE-2022-4144)

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 09:35, Marc-André Lureau wrote: Hi On Fri, Nov 25, 2022 at 9:35 PM Philippe Mathieu-Daudé wrote: Return NULL if the requested buffer size does not fit within the slot memory region. Reported-by: Wenxu Yin (@awxylitol) Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1336 S

Re: [PATCH v2] riscv: Add RISCVCPUConfig.satp_mode to set sv48, sv57, etc.

2022-11-28 Thread Andrew Jones
On Fri, Nov 25, 2022 at 11:59:54AM +0100, Alexandre Ghiti wrote: > RISC-V specifies multiple sizes for addressable memory and Linux probes for > the machine's support at startup via the satp CSR register (done in > csr.c:validate_vm). > > As per the specification, sv64 must support sv57, which in

Re: [PATCH 09/12] pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c

2022-11-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 28/11/22 09:01, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> hw/pci/pci-internal.h | 4 ++ >> include/monitor/hmp.h | 1 + >> include/sysemu/sysemu.h | 3 -- >> hw/pci/pci-hmp-cmds.c | 105

Re: [PATCH 00/12] pci: Move and clean up monitor command code

2022-11-28 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Mon, Nov 28, 2022 at 09:01:50AM +0100, Markus Armbruster wrote: >> This is mainly about splitting off monitor-related code. There's also >> a few UI fixes to HMP command pcie_aer_inject_error. One UI issue >> remains: when the second argument is symbolic (found

Re: [PATCH 03/12] pci: Move HMP commands from monitor/ to new hw/pci/pci-hmp-cmds.c

2022-11-28 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > This moves these commands from MAINTAINERS section "Human > Monitor (HMP)" to "PCI". > > Signed-off-by: Markus Armbruster > --- > hw/pci/pci-hmp-cmds.c | 126 ++ > monitor/hmp-cmds.c| 107 ---

Re: [PATCH 05/12] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI

2022-11-28 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when > CONFIG_PCI. hw/pci/pci-stub.c keeps the linker happy when > !CONFIG_PCI. Build pci-hmp-cmds.c that way, too. > > Signed-off-by: Markus Armbruster Had you considered wrapping the hm

[PATCH v6 8/9] target/riscv: expose properties for Zc* extension

2022-11-28 Thread Weiwei Li
Expose zca,zcb,zcf,zcd,zcmp,zcmt properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 9f4aa0fe55..64027a07e6 100644

[PATCH v6 2/9] target/riscv: add support for Zca extension

2022-11-28 Thread Weiwei Li
Modify the check for C extension to Zca (C implies Zca) Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/translate.c| 8 ++-- 2 files change

[PATCH v6 3/9] target/riscv: add support for Zcf extension

2022-11-28 Thread Weiwei Li
Separate c_flw/c_fsw from flw/fsw to add check for Zcf extension Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode | 8 target/riscv/insn_trans/trans_rvf.c.inc | 18 +

[PATCH v6 6/9] target/riscv: add support for Zcmp extension

2022-11-28 Thread Weiwei Li
Add encode, trans* functions for Zcmp instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode| 18 +++ target/riscv/insn_trans/trans_rvzce.c.inc | 189 +-

[PATCH v6 0/9] support subsets of code size reduction extension

2022-11-28 Thread Weiwei Li
This patchset implements RISC-V Zc* extension v1.0.0.RC5.7 version instructions. Specification: https://github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-zce-upstream-v6 To test Zc* implementation, spe

[PATCH v6 1/9] target/riscv: add cfg properties for Zc* extension

2022-11-28 Thread Weiwei Li
Add properties for Zca,Zcb,Zcf,Zcd,Zcmp,Zcmt extension Add check for these properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 43 +++ target/riscv/cpu.h

[PATCH v6 9/9] disas/riscv.c: add disasm support for Zc*

2022-11-28 Thread Weiwei Li
Zcmp/Zcmt instructions will override disasm for c.fld*/c.fsd* instructions currently Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Acked-by: Alistair Francis --- disas/riscv.c | 287 +- 1 file changed, 286 insertions(+), 1 deletion(-) di

[PATCH v6 7/9] target/riscv: add support for Zcmt extension

2022-11-28 Thread Weiwei Li
Add encode, trans* functions and helper functions support for Zcmt instrutions Add support for jvt csr Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h| 4 ++ target/riscv/cpu_bit

[PATCH v6 4/9] target/riscv: add support for Zcd extension

2022-11-28 Thread Weiwei Li
Separate c_fld/c_fsd from fld/fsd to add additional check for c.fld{sp}/c.fsd{sp} which is useful for zcmp/zcmt to reuse their encodings Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode

[PATCH v6 5/9] target/riscv: add support for Zcb extension

2022-11-28 Thread Weiwei Li
Add encode and trans* functions support for Zcb instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode| 24 ++ target/riscv/insn_trans/trans_rvzce.c.inc | 100 +

Re: [PATCH v2 11/15] block: Call drain callbacks only once

2022-11-28 Thread Kevin Wolf
Am 25.11.2022 um 15:59 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11/18/22 20:41, Kevin Wolf wrote: > > We only need to call both the BlockDriver's callback and the parent > > callbacks when going from undrained to drained or vice versa. A second > > drain section doesn't make a difference

Re: [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm()

2022-11-28 Thread Kevin Wolf
Am 25.11.2022 um 17:07 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11/18/22 20:41, Kevin Wolf wrote: > > In order to make sure that bdrv_replace_child_noperm() doesn't have to > > poll any more, get rid of the bdrv_parent_drained_begin_single() call. > > > > This is possible now because we

Re: [PATCH v2 00/15] block: Simplify drain

2022-11-28 Thread Kevin Wolf
Am 18.11.2022 um 18:40 hat Kevin Wolf geschrieben: > I'm aware that exactly nobody has been looking forward to a series with > this title, but it has to be. The way drain works means that we need to > poll in bdrv_replace_child_noperm() and that makes things rather messy > with Emanuele's multiqueu

[PATCH 2/2] migration: Perform vmsd structure check during tests

2022-11-28 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Maydell Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migratio

[PATCH 0/2] Put Canary End of List in VMSTATE

2022-11-28 Thread Juan Quintela
Hi This are a patch series from David from January. The changes that I did: - rebases - change assert() in vmstate_check() to and if and printf. Please, Review. Dr. David Alan Gilbert (2): migration: Add canary to VMSTATE_END_OF_LIST migration: Perform vmsd structure check during tests inc

[PATCH 1/2] migration: Add canary to VMSTATE_END_OF_LIST

2022-11-28 Thread Juan Quintela
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be set

[PATCH for-8.0] monitor/misc: Remove superfluous include statements

2022-11-28 Thread Thomas Huth
These #includes are not required anymore (the likely got superfluous with commit da76ee76f7 - "hmp-commands-info: move info_cmds content out of monitor.c"). Signed-off-by: Thomas Huth --- monitor/misc.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/monitor/misc.c b/monitor/misc.c inde

Re: [PATCH 2/2] migration: Perform vmsd structure check during tests

2022-11-28 Thread Peter Maydell
On Mon, 28 Nov 2022 at 13:09, Juan Quintela wrote: > > From: "Dr. David Alan Gilbert" > > Perform a check on vmsd structures during test runs in the hope > of catching any missing terminators and other simple screwups. > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: Peter Maydell > Rev

Re: [PATCH 05/12] pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI

2022-11-28 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when >> CONFIG_PCI. hw/pci/pci-stub.c keeps the linker happy when >> !CONFIG_PCI. Build pci-hmp-cmds.c that way, too. >> >> Signed-off-by: Markus Armbr

[PATCH-for-7.2 1/5] hw/display/qxl: Have qxl_log_command Return early if no log_cmd handler

2022-11-28 Thread Philippe Mathieu-Daudé
Only 3 command types are logged: no need to call qxl_phys2virt() for the other types. Using different cases will help to pass different structure sizes to qxl_phys2virt() in a pair of commits. Reviewed-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé --- hw/display/qxl-logger.c | 11

[RFC PATCH-for-7.2 3/5] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
Currently qxl_phys2virt() doesn't check for buffer overrun. In order to do so in the next commit, pass the buffer size as argument. Signed-off-by: Philippe Mathieu-Daudé --- RFC: Please double-check qxl_render_update_area_unlocked() --- hw/display/qxl-logger.c | 11 --- hw/display/qxl-re

[PATCH-for-7.2 2/5] hw/display/qxl: Document qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
Reviewed-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé --- hw/display/qxl.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/display/qxl.h b/hw/display/qxl.h index e74de9579d..78b3a6c9ba 100644 --- a/hw/display/qxl.h +++ b/hw/display/qxl.h @@ -147,6 +147,

[RFC PATCH-for-7.2 0/5] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
Since v1: - Addressed Marc-André review comments - Moved overrun check in qxl_get_check_slot_offset() memory_region_get_ram_ptr() returns a host pointer for a MemoryRegion. Sometimes we do offset calculation using this pointer without checking the underlying MemoryRegion size. Wenxu Yin reported

[PATCH-for-8.0 5/5] hw/display/qxl: Assert memory slot fits in preallocated MemoryRegion

2022-11-28 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/display/qxl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index afa157d327..8468513f41 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1384,6 +1384,7 @@ static int qxl_add_memslot(PCIQXLDevice *d, ui

[RFC PATCH-for-7.2 4/5] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt (CVE-2022-4144)

2022-11-28 Thread Philippe Mathieu-Daudé
Have qxl_get_check_slot_offset() return false if the requested buffer size does not fit within the slot memory region. Similarly qxl_phys2virt() now returns NULL in such case, and qxl_dirty_one_surface() aborts. This avoids buffer overrun in the host pointer returned by memory_region_get_ram_ptr(

Re: [RFC PATCH-for-7.2 v2 0/5] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 14:48, Philippe Mathieu-Daudé wrote: Since v1: - Addressed Marc-André review comments - Moved overrun check in qxl_get_check_slot_offset() memory_region_get_ram_ptr() returns a host pointer for a MemoryRegion. Sometimes we do offset calculation using this pointer without checking the

Re: [RFC PATCH-for-7.2 3/5] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Marc-André Lureau
Hi On Mon, Nov 28, 2022 at 5:48 PM Philippe Mathieu-Daudé wrote: > Currently qxl_phys2virt() doesn't check for buffer overrun. > In order to do so in the next commit, pass the buffer size > as argument. > > Signed-off-by: Philippe Mathieu-Daudé > --- > RFC: Please double-check qxl_render_update

Re: [PATCH v3 for-7.2 0/6] Add format attributes and fix format strings

2022-11-28 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

  1   2   3   >