[PULL 07/25] hw/i2c/smbus_slave: Add object path on error prints

2024-02-21 Thread Philippe Mathieu-Daudé
From: Joe Komlodi The current logging doesn't tell us which specific smbus device is an error state. Signed-off-by: Joe Komlodi Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240202204847.2062798-3-koml...@google.com> Signed-off-by: Philippe Mathieu-Daudé ---

[PULL 04/25] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h

2024-02-21 Thread Philippe Mathieu-Daudé
Reviewed-by: BALATON Zoltan Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240215105017.57748-3-phi...@linaro.org> --- MAINTAINERS | 1 + include/hw/pci-host/ppc4xx.h | 17 + include/hw/ppc/ppc4xx.h | 5 - hw/ppc/ppc440_

[PULL 00/25] Misc HW patches for 2024-02-21

2024-02-21 Thread Philippe Mathieu-Daudé
The following changes since commit 760b4dcdddba4a40b9fa0eb78fdfc7eda7cb83d0: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-02-20 10:11:08 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-20240221

[PATCH 03/28] qemu-img: create: convert img_size to signed, simplify handling

2024-02-21 Thread Michael Tokarev
Initializing an unsigned as -1, or using temporary sval for conversion is awkward. Since we don't allow other "negative" values anyway, use signed value and pass it to bdrv_img_create() (where it is properly converted to unsigned), simplifying code. Signed-off-by: Michael Tokarev --- qemu-img.c

[PATCH 20/28] qemu-img: resize: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 37 - 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index c8b0b68d67..45fbef5d37 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4

[PATCH 07/28] qemu-img: factor out parse_output_format() and use it in the code

2024-02-21 Thread Michael Tokarev
Use common code and simplify error message Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 63 -- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7e4c993b9c..01894c0

[PULL 11/25] hw/i386/x86: Turn apic_xrupt_override into class attribute

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The attribute isn't user-changeable and only true for pc-based machines. Turn it into a class attribute which allows for inlining pc_guest_info_init() into pc_machine_initfn(). Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <2024020822034

[PATCH 12/28] qemu-img: convert: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. convert uses -B for --backing, - why not -b? Signed-off-by: Michael Tokarev --- qemu-img.c | 90 -- 1 file changed, 81 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index fd61b2

[PULL 03/25] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header

2024-02-21 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Reviewed-by: Thomas Huth Message-Id: <20240215105017.57748-2-phi...@linaro.org> --- hw/ppc/ppc440_pcix.c | 1 - hw/ppc/ppc4xx_pci.c | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c

[PATCH 02/28] qemu-img: measure: convert img_size to signed, simplify handling

2024-02-21 Thread Michael Tokarev
qemu_opt_set_number() expects signed int64_t. Use int64_t instead of uint64_t for img_size, use -1 as "unset" value instead of UINT64_MAX, and do not require temporary sval for conversion from string. Signed-off-by: Michael Tokarev --- qemu-img.c | 19 +++ 1 file changed, 7 inse

[PATCH 25/28] qemu-img: measure: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Also add -s short option for --size (and remove OPTION_SIZE). Signed-off-by: Michael Tokarev --- qemu-img.c | 53 - 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/qemu-img.c b/qemu-i

[PATCH 15/28] qemu-img: snapshot: allow specifying -f fmt

2024-02-21 Thread Michael Tokarev
For consistency with other commands, and since it already accepts --image-opts, allow specifying -f fmt too. Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- docs/tools/qemu-img.rst | 2 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 9 ++--- 3 files change

[PULL 14/25] hw/i386/pc: Confine system flash handling to pc_sysfw

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Rather than distributing PC system flash handling across three files, let's confine it to one. Now, pc_system_firmware_init() creates, configures and cleans up the system flash which makes the code easier to understand. It also avoids the extra call to pc_system_flash_clean

[PULL 02/25] hw/sysbus: Inline and remove sysbus_add_io()

2024-02-21 Thread Philippe Mathieu-Daudé
sysbus_add_io(...) is a simple wrapper to memory_region_add_subregion(get_system_io(), ...). It is used in 3 places; inline it directly. Rationale: we want to move to an explicit I/O bus, rather that an implicit one. Besides in heterogeneous setup we can have more than one I/O bus. Signed-off-by:

