[PATCH v2 1/3] hw/watchdog: wdt_ibex_aon.c: Implement the watchdog for the OpenTitan

2022-09-22 Thread Tyler Ng
This commit adds most of an implementation of the OpenTitan Always-On Timer. The documentation for this timer is found here: https://docs.opentitan.org/hw/ip/aon_timer/doc/ Using commit 217a0168ba118503c166a9587819e3811eeb0c0c The implementation includes most of the watchdog features; it does no

[PATCH v1 9/9] gdbstub: move guest debug support check to ops

2022-09-22 Thread Alex Bennée
This removes the final hard coding of kvm_enabled() in gdbstub and moves the check to an AccelOps. Signed-off-by: Alex Bennée Cc: Mads Ynddal --- accel/kvm/kvm-cpus.h | 1 + gdbstub/internals.h| 1 + include/sysemu/accel-ops.h | 1 + include/sysemu/kvm.h | 7 --- accel/k

[PULL 07/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav5

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-7-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 24 1 file changed, 12 insertions(+), 12

[PULL 02/39] target/arm: Fix alignment for VLD4.32

2022-09-22 Thread Peter Maydell
From: Clément Chigot When requested, the alignment for VLD4.32 is 8 and not 16. See ARM documentation about VLD4 encoding: ebytes = 1 << UInt(size); if size == '10' then alignment = if a == '0' then 1 else 8; else alignment = if a == '0' then 1 else 4*ebytes; Signed-

Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Markus Armbruster
Kevin Wolf writes: > Am 21.09.2022 um 14:08 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 21.09.2022 um 06:45 hat Markus Armbruster geschrieben: >> >> Can we detect presence of compressed blocks on open? >> > >> > We seem to read in the full metadata of the image in dmg_op

Re: [PATCH for 7.2] minor fixups in block code

2022-09-22 Thread Kevin Wolf
Am 17.08.2022 um 10:37 hat Denis V. Lunev geschrieben: > These 2 patches are just minor improvements to make code a bit better. Thanks, applied to the block branch. Kevin

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 16:36, Markus Armbruster wrote: > Claudio Fontana writes: > >> On 9/22/22 15:20, Markus Armbruster wrote: >>> Claudio Fontana writes: >>> >>> [...] >>> I think it would be better to completely make the return value separate from the Error, and really treat Error as an

Re: [PATCH v8 1/2] target/s390x: support SHA-512 extensions

2022-09-22 Thread David Hildenbrand
On 22.09.22 16:51, David Hildenbrand wrote: On 22.09.22 16:35, Jason A. Donenfeld wrote: On Thu, Sep 22, 2022 at 03:07:13PM +0200, David Hildenbrand wrote: +if (processed >= MAX_BLOCKS_PER_RUN * 128) { +break; If you make this a `goto out` or similar instead of a break, th

[PULL 14/39] target/arm: Add is_secure parameter to get_phys_addr_v5

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from get_phys_addr_v5, passing the new parameter to the lookup instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson [PMM: Folded in definition of local is_secure in get_phys_addr(), since I dropped the earlier patch that

Re: [PATCH] gluster: stop using .bdrv_needs_filename

2022-09-22 Thread Kevin Wolf
Am 11.08.2022 um 18:49 hat Stefan Hajnoczi geschrieben: > The gluster protocol driver used to parse URIs (filenames) but was > extended with a richer JSON syntax in commit 6c7189bb29de > ("block/gluster: add support for multiple gluster servers"). The gluster > drivers that have JSON parsing set .b

Re: [PATCH 02/26] block: add missing coroutine_fn annotations

2022-09-22 Thread Alberto Campinho Faria
On Thu, Sep 22, 2022 at 9:49 AM Paolo Bonzini wrote: > Callers of coroutine_fn must be coroutine_fn themselves, or the call > must be within "if (qemu_in_coroutine())". Apply coroutine_fn to > functions where this holds. > > Signed-off-by: Paolo Bonzini > --- > block.c | 6 +++---

[PULL 17/39] target/arm: Add is_secure parameter to pmsav7_use_background_region

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from pmsav7_use_background_region, using the new parameter instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-17-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by:

Re: [PATCH v2 1/3] hw/watchdog: wdt_ibex_aon.c: Implement the watchdog for the OpenTitan

2022-09-22 Thread Thomas Huth
On 22/09/2022 17.58, Tyler Ng wrote: This commit adds most of an implementation of the OpenTitan Always-On Timer. The documentation for this timer is found here: https://docs.opentitan.org/hw/ip/aon_timer/doc/ Using commit 217a0168ba118503c166a9587819e3811eeb0c0c The implementation includes mo

[PULL 19/39] target/arm: Add is_secure parameter to get_phys_addr_pmsav5

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from get_phys_addr_pmsav5. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-21-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 4

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Markus Armbruster
Kevin Wolf writes: > Am 22.09.2022 um 14:42 hat Markus Armbruster geschrieben: [...] >> If you have callers that need to distinguish between not found, found >> but bad, found and good, then return three distinct values. >> >> I proposed to return -1 for found but bad (error), 0 for not found

[PULL 38/39] configure: Check mkdir result directly, not via $?

2022-09-22 Thread Peter Maydell
Shellcheck warns that we have one place where we run a command and then check if it failed using $?; this is better written to simply check the command in the 'if' statement directly. Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-id: 202

Re: [QEMU][PATCH 2/5] hw/net/can: Introduce Xilinx Versal CANFD controller

2022-09-22 Thread Pavel Pisa
Hello Peter, thanks for the review and Vikram for his work, I do not know much about Xilinx emulation nor Xilixn CAN controllers so I cannot comment much on this part. On Thursday 22 of September 2022 16:46:48 Peter Maydell wrote: > On Sat, 10 Sept 2022 at 07:13, Vikram Garhwal > > To > create

[PULL 34/39] configure: Remove unused meson_args variable

2022-09-22 Thread Peter Maydell
The meson_args variable was added in commit 3b4da13293482134b, but was not used in that commit and isn't used today. Delete the unnecessary assignment. Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-id: 20220825150703.4074125-3-peter.may

Re: [PATCH] block/qcow2-bitmap: Add missing cast to silent GCC error

2022-09-22 Thread Kevin Wolf
Am 19.09.2022 um 20:27 hat Philippe Mathieu-Daudé geschrieben: > Commit d1258dd0c8 ("qcow2: autoloading dirty bitmaps") added the > set_readonly_helper() GFunc handler, correctly casting the gpointer > user_data in both the g_slist_foreach() caller and the handler. > Few commits later (commit 1b6b0

Re: [PATCH 2/5] migration: Fix race on qemu_file_shutdown()

2022-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > In qemu_file_shutdown(), there's a possible race if with current order of > operation. There're two major things to do: > > (1) Do real shutdown() (e.g. shutdown() syscall on socket) > (2) Update qemufile's last_error > > We must do (2) before (1) othe

[PULL 37/39] configure: Remove use of backtick `...` syntax

2022-09-22 Thread Peter Maydell
There's only one place in configure where we use `...` to execute a command and capture the result. Switch to $() to match the rest of the script. This silences a shellcheck warning. Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-id: 202

Re: [PATCH v3 0/4] Patch series to set up a ppc64le CI

2022-09-22 Thread Alex Bennée
"Lucas Mateus Castro(alqotel)" writes: > This patch series aim to make easier to set up a compilation and CI > environment on PPC64 and PPC64LE machines. Queued to testing/next, thanks. Do we have a donated ppc64 machine to add to the custom runners? > v3: > Changed patch 1 to respect alphab

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Claudio Fontana
On 9/22/22 17:27, Markus Armbruster wrote: > Kevin Wolf writes: > >> Am 22.09.2022 um 14:42 hat Markus Armbruster geschrieben: > > [...] > >>> If you have callers that need to distinguish between not found, found >>> but bad, found and good, then return three distinct values. >>> >>> I proposed

[PULL 08/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav7

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-8-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 36 +--- 1 file changed, 17 inser

[PULL 33/39] configure: Remove unused python_version variable

2022-09-22 Thread Peter Maydell
Shellcheck correctly reports that we set python_version and never use it. This is a leftover from commit f9332757898a7: we used to use python_version purely to as part of the summary information printed at the end of a configure run, and that commit changed to printing the information from meson (

[PULL 01/39] hw/net/can: fix Xilinx ZynqMP CAN RX FIFO logic

2022-09-22 Thread Peter Maydell
From: Anton Kochkov For consistency, function "update_rx_fifo()" should use the RX FIFO register field names, not the TX FIFO ones, even if they refer to the same bit positions in the register. Signed-off-by: Anton Kochkov Reviewed-by: Francisco Iglesias Message-id: 20220817141754.2105981-1-an

Re: [PATCH v5 0/2] block: add missed block_acct_setup with new block device init procedure

2022-09-22 Thread Kevin Wolf
Am 24.08.2022 um 11:50 hat Denis V. Lunev geschrieben: > Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from > the first glance, but it has changed things a lot. 'libvirt' uses it to > detect that it should follow new initialization way and this changes > things considerably. W

Re: [PATCH 3/5] migration: Disallow xbzrle with postcopy

2022-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > It's not supported since the 1st day, as ram_load_postcopy does not handle > RAM_SAVE_FLAG_XBZRLE. Mark it disabled explicitly. We've already got a check in ram_save_page: if (rs->xbzrle_enabled && !migration_in_postcopy()) { pages = save_xbzrl

Re: [PATCH v3 0/4] Patch series to set up a ppc64le CI

2022-09-22 Thread Lucas Mateus Martins Araujo e Castro
On 22/09/2022 13:32, Alex Bennée wrote: "Lucas Mateus Castro(alqotel)" writes: This patch series aim to make easier to set up a compilation and CI environment on PPC64 and PPC64LE machines. Queued to testing/next, thanks. Do we have a donated ppc64 machine to add to the custom runners? I

[PULL 13/39] target/arm: Add secure parameter to pmsav8_mpu_lookup

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from pmsav8_mpu_lookup, passing the new parameter to the lookup instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-13-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-of

[PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-22 Thread Tyler Ng
1. Adds fields to hold the value of mtime in timer_upper0 and timer_lower0. 2. Changes the read and write functions to use the mtime fields. 3. Updates the value of mtime in update_mtime() by extrapolating the time elapsed. This will need to change if/when the prescalar is implemented. 4. Adds a

[PULL 12/39] target/arm: Add is_secure parameter to v8m_security_lookup

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from v8m_security_lookup, passing the new parameter to the lookup instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-12-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-

[PATCH v2 0/3] Implement the Opentitan watchdog

2022-09-22 Thread Tyler Ng
This patch series implements the OpenTitan Always-On Timer device, and includes several fixes/feature additions to existing devices. The memory map used for reference can be found here: https://github.com/lowRISC/opentitan/blob/217a0168ba118503c166a9587819e3811eeb0c0c/hw/top_earlgrey/sw/autogen/to

[PULL 15/39] target/arm: Add is_secure parameter to get_phys_addr_v6

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from get_phys_addr_v6, passing the new parameter to the lookup instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-15-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off

Re: [PULL 00/30] testing updates (docker, avocado, deprecate 32bit BE MIPS)

2022-09-22 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

[PULL 16/39] target/arm: Add secure parameter to get_phys_addr_pmsav8

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from get_phys_addr_pmsav8. Since we already had a local variable named secure, use that. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-16-richard.hender...@linaro.org Reviewed-by: Peter Ma

Re: [PATCH] migration/ram: Fix memory leak when using x-ignore-shared

2022-09-22 Thread Dr. David Alan Gilbert
* Nikolay Borisov (nbori...@suse.com) wrote: > During ram initialization for migration dirty/clear bitmaps are > allocated for all migratable blocks, irrespective of their shared > status. However, during ram migration cleanup those bitmaps are freed > only for those blocks which aren't shared, in

[PULL 28/39] hw/intc/xics: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-8-peter.mayd...@linaro.org --- hw/intc

Re: [PATCH 4/5] migration: Disallow postcopy preempt to be used with compress

2022-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The preempt mode requires the capability to assign channel for each of the > page, while the compression logic will currently assign pages to different > compress thread/local-channel so potentially they're incompatible. > > Signed-off-by: Peter Xu Reviewe

[PULL 06/39] target/arm: Use GetPhysAddrResult in get_phys_addr_v5

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-6-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 25 +++-- 1 file changed, 11 insertions(+), 1

[PULL 10/39] target/arm: Use GetPhysAddrResult in pmsav8_mpu_lookup

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-10-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/internals.h | 11 +-- target/arm/m_helper.c | 16 +++---

[PULL 00/39] target-arm queue

2022-09-22 Thread Peter Maydell
since commit 6338c30111d596d955e6bc933a82184a0b910c43: Merge tag 'm68k-for-7.2-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-09-21 13:12:36 -0400) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-ar

[PULL 21/39] hw/net/lan9118: Signal TSFL_INT flag when TX FIFO reaches specified level

2022-09-22 Thread Peter Maydell
From: Lucas Dietrich The LAN9118 allows the guest to specify a level for both the TX and RX FIFOs at which an interrupt will be generated. We implement the RSFL_INT interrupt for the RX FIFO but are missing the handling of the equivalent TSFL_INT for the TX FIFO. Add the missing test to set the

[PULL 03/39] target/arm: Create GetPhysAddrResult

2022-09-22 Thread Peter Maydell
From: Richard Henderson Combine 5 output pointer arguments from get_phys_addr into a single struct. Adjust all callers. Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-2-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/i

[PULL 35/39] configure: Add missing quoting for some easy cases

2022-09-22 Thread Peter Maydell
This commit adds quotes in some places which: * are spotted by shellcheck * are obviously incorrect * are easy to fix just by adding the quotes It doesn't attempt fix all of the places shellcheck finds errors, or even all the ones which are easy to fix. It's just a random sampling which is hope

[PULL 11/39] target/arm: Remove is_subpage argument to pmsav8_mpu_lookup

2022-09-22 Thread Peter Maydell
From: Richard Henderson This can be made redundant with result->page_size, by moving the basic set of page_size from get_phys_addr_pmsav8. We still need to overwrite page_size when v8m_security_lookup signals a subpage. Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-11-ric

Re: [PATCH 0/3] block: Keep auto_backing_file post-migration

2022-09-22 Thread Kevin Wolf
Am 03.08.2022 um 16:44 hat Hanna Reitz geschrieben: > Hi, > > https://gitlab.com/qemu-project/qemu/-/issues/1117 reports the following > issue: > > Say you have a VM with a backing chain of images where the image > metadata contains json:{} backing file strings, which however will be > resolved t

Re: [PATCH 1/5] migration: Fix possible deadloop of ram save process

2022-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Sep 22, 2022 at 03:49:38PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > When starting ram saving procedure (especially at the completion phase), > > > always set last_seen_block to non-NULL to make sure we can a

[PULL 23/39] chardev/baum: Use definitions to avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé We know 'x * y' will be at most 'X_MAX * Y_MAX' (which is not a big value, it is actually 84). Instead of having the compiler use variable-length array, declare an array able to hold the maximum 'x * y'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André

[PULL 05/39] target/arm: Use GetPhysAddrResult in get_phys_addr_v6

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-5-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 30 ++ 1 file changed, 14 insertions(

[PULL 22/39] chardev/baum: Replace magic values by X_MAX / Y_MAX definitions

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Replace '84' magic value by the X_MAX definition, and '1' by Y_MAX. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Samuel Thibault Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-2-peter.mayd...@linaro.org --- c

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 09:32:54AM +0800, Jason Wang wrote: > > +if (!kvm_enable_x2apic()) { > > +error_setg(errp, "eim=on requires support on the KVM side" > > + "(X2APIC_API, first shipped in v4.7)"); > > +return false; > > +} >

[PULL 04/39] target/arm: Use GetPhysAddrResult in get_phys_addr_lpae

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-4-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 69 ++-- 1 file chang

[PULL 29/39] hw/i386/multiboot: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Replace the snprintf() call by g_strdup_printf(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-9-pet

[PULL 09/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-9-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 28 ++-- 1 file changed, 14 insertions(+)

[PULL 31/39] ui/curses: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-11-peter.mayd...@linaro.org --- ui/curses.c | 2 +- 1

Re: [PATCH 2/5] migration: Fix race on qemu_file_shutdown()

2022-09-22 Thread Daniel P . Berrangé
On Tue, Sep 20, 2022 at 06:37:57PM -0400, Peter Xu wrote: > In qemu_file_shutdown(), there's a possible race if with current order of > operation. There're two major things to do: > > (1) Do real shutdown() (e.g. shutdown() syscall on socket) > (2) Update qemufile's last_error > > We must do

[PULL 18/39] target/arm: Add secure parameter to get_phys_addr_pmsav7

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from get_phys_addr_pmsav7, using the new parameter instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-19-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter M

[PULL 27/39] hw/ppc/pnv: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell Reviewed-by: Daniel Henrique Barboza Message-id: 20220819153931.31473

[PULL 20/39] hw/acpi: Add ospm_status hook implementation for acpi-ged

2022-09-22 Thread Peter Maydell
From: Keqian Zhu Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status" causes segmentation fault with following dumpstack: #1 0xab64235c in qmp_query_acpi_ospm_status (errp=errp@entry=0xf030) at ../monitor/qmp-cmds.c:312 #2 0xabfc4e20

[PULL 39/39] configure: Avoid use of 'local' as it is non-POSIX

2022-09-22 Thread Peter Maydell
We use the non-POSIX 'local' keyword in just two places in configure; rewrite to avoid it. In do_compiler(), just drop the 'local' keyword. The variable 'compiler' is only used elsewhere in the do_compiler_werror() function, which already uses the variable as a normal non-local one. In probe_tar

[PULL 30/39] hw/usb/hcd-ohci: Use definition to avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé The compiler isn't clever enough to figure 'width' is a constant, so help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-10-peter.mayd...@linar

[PULL 25/39] io/channel-websock: Replace strlen(const_str) by sizeof(const_str) - 1

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé The combined_key[... QIO_CHANNEL_WEBSOCK_GUID_LEN ...] array in qio_channel_websock_handshake_send_res_ok() expands to a call to strlen(QIO_CHANNEL_WEBSOCK_GUID), and the compiler doesn't realize the string is const, so consider combined_key[] being a variable-length

Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions

2022-09-22 Thread Jason A. Donenfeld
On Thu, Sep 22, 2022 at 5:55 PM Thomas Huth wrote: > > On 22/09/2022 17.38, David Hildenbrand wrote: > > From: "Jason A. Donenfeld" > > > > In order to fully support MSA_EXT_5, we have to support the SHA-512 > > special instructions. So implement those. > > > > The implementation began as somethi

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Jim Mattson
On Thu, Sep 22, 2022 at 7:16 AM Gerd Hoffmann wrote: > > On Thu, Sep 22, 2022 at 02:38:02PM +0200, Paolo Bonzini wrote: > > On Thu, Sep 22, 2022 at 2:21 PM Gerd Hoffmann wrote: > > > No. This will basically inform the guest that host-phys-bits has been > > > enabled (and pass the number of bits)

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 03:46:17PM +0200, Igor Mammedov wrote: > On Wed, 21 Sep 2022 12:12:27 -0400 > Peter Xu wrote: > > > It's true that when vcpus<=255 we don't require the length of 32bit APIC > > IDs. However here since we already have EIM=ON it means the hypervisor > > will declare the VM

[PULL 32/39] tests/unit/test-vmstate: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-12-peter.mayd...@linaro.org --- tests/unit/test-vmstat

Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions

2022-09-22 Thread David Hildenbrand
On 22.09.22 17:55, Thomas Huth wrote: On 22/09/2022 17.38, David Hildenbrand wrote: From: "Jason A. Donenfeld" In order to fully support MSA_EXT_5, we have to support the SHA-512 special instructions. So implement those. The implementation began as something TweetNacl-like, and then was adjus

[PULL 24/39] chardev/baum: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Samuel Thibault Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-4-peter.mayd...@linaro.or

[PULL 26/39] hw/net/e1000e_core: Use definition to avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé The compiler isn't clever enough to figure 'min_buf_size' is a constant, so help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20220819153931.3

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Kevin Wolf
Am 22.09.2022 um 17:27 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 22.09.2022 um 14:42 hat Markus Armbruster geschrieben: > > [...] > > >> If you have callers that need to distinguish between not found, found > >> but bad, found and good, then return three distinct values.

[PULL 0/1] Block patches

2022-09-22 Thread Stefan Hajnoczi
The following changes since commit 6338c30111d596d955e6bc933a82184a0b910c43: Merge tag 'm68k-for-7.2-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-09-21 13:12:36 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-req

[PULL 36/39] configure: Add './' on front of glob of */config-devices.mak.d

2022-09-22 Thread Peter Maydell
Shellcheck warns that in rm -f */config-devices.mak.d the glob might expand to something with a '-' in it, which would then be misinterpreted as an option to rm. Fix this by adding './'. Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-id:

Inscrutable CI jobs (avocado & Travis s390 check-tcg)

2022-09-22 Thread Stefan Hajnoczi
QEMU's avocado and Travis s390x check-tcg CI jobs fail often and I don't know why. I think it's due to timeouts but maybe there is something buried in the logs that I missed. I waste time skimming through logs when merging qemu.git pull requests and electricity is wasted on tests that don't produc

[PULL 1/1] virtiofsd: use g_date_time_get_microsecond to get subsecond

2022-09-22 Thread Stefan Hajnoczi
From: Yusuke Okada The "%f" specifier in g_date_time_format() is only available in glib 2.65.2 or later. If combined with older glib, the function returns null and the timestamp displayed as "(null)". For backward compatibility, g_date_time_get_microsecond should be used to retrieve subsecond.

Re: [PULL 0/2] Hexagon target update

2022-09-22 Thread Stefan Hajnoczi
Applied, thanks. This pull request did not show up in the patches tool (https://github.com/stefanha/patches) that I use. If I miss a pull request from you in the future, please feel free to ping me after 48 hours. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-vi

Re: [PULL v1 0/1] Xilinx queue

2022-09-22 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

Re: [PATCH 3/5] migration: Disallow xbzrle with postcopy

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 04:56:21PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > It's not supported since the 1st day, as ram_load_postcopy does not handle > > RAM_SAVE_FLAG_XBZRLE. Mark it disabled explicitly. > > We've already got a check in ram_save_page: >

Re: [PATCH v2 01/39] tests: Change to use g_mkdir()

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 1:48 PM Bin Meng wrote: > From: Bin Meng > > Commit 413bebc04603 ("tests: Use g_mkdir_with_parents()") replaces > the mkdir() call in the test codes with glib's g_mkdir_with_parents(), > but the exact portable replacement for mkdir() should be g_mkdir(). > > I probabl

Re: [PATCH 2/5] migration: Fix race on qemu_file_shutdown()

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 05:58:25PM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 20, 2022 at 06:37:57PM -0400, Peter Xu wrote: > > In qemu_file_shutdown(), there's a possible race if with current order of > > operation. There're two major things to do: > > > > (1) Do real shutdown() (e.g. shut

Re: [PATCH v2 02/39] tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 12:56 PM Bin Meng wrote: > From: Bin Meng > > Previously request_{bios, pflash} cases were skipped on win32, mainly > due to create_blob_file() calling mmap() which does not exist on win32. > This rewirtes create_blob_file() to be portable, so that we can enable > the

Re: [PATCH v2 03/39] block: Unify the get_tmp_filename() implementation

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:17 PM Bin Meng wrote: > From: Bin Meng > > At present get_tmp_filename() has platform specific implementations > to get the directory to use for temporary files. Switch over to use > g_get_tmp_dir() which works on all supported platforms. > > As discussed in v1, the

Re: [PATCH v2 08/39] block/vvfat: Unify the mkdir() call

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 2:58 PM Bin Meng wrote: > From: Bin Meng > > There is a difference in the mkdir() call for win32 and non-win32 > platforms, and currently is handled in the codes with #ifdefs. > > glib provides a portable g_mkdir() API and we can use it to unify > the codes without #ifdef

Re: [PATCH v2 07/39] tests: Avoid using hardcoded /tmp in test cases

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:47 PM Bin Meng wrote: > From: Bin Meng > > Lots of test cases were written to use hardcoded /tmp directory for > temporary files. To avoid this, we update them to use g_dir_make_tmp() > or g_file_open_tmp() when appropriate. > > Signed-off-by: Bin Meng > --- > > Ch

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-22 Thread Sean Christopherson
On Thu, Sep 22, 2022, Wang, Wei W wrote: > On Thursday, September 15, 2022 10:29 PM, Chao Peng wrote: > > +int inaccessible_get_pfn(struct file *file, pgoff_t offset, pfn_t *pfn, > > +int *order) > > Better to remove "order" from this interface? Hard 'no'. > Some callers only

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Paolo Bonzini
On Thu, Sep 22, 2022 at 7:13 PM Jim Mattson wrote: > > Treating 40 as invalid and continue to use the current conservative > > heuristic, otherwise treat phys-bits as valid might work. Obvious > > corner case is that it'll not catch broken manual configurations > > (host-phys-bits=off,phys-bits=)

Re: [PATCH v2 16/39] tests/qtest: Use send/recv for socket communication

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 2:23 PM Bin Meng wrote: > From: Xuzhou Cheng > > Socket communication in the libqtest and libqmp codes uses read() > and write() which work on any file descriptor on *nix, and sockets > in *nix are an example of a file descriptor. > > However sockets on Windows do not use

Re: [PATCH v2 18/39] tests/qtest: libqtest: Install signal handler via signal()

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:32 PM Bin Meng wrote: > From: Bin Meng > > At present the codes uses sigaction() to install signal handler with > a flag SA_RESETHAND. Such usage can be covered by the signal() API > that is a simplified interface to the general sigaction() facility. > > Update to u

Re: [PATCH v2 19/39] tests/qtest: Support libqtest to build and run on Windows

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 1:36 PM Bin Meng wrote: > From: Bin Meng > > At present the libqtest codes were written to depend on several > POSIX APIs, including fork(), kill() and waitpid(). Unfortunately > these APIs are not available on Windows. > > This commit implements the corresponding fun

Re: [PATCH v2 20/39] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 1:50 PM Bin Meng wrote: > From: Bin Meng > > These test cases uses "blkdebug:path/to/config:path/to/image" for > testing. On Windows, absolute file paths contain the delimiter ':' > which causes the blkdebug filename parser fail to parse filenames. > > Signed-off-by:

Re: [PATCH v2 24/39] tests/qtest: virtio-net-failover: Disable migration tests for win32

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 3:28 PM Bin Meng wrote: > From: Xuzhou Cheng > > These tests use the exec migration protocol, which is unsupported > on Windows as of today. Disable these tests for now. > > Signed-off-by: Xuzhou Cheng > Signed-off-by: Bin Meng > Reviewed-by: Marc-André Lureau > ---

Re: [PATCH v2 22/39] tests/qtest: migration-test: Disable IO redirection for win32

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 3:04 PM Bin Meng wrote: > From: Bin Meng > > On Windows the QEMU executable is created via CreateProcess() and > IO redirection does not work, so don't bother adding IO redirection > to the command line. > > Signed-off-by: Bin Meng > --- > > Changes in v2: > - Change the

Re: [PATCH v2 25/39] chardev/char-file: Add FILE_SHARE_WRITE when openning the file for win32

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:33 PM Bin Meng wrote: > From: Xuzhou Cheng > > The combination of GENERIC_WRITE and FILE_SHARE_READ options does > not allow the same file to be opened again by CreateFile() from > another QEMU process with the same options when the previous QEMU > process still hol

Re: [PATCH v2 33/39] io/channel-watch: Drop the unnecessary cast

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 2:56 PM Bin Meng wrote: > From: Bin Meng > > There is no need to do a type cast on ssource->socket as it is > already declared as a SOCKET. > > Suggested-by: Marc-André Lureau > Signed-off-by: Bin Meng > Reviewed-by: Marc-André Lureau --- > > Changes in v2: > - new p

Re: [PATCH v2 35/39] tests/qtest: migration-test: Skip running some TLS cases for win32

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 3:11 PM Bin Meng wrote: > From: Bin Meng > > Some migration test cases use TLS to communicate, but they fail on > Windows with the following error messages: > > qemu-system-x86_64: TLS handshake failed: Insufficient credentials for > that request. > qemu-system-x8

Re: [PATCH v2 38/39] tests/qtest: Enable qtest build on Windows

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 3:37 PM Bin Meng wrote: > From: Bin Meng > > Now that we have fixed various test case issues as seen when running > on Windows, let's enable the qtest build on Windows. > > Signed-off-by: Bin Meng > --- > > Changes in v2: > - new patch: "tests/qtest: Enable qtest bui

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Gerd Hoffmann
On Thu, Sep 22, 2022 at 02:38:02PM +0200, Paolo Bonzini wrote: > On Thu, Sep 22, 2022 at 2:21 PM Gerd Hoffmann wrote: > > No. This will basically inform the guest that host-phys-bits has been > > enabled (and pass the number of bits). So the firmware can make use of > > the available address spa

[PATCH] KVM: dirty ring: Add memory barrier when marking pfn collected

2022-09-22 Thread Peter Xu
Following commit 4802bf910eee9, add the other missing barrier when marking the PFN as collected. This will also be required just like 4802bf910eee9 on weak ordering architectures like aarch64. Cc: Marc Zyngier Cc: Gavin Shan Cc: Paolo Bonzini Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c |

Re: [PATCH v2 2/3] hw/intc: sifive_plic.c: Fix interrupt priority index.

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 17:58, Tyler Ng wrote: Fixes a bug in which the index of the interrupt priority is off by 1. For example, using an IRQ number of 3 with a priority of 1 is supposed to set plic->source_priority[2] = 1, but instead it sets plic->source_priority[3] = 1. When an interrupt is claimed to be

Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 17:58, Tyler Ng wrote: 1. Adds fields to hold the value of mtime in timer_upper0 and timer_lower0. 2. Changes the read and write functions to use the mtime fields. 3. Updates the value of mtime in update_mtime() by extrapolating the time elapsed. This will need to change if/when the

  1   2   3   4   >