[PULL 19/25] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth qdev.c is a mixture between IDE bus specific functions and IDE device functions. Let's split it up to make it more obvious which part is related to bus handling and which part is related to device handling. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth Acked-

[PATCH 11/28] qemu-img: compare: refresh options/--help

2024-02-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qemu-img.c | 45 + 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 1271217272..fd61b25ea7 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1487,25 +1487,52 @@ static int img_com

[PULL 12/25] hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn()

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Resolves redundant code in the piix and q35 machines. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240208220349.4948-5-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 2 -- hw/i386/pc.c |

[PULL 13/25] hw/i386/pc: Defer smbios_set_defaults() to machine_done

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Handling most of smbios data generation in the machine_done notifier is similar to how the ARM virt machine handles it which also calls smbios_set_defaults() there. The result is that all pc machines are freed from explicitly worrying about smbios setup. Signed-off-by: Ber

[PATCH 24/28] qemu-img: dd: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index e4027ece20..af7841573c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@

[PATCH 13/28] qemu-img: info: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Also add -b short option for --backing-chain, and remove now-unused OPTION_BACKING_CHAIN. While at it, remove unused option_index variable. Signed-off-by: Michael Tokarev --- qemu-img.c | 40 +++- 1 file changed, 27

[PATCH v2 00/28] qemu-img: refersh options and --help handling, cleanups

2024-02-21 Thread Michael Tokarev
Quite big patchset trying to implement normal, readable qemu-img --help (and qemu-img COMMAND --help) output with readable descriptions, and adding many long options in the process. In the end I stopped using qemu-img-opts.hx in qemu-img.c, perhaps this can be avoided, with only list of commands a

[PULL 10/25] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-21 Thread Philippe Mathieu-Daudé
From: Peter Maydell In the i386 PC machine, we want to run the pc_cmos_init_late() function only once the IDE and floppy drive devices have been set up. We currently do this using qemu_register_reset(), and then have the function call qemu_unregister_reset() on itself, so it runs exactly once. T

[PATCH 23/28] qemu-img: bitmap: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 40 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 8455832d34..e4027ece20 100644 --- a/qemu-img.c +++ b/qemu-img.c @@

[PULL 23/25] hw/ide: Remove the include/hw/ide.h legacy file

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth There was only one prototype left in this legacy file. Move it to ide-dev.h to finally get rid of it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Message-ID: <20240220085505.30255-7-th...@redhat.com> Signed-off-by: Philippe Mathi

[PULL 15/25] hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow pc_system_flash_create() checked for pcmc->pci_enabled which is redundant since its caller already checked it. The method can be turned into just two lines, so inline and remove it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240208

[PATCH 08/28] qemu-img: check: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 01894c097b..69fa9701e9 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -

[PULL 05/25] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/

2024-02-21 Thread Philippe Mathieu-Daudé
ppc4xx_pci.c is moved from the target specific ppc_ss[] meson source set to pci_ss[] which is common to all targets: the object is built once. Declare PPC4XX_PCI selector in pci-host/Kconfig. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240215105017.57748-4-phi.

[PULL 24/25] hw/ide: Stop exposing internal.h to non-IDE files

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth include/hw/ide/internal.h is currently included by include/hw/ide/pci.h and thus exposed to a lot of files that are not part of the IDE subsystem. Stop including internal.h there and use the appropriate new headers ide-bus.h and ide-dma.h instead. Reviewed-by: Philippe Mathieu-

[PULL 09/25] hw/i386/pc: Store pointers to IDE buses in PCMachineState

2024-02-21 Thread Philippe Mathieu-Daudé
From: Peter Maydell Add the two IDE bus BusState pointers to the set we keep in PCMachineState. This allows us to avoid passing them to pc_cmos_init(), and also will allow a refactoring of how we call pc_cmos_init_late(). Signed-off-by: Peter Maydell Acked-by: Richard Henderson Reviewed-by: Mi

[PATCH 28/28] qemu-img: extend cvtnum() and use it in more places

2024-02-21 Thread Michael Tokarev
cvtnum() expects input string to specify some sort of size (optionally with KMG... suffix). However, there are a lot of other number conversions in there (using qemu_strtol &Co), also, not all conversions which use cvtnum, actually expects size, - like dd count=nn. Add bool issize argument to cvt

[PULL 16/25] hw/i386/pc_q35: Populate interrupt handlers before realizing LPC PCI function

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The interrupt handlers need to be populated before the device is realized since internal devices such as the RTC are wired during realize(). If the interrupt handlers aren't populated, devices such as the RTC will be wired with a NULL interrupt handler, i.e. MC146818RtcStat

[PULL 25/25] hw/sparc/leon3: Fix wrong usage of DO_UPCAST macro

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth leon3.c currently fails to compile with some compilers when the -Wvla option has been enabled: ../hw/sparc/leon3.c: In function ‘leon3_cpu_reset’: ../hw/sparc/leon3.c:153:5: error: ISO C90 forbids variable length array ‘offset_must_be_zero’ [-Werror=vla] 153 | ResetD

[PATCH 09/28] qemu-img: simplify --repair error message

2024-02-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 69fa9701e9..eba13724b0 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -858,8 +858,9 @@ static int img_check(const img_

[PATCH 10/28] qemu-img: commit: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 44 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index eba13724b0..1271217272 100644 --- a/qemu-img.c +++ b/qemu-img.

[PATCH 22/28] qemu-img: bench: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 64 +- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 0d17738fb6..8455832d34 100644 --- a/qemu-img.c +++

[PATCH 06/28] qemu-img: create: refresh options/--help

2024-02-21 Thread Michael Tokarev
Create helper function cmd_help() to display command-specific help text, and use it to print --help for 'create' subcommand. Add missing long options (eg --format) in img_create(). Remove usage of missing_argument()/unrecognized_option() in img_create(). Signed-off-by: Michael Tokarev --- qemu

[PATCH 05/28] qemu-img: pass current cmd info into command handlers

2024-02-21 Thread Michael Tokarev
This info will be used to generate --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 44dbf5be4f..38ac0f1845 100644 --- a/qemu-img.c +++ b/qemu-img.c @

[PULL 08/25] hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc machines

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Both invocations are the same and either one is always executed. Avoid this redundancy. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240208220349.4948-3-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c

[PULL 18/25] hw/ide: Add the possibility to disable the CompactFlash device in the build

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth For distros like downstream RHEL, it would be helpful to allow to disable the CompactFlash device. For making this possible, we need a separate Kconfig switch for this device, and the code should reside in a separate file. Let's also introduce a new header ide-dev.h which can be

[PULL 21/25] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth Untangle internal.h by moving public IDE device related definitions to ide-dev.h. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240220085505.30255-5-th...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- inclu

Re: [RFC PATCH v2 01/22] target/arm: Add FEAT_NMI to max

2024-02-21 Thread Richard Henderson
On 2/21/24 03:08, Jinjie Ruan via wrote: Enable FEAT_NMI on the 'max' CPU. Signed-off-by: Jinjie Ruan --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 1 + 2 files changed, 2 insertions(+) Reviewed-by: Richard Henderson However, this patch must be sorted last, af

[PULL 22/25] hw/ide: Move IDE bus related definitions to a new header ide-bus.h

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth Let's consolidate the public IDE bus related functions in a separate header. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240220085505.30255-6-th...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw

[PATCH 16/28] qemu-img: snapshot: make -l (list) the default, simplify option handling

2024-02-21 Thread Michael Tokarev
When no -l/-a/-c/-d specified, assume -l (list). Use the same values for SNAPSHOT_LIST/etc constants as the option chars (lacd), this makes it possible to simplify option handling a lot, combining cases for 4 options into one. Also remove bdrv_oflags handling (only list can use RO mode). Signed-

[PULL 20/25] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called ide-dma.h. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240220085505.30255-4-th...@redhat.c

Re: [PATCH V3 10/13] migration: stop vm for cpr

2024-02-21 Thread Steven Sistare
On 2/20/2024 2:33 AM, Peter Xu wrote: > On Thu, Feb 08, 2024 at 10:54:03AM -0800, Steve Sistare wrote: >> When migration for cpr is initiated, stop the vm and set state >> RUN_STATE_FINISH_MIGRATE before ram is saved. This eliminates the >> possibility of ram and device state being out of sync, an

[PULL 17/25] hw/isa/meson.build: Sort alphabetically

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Fixes: fbd758008f0f "hw/isa: extract FDC37M81X to a separate file" Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240218131701.91132-2-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa

[PATCH 21/28] qemu-img: amend: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 45fbef5d37..0d17738fb6 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4557

Re: [PATCH v2 0/3] hw/i386: Move SGX under KVM and use QDev API

2024-02-21 Thread Philippe Mathieu-Daudé
On 15/2/24 15:20, Philippe Mathieu-Daudé wrote: - Update MAINTAINERS - Move SGX files with KVM ones - Use QDev API Supersedes: <20240213071613.72566-1-phi...@linaro.org> Philippe Mathieu-Daudé (3): MAINTAINERS: Cover hw/i386/kvm/ in 'X86 KVM CPUs' section hw/i386: Move SGX files within th

Re: [PATCH v5 0/7] riscv: set vstart_eq_zero on mark_vs_dirty

2024-02-21 Thread Daniel Henrique Barboza
Richard, On 2/20/24 23:22, Daniel Henrique Barboza wrote: Hi, In this new version we removed the remaining brconds() from trans_rvbf16.c.inc like Richard suggested in patch 3. Richard, I kept your ack in that patch. This change caused the 'cpu_vstart' global to be unused. A new patch (4) was a

Re: [PATCH V3 10/13] migration: stop vm for cpr

2024-02-21 Thread Steven Sistare
On 2/20/2024 2:33 AM, Peter Xu wrote: > On Thu, Feb 08, 2024 at 10:54:03AM -0800, Steve Sistare wrote: >> When migration for cpr is initiated, stop the vm and set state >> RUN_STATE_FINISH_MIGRATE before ram is saved. This eliminates the >> possibility of ram and device state being out of sync, an

Re: [PATCH 5/5] tests: Add migration test for loongarch64

2024-02-21 Thread Fabiano Rosas
Bibo Mao writes: > This patch adds migration test support for loongarch64. The test code > comes from aarch64 mostly, only that it it booted as bios in qemu since > kernel requires elf format and bios uses binary format. > > In addition to providing the binary, this patch also includes the source

[PATCH 26/28] qemu-img: implement short --help, remove global help() function

2024-02-21 Thread Michael Tokarev
now once all individual subcommands has --help support, remove the large unreadable help() thing and replace it with small global --help, which refers to individual command --help for more info. While at it, also line-wrap list of formats after 75 chars. Since missing_argument() and unrecognized_

[PATCH 27/28] qemu-img: inline list of supported commands, remove qemu-img-cmds.h include

2024-02-21 Thread Michael Tokarev
also add short description to each command and use it in --help Signed-off-by: Michael Tokarev --- qemu-img.c | 41 ++--- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index ea284dca2d..299e34e470 100644 --- a/qemu-img.

[PATCH 04/28] qemu-img: global option processing and error printing

2024-02-21 Thread Michael Tokarev
In order to correctly print executable name in various error messages, pass argv[0] to error_exit() function. This way, error messages will refer to actual executable name, which may be different from 'qemu-img'. For subcommands, pass whole argv[] array, so argv[0] is the executable name, not subc

[PATCH 01/28] qemu-img: stop printing error twice in a few places

2024-02-21 Thread Michael Tokarev
Currently we have: ./qemu-img resize none +10 qemu-img: Could not open 'none': Could not open 'none': No such file or directory stop printing the message twice, - local_err already has all the info, no need to prepend additional text there. There are a few other places like this, but I'm un

[PATCH 18/28] qemu-img: rebase: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Options added: --format, --cache - for the image in question --backing, --backing-format, --backing-cache, --backing-unsafe - for the new backing file (was eg CACHE vs SRC_CACHE, which is unclear). Probably should rename local variables. Signed-of

[PATCH 17/28] qemu-img: snapshot: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 45 - 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index ee35768af8..ce939708d4 100644 --- a/qemu-img.c +++ b/qemu-img

Re: [PATCH] target/riscv: Add missing include guard in pmu.h

2024-02-21 Thread Atish Patra
On 2/20/24 08:20, Daniel Henrique Barboza wrote: On 2/20/24 08:08, frank.ch...@sifive.com wrote: From: Frank Chang Add missing include guard in pmu.h to avoid the problem of double inclusion. Signed-off-by: Frank Chang --- Reviewed-by: Daniel Henrique Barboza   target/riscv/pmu.h | 5

Re: [RFC PATCH v2 07/22] target/arm: Add support for NMI event state

2024-02-21 Thread Richard Henderson
On 2/21/24 10:10, Richard Henderson wrote: On 2/21/24 03:08, Jinjie Ruan via wrote: The NMI exception state include whether the interrupt with super priority is IRQ or FIQ, so add a nmi_is_irq flag in CPUARMState to distinguish it. Signed-off-by: Jinjie Ruan ---   target/arm/cpu.h    | 2 ++  

Re: [RFC PATCH v2 06/22] target/arm: Add support for Non-maskable Interrupt

2024-02-21 Thread Richard Henderson
On 2/21/24 03:08, Jinjie Ruan via wrote: This only implements the external delivery method via the GICv3. Signed-off-by: Jinjie Ruan --- target/arm/cpu-qom.h | 3 ++- target/arm/cpu.c | 39 ++- target/arm/cpu.h | 2 ++ target/arm/helper.c | 1

[PULL 06/25] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/

2024-02-21 Thread Philippe Mathieu-Daudé
ppc440_pcix.c is moved from the target specific ppc_ss[] meson source set to pci_ss[] which is common to all targets: the object is built once. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240215105017.57748-5-phi...@linaro.org> --- MAINTAINERS

[PATCH v6 1/9] trans_rvv.c.inc: mark_vs_dirty() before loads and stores

2024-02-21 Thread Daniel Henrique Barboza
While discussing a problem with how we're (not) setting vstart_eq_zero Richard had the following to say w.r.t the conditional mark_vs_dirty() calls on load/store functions [1]: "I think it's required to have stores set dirty unconditionally, before the operation. Consider a store that traps on th

[PATCH v6 3/9] target/riscv: remove 'over' brconds from vector trans

2024-02-21 Thread Daniel Henrique Barboza
Most of the vector translations has this following pattern at the start: TCGLabel *over = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_GEU, cpu_vstart, cpu_vl, over); And then right at the end: gen_set_label(over); return true; This means that if vstart >= vl we'll not set vsta

[PATCH v6 0/9] riscv: set vstart_eq_zero on mark_vs_dirty

2024-02-21 Thread Daniel Henrique Barboza
Hi, In this version 2 new patches were added: - patch 5 eliminates the 'cpu_vl' global, and do_vsetvl() now loads 'vl' directly from env. This was suggested by Richard in the v5 review; - patch 9 does a change in how we're doing the loops in ldst helpers. This was also proposed by Richard bu

[PATCH v6 9/9] target/riscv/vector_helper.c: optimize loops in ldst helpers

2024-02-21 Thread Daniel Henrique Barboza
Change the for loops in ldst helpers to do a single increment in the counter, and assign it env->vstart, to avoid re-reading from vstart every time. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza --- target/riscv/vector_helper.c | 6 +++--- 1 file changed, 3 insertions(+

[PATCH v6 4/9] target/riscv/translate.c: remove 'cpu_vstart' global

2024-02-21 Thread Daniel Henrique Barboza
The global is unused after recent changes. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson --- target/riscv/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 177418b2b9..f2f0593830 1

[PATCH v6 7/9] trans_rvv.c.inc: remove redundant mark_vs_dirty() calls

2024-02-21 Thread Daniel Henrique Barboza
trans_vmv_v_i , trans_vfmv_v_f and the trans_##NAME macro from GEN_VMV_WHOLE_TRANS() are calling mark_vs_dirty() in both branches of their 'ifs'. conditionals. Call it just once in the end like other functions are doing. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson ---

[PATCH v6 6/9] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX()

2024-02-21 Thread Daniel Henrique Barboza
The helper isn't setting env->vstart = 0 after its execution, as it is expected from every vector instruction that completes successfully. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson --- target/riscv/vector_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/t

[PATCH v6 8/9] target/riscv: Clear vstart_qe_zero flag

2024-02-21 Thread Daniel Henrique Barboza
From: Ivan Klokov The vstart_qe_zero flag is set at the beginning of the translation phase from the env->vstart variable. During the execution phase all functions will set env->vstart = 0 after a successful execution, but the vstart_eq_zero flag remains the same as at the start of the block. This

[PATCH v6 5/9] target/riscv: remove 'cpu_vl' global

2024-02-21 Thread Daniel Henrique Barboza
At this moment the global is used only in do_vsetvl(). Do a direct env load in do_vsetvl() to read 'vl' and remove the global. Suggested-by: Richard Henderson Signed-off-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc | 2 +- target/riscv/translate.c| 3 +

[PATCH v6 2/9] trans_rvv.c.inc: remove 'is_store' bool from load/store fns

2024-02-21 Thread Daniel Henrique Barboza
After the 'mark_vs_dirty' changes from the previous patch the 'is_store' bool is unused in all load/store functions that were changed. Remove it. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/riscv/insn_trans/trans_rvv.c.in

Re: [RFC PATCH v2 08/22] target/arm: Handle IS/FS in ISR_EL1 for NMI

2024-02-21 Thread Richard Henderson
On 2/21/24 03:08, Jinjie Ruan via wrote: Add IS and FS bit in ISR_EL1 and handle the read according to whether the NMI is IRQ or FIQ. Signed-off-by: Jinjie Ruan --- target/arm/cpu.h| 2 ++ target/arm/helper.c | 9 + 2 files changed, 11 insertions(+) diff --git a/target/arm/cpu.

Re: [RFC PATCH v2 16/22] hw/intc/arm_gicv3: Implement GICD_INMIR

2024-02-21 Thread Richard Henderson
On 2/21/24 03:08, Jinjie Ruan via wrote: Add GICD_INMIR0, GICD_INMIRnE register and support access GICD_INMIR0. Signed-off-by: Jinjie Ruan --- hw/intc/arm_gicv3_dist.c | 38 ++ hw/intc/gicv3_internal.h | 2 ++ 2 files changed, 40 insertions(+) Reviewed-

Re: [RFC PATCH v2 18/22] hw/arm/virt: Add FEAT_GICv3_NMI feature support in virt GIC

2024-02-21 Thread Richard Henderson
On 2/21/24 03:08, Jinjie Ruan via wrote: Included support FEAT_GICv3_NMI feature as part of virt platform GIC initialization. Signed-off-by: Jinjie Ruan --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index c442652d0f..0359dbd8bd 100644 -

[Stable-7.2.10 09/33] hw/smbios: Fix port connector option validation

2024-02-21 Thread Michael Tokarev
From: Akihiko Odaki qemu_smbios_type8_opts did not have the list terminator and that resulted in out-of-bound memory access. It also needs to have an element for the type option. Cc: qemu-sta...@nongnu.org Fixes: fd8caa253c56 ("hw/smbios: support for type 8 (port connector)") Signed-off-by: Akih

[Stable-7.2.10 04/33] target/arm: fix exception syndrome for AArch32 bkpt insn

2024-02-21 Thread Michael Tokarev
From: Jan Klötzke Debug exceptions that target AArch32 Hyp mode are reported differently than on AAarch64. Internally, Qemu uses the AArch64 syndromes. Therefore such exceptions need to be either converted to a prefetch abort (breakpoints, vector catch) or a data abort (watchpoints). Cc: qemu-st

[Stable-7.2.10 02/33] qemu-docs: Update options for graphical frontends

2024-02-21 Thread Michael Tokarev
From: Yihuan Pan The command line options `-ctrl-grab` and `-alt-grab` have been removed in QEMU 7.1. Instead, use the `-display sdl,grab-mod=` option to specify the grab modifiers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2103 Signed-off-by: Yihuan Pan Signed-off-by: Michael Tok

[Stable-7.2.10 08/33] hw/smbios: Fix OEM strings table option validation

2024-02-21 Thread Michael Tokarev
From: Akihiko Odaki qemu_smbios_type11_opts did not have the list terminator and that resulted in out-of-bound memory access. It also needs to have an element for the type option. Cc: qemu-sta...@nongnu.org Fixes: 2d6dcbf93fb0 ("smbios: support setting OEM strings table") Signed-off-by: Akihiko

[Stable-7.2.10 17/33] hw/i386: Fix _STA return value for ACPI0017

2024-02-21 Thread Michael Tokarev
From: Jonathan Cameron Found whilst testing a series for the linux kernel that actually bothers to check if enabled is set. 0xB is the option used for vast majority of DSDT entries in QEMU. It is a little odd for a device that doesn't really exist and is simply a hook to tell the OS there is a CE

[Stable-7.2.10 01/33] migration: Fix use-after-free of migration state object

2024-02-21 Thread Michael Tokarev
From: Fabiano Rosas We're currently allowing the process_incoming_migration_bh bottom-half to run without holding a reference to the 'current_migration' object, which leads to a segmentation fault if the BH is still live after migration_shutdown() has dropped the last reference to current_migrati

[Stable-7.2.10 13/33] hw/cxl: Pass CXLComponentState to cache_mem_ops

2024-02-21 Thread Michael Tokarev
From: Li Zhijian cache_mem_ops.{read,write}() interprets opaque as CXLComponentState(cxl_cstate) instead of ComponentRegisters(cregs). Fortunately, cregs is the first member of cxl_cstate, so their values are the same. Fixes: 9e58f52d3f8 ("hw/cxl/component: Introduce CXL components (8.1.x, 8.2.

[Stable-7.2.10 06/33] qemu-options.hx: Improve -serial option documentation

2024-02-21 Thread Michael Tokarev
From: Peter Maydell The -serial option documentation is a bit brief about '-serial none' and '-serial null'. In particular it's not very clear about the difference between them, and it doesn't mention that it's up to the machine model whether '-serial none' means "don't create the serial port" or

Re: [RFC PATCH v2 19/22] hw/intc/arm_gicv3: Add irq superpriority information

2024-02-21 Thread Richard Henderson
On 2/21/24 03:08, Jinjie Ruan via wrote: A SPI, PPI or SGI interrupt can have a superpriority property. So maintain superpriority information in PendingIrq and GICR/GICD. Signed-off-by: Jinjie Ruan --- include/hw/intc/arm_gicv3_common.h | 4 1 file changed, 4 insertions(+) Acked-by: Ri

[Stable-7.2.10 10/33] vhost-user.rst: Fix vring address description

2024-02-21 Thread Michael Tokarev
From: Andrey Ignatov There is no "size" field in vring address structure. Remove it. Fixes: 5fc0e00291 ("Add vhost-user protocol documentation") Signed-off-by: Andrey Ignatov Message-Id: <20240112004555.64900-1-r...@apple.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[Stable-7.2.10 v0 00/33] Patch Round-up for stable 7.2.10, freeze on 2024-03-02

2024-02-21 Thread Michael Tokarev
The following patches are queued for QEMU stable v7.2.10: https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 Patch freeze is 2024-03-02, and the release is planned for 2024-03-04: https://wiki.qemu.org/Planning/7.2 Please respond here or CC qemu-sta...@nongnu.org on any additional p

[Stable-7.2.10 19/33] linux-user/aarch64: Choose SYNC as the preferred MTE mode

2024-02-21 Thread Michael Tokarev
From: Richard Henderson The API does not generate an error for setting ASYNC | SYNC; that merely constrains the selection vs the per-cpu default. For qemu linux-user, choose SYNC as the default. Cc: qemu-sta...@nongnu.org Reported-by: Gustavo Romero Signed-off-by: Richard Henderson Tested-by:

[Stable-7.2.10 18/33] tests/acpi: Update DSDT.cxl to reflect change _STA return value.

2024-02-21 Thread Michael Tokarev
From: Jonathan Cameron _STA will now return 0xB (in common with most other devices) rather than not setting the bits to indicate this fake device has not been enabled, and self tests haven't passed. Signed-off-by: Jonathan Cameron Message-Id: <20240126120132.24248-13-jonathan.came...@huawei.com

[Stable-7.2.10 15/33] smmu: Clear SMMUPciBus pointer cache when system reset

2024-02-21 Thread Michael Tokarev
From: Zhenzhong Duan s->smmu_pcibus_by_bus_num is a SMMUPciBus pointer cache indexed by bus number, bus number may not always be a fixed value, i.e., guest reboot to different kernel which set bus number with different algorithm. This could lead to smmu_iommu_mr() providing the wrong iommu MR.

[Stable-7.2.10 05/33] system/vl.c: Fix handling of '-serial none -serial something'

2024-02-21 Thread Michael Tokarev
From: Peter Maydell Currently if the user passes multiple -serial options on the command line, we mostly treat those as applying to the different serial devices in order, so that for example -serial stdio -serial file:filename will connect the first serial port to stdio and the second to the nam

[Stable-7.2.10 12/33] cxl/cdat: Fix header sum value in CDAT checksum

2024-02-21 Thread Michael Tokarev
From: Ira Weiny The addition of the DCD support for CXL type-3 devices extended the CDAT table large enough that the checksum being returned was incorrect.[1] This was because the checksum value was using the header length field rather than each of the 4 bytes of the length field. This was prev

[Stable-7.2.10 25/33] i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs

2024-02-21 Thread Michael Tokarev
From: Xiaoyao Li The value of FEAT_XSAVE_XCR0_HI leaf and FEAT_XSAVE_XSS_HI leaf also need to be masked by XCR0 and XSS mask respectively, to make it logically correct. Fixes: 301e90675c3f ("target/i386: Enable support for XSAVES based features") Signed-off-by: Xiaoyao Li Reviewed-by: Yang Weij

[Stable-7.2.10 23/33] iotests: Make 144 deterministic again

2024-02-21 Thread Michael Tokarev
From: Kevin Wolf Since commit effd60c8 changed how QMP commands are processed, the order of the block-commit return value and job events in iotests 144 wasn't fixed and more and caused the test to fail intermittently. Change the test to cache events first and then print them in a predefined orde

[Stable-7.2.10 20/33] target/arm: Fix nregs computation in do_{ld, st}_zpa

2024-02-21 Thread Michael Tokarev
From: Richard Henderson The field is encoded as [0-3], which is convenient for indexing our array of function pointers, but the true value is [1-4]. Adjust before calling do_mem_zpa. Add an assert, and move the comment re passing ZT to the helper back next to the relevant code. Cc: qemu-sta...

[Stable-7.2.10 03/33] block/blkio: Make s->mem_region_alignment be 64 bits

2024-02-21 Thread Michael Tokarev
From: "Richard W.M. Jones" With GCC 14 the code failed to compile on i686 (and was wrong for any version of GCC): ../block/blkio.c: In function ‘blkio_file_open’: ../block/blkio.c:857:28: error: passing argument 3 of ‘blkio_get_uint64’ from incompatible pointer type [-Wincompatible-pointer-type

[Stable-7.2.10 33/33] audio: Depend on dbus_display1_dep

2024-02-21 Thread Michael Tokarev
From: Akihiko Odaki dbusaudio needs dbus_display1_dep. Fixes: 739362d4205c ("audio: add "dbus" audio backend") Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau Message-Id: <20240214-dbus-v7-1-7eff29f04...@daynix.com> (cherry picked from commit d67611907590a1e6c998b7c5a5cb4394acf8432

[Stable-7.2.10 07/33] pci-host: designware: Limit value range of iATU viewport register

2024-02-21 Thread Michael Tokarev
From: Guenter Roeck The latest version of qemu (v8.2.0-869-g7a1dc45af5) crashes when booting the mcimx7d-sabre emulation with Linux v5.11 and later. qemu-system-arm: ../system/memory.c:2750: memory_region_set_alias_offset: Assertion `mr->alias' failed. Problem is that the Designware PCIe emula

[Stable-7.2.10 21/33] target/arm: Fix SVE/SME gross MTE suppression checks

2024-02-21 Thread Michael Tokarev
From: Richard Henderson The TBI and TCMA bits are located within mtedesc, not desc. Cc: qemu-sta...@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Tested-by: Gustavo Romero Message-id: 20240207025210.8837-7-richard.hender...@linaro.org Signed-off-by: Peter Maydell (ch

[Stable-7.2.10 16/33] tests/acpi: Allow update of DSDT.cxl

2024-02-21 Thread Michael Tokarev
From: Jonathan Cameron The _STA value returned currently indicates the ACPI0017 device is not enabled. Whilst this isn't a real device, setting _STA like this may prevent an OS from enumerating it correctly and hence from parsing the CEDT table. Signed-off-by: Jonathan Cameron Message-Id: <202

[Stable-7.2.10 32/33] ui/console: Fix console resize with placeholder surface

2024-02-21 Thread Michael Tokarev
From: Tianlan Zhou In `qemu_console_resize()`, the old surface of the console is keeped if the new console size is the same as the old one. If the old surface is a placeholder, and the new size of console is the same as the placeholder surface (640*480), the surface won't be replace. In this situ

[Stable-7.2.10 27/33] i386/cpuid: Move leaf 7 to correct group

2024-02-21 Thread Michael Tokarev
From: Xiaoyao Li CPUID leaf 7 was grouped together with SGX leaf 0x12 by commit b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM") by mistake. SGX leaf 0x12 has its specific logic to check if subleaf (starting from 2) is valid or not by checking the bit 0:3 of corresponding EAX is 1 or

<    1   2   3   4   5   >