Re: [PATCH v3] Handle wrap around in limit calculation

2024-01-22 Thread Shlomo Pongratz
Please see inline On 22/01/2024 01:17, Philippe Mathieu-Daudé wrote: Hi Shlomo, On 21/1/24 17:47, Shlomo Pongratz wrote: From: Shlomo Pongratz Hanlde wrap around when calculating the viewport size caused by the fact that perior to version 460A the limit variable was 32bit quan

Re: [PATCH v1 7/7] ui/spice: Create another texture with linear layout when gl=on is enabled

2024-01-22 Thread Marc-André Lureau
Hi On Sat, Jan 20, 2024 at 4:54 AM Vivek Kasireddy wrote: > > Since most encoders (invoked by Spice) may not work with tiled memory > associated with a texture, we need to create another texture that has > linear memory layout and use that instead. > > Note that, there does not seem to be a direc

Re: [PATCH v1 3/7] ui/spice: Submit the gl_draw requests at 60 FPS for remote clients

2024-01-22 Thread Marc-André Lureau
Hi On Sat, Jan 20, 2024 at 4:54 AM Vivek Kasireddy wrote: > > In the specific case where the display layer (virtio-gpu) is using > dmabuf, and if remote clients are enabled (-spice gl=on,port=), > it makes sense to limit the maximum (streaming) rate to 60 FPS > using the GUI timer. This match

Re: [PATCH v1 2/7] ui/spice: Enable gl=on option for non-local or remote clients

2024-01-22 Thread Marc-André Lureau
Hi On Sat, Jan 20, 2024 at 4:54 AM Vivek Kasireddy wrote: > > Newer versions of Spice server should be able to accept dmabuf > fds from Qemu for clients that are connected via the network. > In other words, when this option is enabled, Qemu would share > a dmabuf fd with Spice which would encode

Re: [PATCH v1 1/7] ui/spice: Add an option for users to provide a preferred codec

2024-01-22 Thread Marc-André Lureau
Hi On Sat, Jan 20, 2024 at 4:54 AM Vivek Kasireddy wrote: > > Giving users an option to choose a particular codec will enable > them to make an appropriate decision based on their hardware and > use-case. > > Cc: Gerd Hoffmann > Cc: Marc-André Lureau > Cc: Frediano Ziglio > Cc: Dongwon Kim >

Re: [PULL 00/11] s390x fixes, removal of deprecated options, netbsd VM fix

2024-01-22 Thread Peter Maydell
On Fri, 19 Jan 2024 at 15:25, Thomas Huth wrote: > > The following changes since commit 88cf5fec91e50cd34bc002b633b4116228db0bc8: > > Merge tag 'pull-target-arm-20240118' of > https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-01-18 > 12:48:17 +) > > are available in the Gi

Re: How can I know Page Table address on RAM?

2024-01-22 Thread Thomas Huth
On 22/01/2024 05.11, Junho wrote: Hello, I'm a QEMU user with PowerPc target architecture. I have some personal modifications related to tb jmp cache and chaining logic to improve the performance of a specific guest code. To verify the safety, I have to guarantee that the page table on RAM doe

Re: [PATCH v4 0/2] Add support for LAM in QEMU

2024-01-22 Thread Binbin Wu
Gentle ping... Please help to review and consider applying the patch series. (The KVM part has been merged). On 1/12/2024 2:00 PM, Binbin Wu wrote: Linear-address masking (LAM) [1], modifies the checking that is applied to *64-bit* linear addresses, allowing software to use of the untranslated

Re: [PATCH v3] Handle wrap around in limit calculation

2024-01-22 Thread Peter Maydell
On Sun, 21 Jan 2024 at 16:48, Shlomo Pongratz wrote: > > From: Shlomo Pongratz > > Hanlde wrap around when calculating the viewport size > caused by the fact that perior to version 460A the limit variable > was 32bit quantity and not 64 bits quantity. > In the i.MX 6Dual/6Quad App

Re: [PATCH v3 3/3] nubus: add nubus-virtio-mmio device

2024-01-22 Thread Philippe Mathieu-Daudé
Cc'ing Manos. On 11/1/24 11:29, Mark Cave-Ayland wrote: The nubus-virtio-mmio device is a Nubus card that contains a set of 32 virtio-mmio devices and a goldfish PIC similar to the m68k virt machine that can be plugged into the m68k q800 machine. There are currently a number of drivers under d

Re: Re: [PATCH 0/2] Export debug triggers as an extension

2024-01-22 Thread Andrew Jones
On Mon, Jan 22, 2024 at 03:42:10PM +1000, Alistair Francis wrote: > > > From memory the "debug" property is for the original debug spec: > > > https://github.com/riscv/riscv-debug-spec/releases/tag/task_group_vote > > > > > > That was ratified and is an official extension. AFAIK this is what is > >

[PATCH v2] target/loongarch/kvm: Enable LSX/LASX extension

2024-01-22 Thread Song Gao
The kernel had already support LSX and LASX [1], but QEMU is disable LSX/LASX for kvm. This patch adds kvm_check_cpucfg2() to check CPUCFG2. [1]: https://lore.kernel.org/all/cabgobfzhrf7e_7jk4uprmsyxty3eiuuywhc35jqncnl9s-z...@mail.gmail.com/ Signed-off-by: Song Gao --- linux-headers/asm-loonga

Re: [PATCH 4/5] hw/s390x/css-bridge: switch virtual-css bus to 3-phase-reset

2024-01-22 Thread Halil Pasic
On Fri, 19 Jan 2024 16:35:11 + Peter Maydell wrote: > Switch the s390x virtual-css bus from using BusClass::reset to the > Resettable interface. > > This has no behavioural change, because the BusClass code to support > subclasses that use the legacy BusClass::reset will call that method > i

[PATCH 1/3] hw/gpio: Implement STM32L4x5 GPIO

2024-01-22 Thread Inès Varhol
Features supported : - the 8 STM32L4x5 GPIOs are initialized with their reset values (except IDR, see below) - input mode : setting a pin in input mode "externally" (using input irqs) results in an out irq (transmitted to SYSCFG) - output mode : setting a bit in ODR sets the corresponding o

[PATCH 2/3] hw/arm: Connect STM32L4x5 GPIO to STM32L4x5 SoC

2024-01-22 Thread Inès Varhol
Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- hw/arm/Kconfig | 3 +- hw/arm/stm32l4x5_soc.c | 67 +++--- include/hw/arm/stm32l4x5_soc.h | 2 + 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/hw/arm/Kconfig b/hw/

[PATCH 3/3] tests/qtest: Add STM32L4x5 GPIO QTest testcase

2024-01-22 Thread Inès Varhol
The testcase contains : - `test_idr_reset_value()` : Checks the reset values of MODER, OTYPER, PUPDR, ODR and IDR. - `test_gpio_output_mode()` : Checks that writing a bit in register ODR results in the corresponding pin rising or lowering, if this pin is configured in output mode. - `test_gpio_inpu

[PATCH 0/3] Add device STM32L4x5 GPIO

2024-01-22 Thread Inès Varhol
This patch adds a new device STM32L4x5 GPIO device and is part of a series implementing the STM32L4x5 with a few peripherals. Changes from RFC v1 : - `stm32l4x5-gpio-test.c` : correct typos, make the test generic, add a test for bitwise writing in register ODR - `stm32l4x5_soc.c` : connect gpios t

[PATCH] monitor: add dumpdtb command only in device-tree-enabled targets

2024-01-22 Thread Paolo Bonzini
Remove the command altogether from targets that do not have device tree support, instead of leaving it nonfunctional. Signed-off-by: Paolo Bonzini --- meson.build| 2 -- qapi/machine.json | 2 +- hmp-commands.hx| 2 +- system/meson.build | 2 +- 4 files changed, 3 insertions(+), 5 d

[PATCH] hw/xtensa: require libfdt

2024-01-22 Thread Paolo Bonzini
Always allow -dtb in qemu-system-xtensa. Basically all other targets require it if it can be used (including for example i386/x86_64). Signed-off-by: Paolo Bonzini --- configs/targets/xtensa-softmmu.mak | 1 + configs/targets/xtensaeb-softmmu.mak | 1 + hw/xtensa/xtfpga.c |

Re: [PATCH 1/5] migration: Fix use-after-free of migration state object

2024-01-22 Thread Peter Xu
On Fri, Jan 19, 2024 at 08:39:18PM -0300, Fabiano Rosas wrote: > 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()

Re: [PATCH] hw/arm/musicpal: Convert to qemu_add_kbd_event_handler()

2024-01-22 Thread Alex Bennée
Jan Kiszka writes: > On 19.01.24 12:24, Alex Bennée wrote: >> Peter Maydell writes: >> >>> Convert the musicpal key input device to use >>> qemu_add_kbd_event_handler(). This lets us simplify it because we no >>> longer need to track whether we're in the middle of a PS/2 multibyte >>> key seque

Re: [PULL 17/22] plugins: add an API to read registers

2024-01-22 Thread Alex Bennée
Akihiko Odaki writes: > On 2024/01/18 20:38, Alex Bennée wrote: >> Akihiko Odaki writes: >> >>> On 2024/01/16 19:48, Alex Bennée wrote: We can only request a list of registers once the vCPU has been initialised so the user needs to use either call the get function on vCPU initial

Re: [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine

2024-01-22 Thread Andrew Jones
On Fri, Dec 29, 2023 at 01:07:23PM +0100, Heinrich Schuchardt wrote: > Generate SMBIOS tables for the RISC-V mach-virt. > Add CONFIG_SMBIOS=y to the RISC-V default config. > Set the default processor family in the type 4 table. > > The implementation is based on the corresponding ARM and Loongson

Re: [PATCH v2 1/4] smbios: add processor-family option

2024-01-22 Thread Andrew Jones
On Fri, Dec 29, 2023 at 01:07:21PM +0100, Heinrich Schuchardt wrote: > For RISC-V the SMBIOS standard requires specific values of the processor > family value depending on the bitness of the CPU. > > Add a processor-family option for SMBIOS table 4. > > The value of processor-family may exceed 25

Re: [PATCH v2 2/4] smbios: function to set default processor family

2024-01-22 Thread Andrew Jones
On Fri, Dec 29, 2023 at 01:07:22PM +0100, Heinrich Schuchardt wrote: > Provide a function to set the default processor family. > > Signed-off-by: Heinrich Schuchardt > --- > v2: > new patch > --- > hw/smbios/smbios.c | 7 +++ > include/hw/firmware/smbios.h | 1 + > 2 files ch

Re: [PATCH v2 4/4] qemu-options: enable -smbios option on RISC-V

2024-01-22 Thread Andrew Jones
On Fri, Dec 29, 2023 at 01:07:24PM +0100, Heinrich Schuchardt wrote: > With SMBIOS support added for RISC-V we also should enable the command line > option. > > Signed-off-by: Heinrich Schuchardt > --- > v2: > new patch > --- > qemu-options.hx | 2 +- > 1 file changed, 1 insertion(+), 1 de

Re: [PATCH v2] target/i386/host-cpu: Use iommu phys_bits with VFIO assigned devices on Intel h/w

2024-01-22 Thread Laszlo Ersek
On 1/18/24 20:20, Vivek Kasireddy wrote: > Recent updates in OVMF and Seabios have resulted in MMIO regions > being placed at the upper end of the physical address space. As a > result, when a Host device is assigned to the Guest via VFIO, the > following mapping failures occur when VFIO tries to m

Re: [PATCH v2 0/3] s390x/pci: fix ISM reset

2024-01-22 Thread Michael Tokarev
18.01.2024 21:51, Matthew Rosato : Commit ef1535901a0 (re-)introduced an issue where passthrough ISM devices on s390x would enter an error state after reboot. This was previously fixed by 03451953c79e, using device reset callbacks, however the change in ef1535901a0 effectively triggers a cold re

Re: [PATCH 1/5] migration: Fix use-after-free of migration state object

2024-01-22 Thread Peter Xu
On Mon, Jan 22, 2024 at 05:49:01PM +0800, Peter Xu wrote: > On Fri, Jan 19, 2024 at 08:39:18PM -0300, Fabiano Rosas wrote: > > 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 segmen

Re: [PATCH v4 0/3] migration & CI: Add a CI job for migration compat testing

2024-01-22 Thread Peter Xu
On Fri, Jan 19, 2024 at 10:01:31AM -0300, Fabiano Rosas wrote: > I mentioned this at the bottom of the commit message for patch 2/3. You > need to push your tags. Otherwise your fork on gitlab won't have > knowledge of v8.2.0. Oops, my fault. Yeah it works now; I queued this into staging. Thanks

Re: [PATCH v2 0/3] s390x/pci: fix ISM reset

2024-01-22 Thread Michael Tokarev
22.01.2024 13:18, Michael Tokarev : .. Is it this a material for -stable, or there's no need to bother? Actually it's been Cc'd to qemu-stable@ already, I haven't noticed. Still there's a question which branches should get which patches. (changes 1 and 2 applies to 7.2 (while 2 fixes later ch

Re: Re: [PATCH v2 0/3] hw/pflash: implement update buffer for block writes

2024-01-22 Thread Gerd Hoffmann
On Sat, Jan 20, 2024 at 01:18:14PM +0300, Michael Tokarev wrote: > 08.01.2024 19:08, Gerd Hoffmann: > > When running qemu with edk2 efi firmware on aarch64 the efi > > variable store in pflash can get corrupted. qemu not doing > > proper block writes -- flush all or nothing to storage -- is > > a

Re: [PATCH v2 0/3] s390x/pci: fix ISM reset

2024-01-22 Thread Thomas Huth
On 22/01/2024 11.31, Michael Tokarev wrote: 22.01.2024 13:18, Michael Tokarev : .. Is it this a material for -stable, or there's no need to bother? Actually it's been Cc'd to qemu-stable@ already, I haven't noticed. Still there's a question which branches should get which patches. ... So all

Re: [PATCH] hw/xtensa: require libfdt

2024-01-22 Thread Philippe Mathieu-Daudé
Hi Paolo, On 22/1/24 10:42, Paolo Bonzini wrote: Always allow -dtb in qemu-system-xtensa. Basically all other targets require it if it can be used (including for example i386/x86_64). Signed-off-by: Paolo Bonzini --- configs/targets/xtensa-softmmu.mak | 1 + configs/targets/xtensaeb-soft

Re: [PULL 00/14] Block layer patches

2024-01-22 Thread Kevin Wolf
Am 20.01.2024 um 18:21 hat Peter Maydell geschrieben: > On Fri, 19 Jan 2024 at 18:15, Kevin Wolf wrote: > > > > The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc: > > > > Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into > > staging (2024-01-19 11:39:

[PULL v2 00/14] Block layer patches

2024-01-22 Thread Kevin Wolf
The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc: Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging (2024-01-19 11:39:38 +) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch

Re: [PATCH 1/3] hw/gpio: Implement STM32L4x5 GPIO

2024-01-22 Thread Philippe Mathieu-Daudé
Hello Inès, On 22/1/24 10:18, Inès Varhol wrote: Features supported : - the 8 STM32L4x5 GPIOs are initialized with their reset values (except IDR, see below) - input mode : setting a pin in input mode "externally" (using input irqs) results in an out irq (transmitted to SYSCFG) - outpu

Re: [PATCH 1/3] hw/gpio: Implement STM32L4x5 GPIO

2024-01-22 Thread Philippe Mathieu-Daudé
Hi Inès, On 22/1/24 10:18, Inès Varhol wrote: Features supported : - the 8 STM32L4x5 GPIOs are initialized with their reset values (except IDR, see below) - input mode : setting a pin in input mode "externally" (using input irqs) results in an out irq (transmitted to SYSCFG) - output m

Re: [PATCH v3 2/2] linux-user/elfload: check PR_GET_DUMPABLE before creating coredump

2024-01-22 Thread Philippe Mathieu-Daudé
On 20/1/24 22:45, Thomas Weißschuh wrote: A process can opt-out of coredump creation by calling prctl(PR_SET_DUMPABLE, 0). linux-user passes this call from the guest through to the operating system. From there it can be read back again to avoid creating coredumps from qemu-user itself if the gue

Re: [PATCH v3 1/2] linux-user/elfload: test return value of getrlimit

2024-01-22 Thread Philippe Mathieu-Daudé
On 20/1/24 22:45, Thomas Weißschuh wrote: Should getrlimit() fail the value of dumpsize.rlimit_cur may not be initialized. Avoid reading garbage data by checking the return value of getrlimit. Reviewed-by: Richard Henderson Signed-off-by: Thomas Weißschuh --- linux-user/elfload.c | 4 ++--

Re: [PULL 00/14] Block layer patches

2024-01-22 Thread Peter Maydell
On Mon, 22 Jan 2024 at 11:15, Kevin Wolf wrote: > > Am 20.01.2024 um 18:21 hat Peter Maydell geschrieben: > > Got some compile failures on this one; looks like the compiler > > on our s390 box didn't like this: > > > > https://gitlab.com/qemu-project/qemu/-/jobs/5973441293 > > https://gitlab.com/q

Re: [PATCH v3 0/2] riscv: support new isa extension detection devicetree properties

2024-01-22 Thread Conor Dooley
On Mon, Jan 22, 2024 at 03:24:19PM +1000, Alistair Francis wrote: > On Wed, Jan 10, 2024 at 8:27 PM Conor Dooley wrote: > > > > From: Conor Dooley > > > > Making it a series to keep the standalone change to riscv_isa_string() > > that Drew reported separate. > > > > Changes in v3: > > - g_free()

Re: [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine

2024-01-22 Thread Heinrich Schuchardt
On 22.01.24 10:57, Andrew Jones wrote: On Fri, Dec 29, 2023 at 01:07:23PM +0100, Heinrich Schuchardt wrote: Generate SMBIOS tables for the RISC-V mach-virt. Add CONFIG_SMBIOS=y to the RISC-V default config. Set the default processor family in the type 4 table. The implementation is based on the

[PATCH v3 2/2] target/riscv: add rv32i, rv32e and rv64e CPUs

2024-01-22 Thread Daniel Henrique Barboza
A bare bones 32 bit RVI CPU, rv32i, will make users lives easier when a full customized 32 bit CPU is desired, and users won't need to disable defaults by hand as they would with the rv32 CPU. [1] has an example of a situation that would be avoided with rv32i. In fact, add bare bones CPUs for RVE

[PATCH v3 0/2] riscv: add rv32i,rv32e and rv64e CPUs

2024-01-22 Thread Daniel Henrique Barboza
Hi, This v3 has the same patches from v2 rebased with a newer riscv-to-apply.next branch (@ 096b6b07298). No other changes made. All patches acked. v2 link: https://lore.kernel.org/qemu-riscv/20240108161903.353648-1-dbarb...@ventanamicro.com/ Daniel Henrique Barboza (2): target/riscv/cpu.c:

[PATCH v3 1/2] target/riscv/cpu.c: add riscv_bare_cpu_init()

2024-01-22 Thread Daniel Henrique Barboza
Next patch will add more bare CPUs. Their cpu_init() functions would be glorified copy/pastes of rv64i_bare_cpu_init(), differing only by a riscv_cpu_set_misa() call. Add a new .instance_init for the TYPE_RISCV_BARE_CPU typ to avoid this code repetition. While we're at it, add a better explanation

Re: [PATCH 00/88] esp: rework ESP emulation to use a SCSI phase-based state machine

2024-01-22 Thread Mark Cave-Ayland
On 12/01/2024 12:52, Mark Cave-Ayland wrote: The ESP SCSI chip fundamentally consists of a FIFO for transferring data to/from the SCSI bus along with a command sequencer which automates various processes such as selection, message/command transfer and data transfer. What makes this chip particu

Re: Re: [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine

2024-01-22 Thread Andrew Jones
On Mon, Jan 22, 2024 at 01:28:18PM +0100, Heinrich Schuchardt wrote: > On 22.01.24 10:57, Andrew Jones wrote: > > On Fri, Dec 29, 2023 at 01:07:23PM +0100, Heinrich Schuchardt wrote: ... > > > +#if defined(TARGET_RISCV32) > > > +smbios_set_default_processor_family(0x200); > > > +#elif defined(T

[PATCH v3 2/4] smbios: function to set default processor family

2024-01-22 Thread Heinrich Schuchardt
Provide a function to set the default processor family. Signed-off-by: Heinrich Schuchardt Reviewed-by: Andrew Jones --- v3: no change v2: new patch --- hw/smbios/smbios.c | 7 +++ include/hw/firmware/smbios.h | 1 + 2 files changed, 8 insertions(+) diff --git a/h

[PATCH v3 0/4] target/riscv: SMBIOS support for RISC-V virt machine

2024-01-22 Thread Heinrich Schuchardt
Generate SMBIOS tables for the RISC-V mach-virt. Add CONFIG_SMBIOS=y to the RISC-V default config. With the series the following firmware tables are provided: etc/smbios/smbios-anchor etc/smbios/smbios-tables Add processor-family to the '-smbios type=4' command line options. v3:

[PATCH v3 1/4] smbios: add processor-family option

2024-01-22 Thread Heinrich Schuchardt
For RISC-V the SMBIOS standard requires specific values of the processor family value depending on the bitness of the CPU. Add a processor-family option for SMBIOS table 4. The value of processor-family may exceed 255 and therefore must be provided in the Processor Family 2 field. Set the Process

[PATCH v3 3/4] target/riscv: SMBIOS support for RISC-V virt machine

2024-01-22 Thread Heinrich Schuchardt
Generate SMBIOS tables for the RISC-V mach-virt. Add CONFIG_SMBIOS=y to the RISC-V default config. Set the default processor family in the type 4 table. The implementation is based on the corresponding ARM and Loongson code. With the patch the following firmware tables are provided: etc/smbi

[PATCH v3 4/4] qemu-options: enable -smbios option on RISC-V

2024-01-22 Thread Heinrich Schuchardt
With SMBIOS support added for RISC-V we also should enable the command line option. Signed-off-by: Heinrich Schuchardt Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Reviewed-by: Andrew Jones --- v3: no change v2: new patch --- qemu-options.hx | 2 +- 1 file c

Re: [PATCH v2 09/19] qapi/schema: allow resolve_type to be used for built-in types

2024-01-22 Thread Markus Armbruster
John Snow writes: > On Tue, Jan 16, 2024 at 6:09 AM Markus Armbruster wrote: >> >> John Snow writes: >> >> > allow resolve_type to be used for both built-in and user-specified >> > type definitions. In the event that the type cannot be resolved, assert >> > that 'info' and 'what' were both prov

Re: [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine

2024-01-22 Thread Heinrich Schuchardt
On 22.01.24 13:59, Andrew Jones wrote: On Mon, Jan 22, 2024 at 01:28:18PM +0100, Heinrich Schuchardt wrote: On 22.01.24 10:57, Andrew Jones wrote: On Fri, Dec 29, 2023 at 01:07:23PM +0100, Heinrich Schuchardt wrote: ... +#if defined(TARGET_RISCV32) +smbios_set_default_processor_family(0x2

Re: [PATCH v3] qemu-img: Fix Column Width and Improve Formatting in snapshot list

2024-01-22 Thread atp exp
Alright, right now there are 10 digits for ID, don't think a billion snapshots are feasible anyway. > Maybe what we should also do is decreasing the width of each field by > one and instead writing a space character into the format string. I'm assuming you are talking about adding spaces between

Re: [PATCH] monitor: add dumpdtb command only in device-tree-enabled targets

2024-01-22 Thread Thomas Huth
On 22/01/2024 10.24, Paolo Bonzini wrote: Remove the command altogether from targets that do not have device tree support, instead of leaving it nonfunctional. Signed-off-by: Paolo Bonzini --- meson.build| 2 -- qapi/machine.json | 2 +- hmp-commands.hx| 2 +- system/meson.bui

Re: [PATCH] monitor: add dumpdtb command only in device-tree-enabled targets

2024-01-22 Thread Paolo Bonzini
On Mon, Jan 22, 2024 at 2:40 PM Thomas Huth wrote: > > On 22/01/2024 10.24, Paolo Bonzini wrote: > > Remove the command altogether from targets that do not have device tree > > support, > > instead of leaving it nonfunctional. > > > > Signed-off-by: Paolo Bonzini > > --- > > meson.build

Re: [PATCH] hw/xtensa: require libfdt

2024-01-22 Thread Thomas Huth
On 22/01/2024 10.42, Paolo Bonzini wrote: Always allow -dtb in qemu-system-xtensa. Basically all other targets require it if it can be used (including for example i386/x86_64). Signed-off-by: Paolo Bonzini --- configs/targets/xtensa-softmmu.mak | 1 + configs/targets/xtensaeb-softmmu.mak

Re: [PATCH] hw/xtensa: require libfdt

2024-01-22 Thread Peter Maydell
On Mon, 22 Jan 2024 at 11:10, Philippe Mathieu-Daudé wrote: > On 22/1/24 10:42, Paolo Bonzini wrote: > > Always allow -dtb in qemu-system-xtensa. Basically all other targets > > require > > it if it can be used (including for example i386/x86_64). > I've been wondering for some time why not req

Re: [PATCH 0/5] buses: switch to 3-phase-reset

2024-01-22 Thread Cédric Le Goater
Hello, On 1/22/24 03:06, Peter Xu wrote: Hi, Peter, On Fri, Jan 19, 2024 at 04:35:07PM +, Peter Maydell wrote: I wrote this ages ago and recently picked it back up because of a recent PCI related reset ordering problem noted by Peter Xu. I'm not sure if this patchset is necessary as a par

Re: [PATCH v3 19/38] tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX

2024-01-22 Thread Philippe Mathieu-Daudé
On 10/1/24 23:43, Richard Henderson wrote: ... and the inverse, CBZ for TSTEQ. Suggested-by: Paolo Bonzini Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 8 1 file changed, 8 insertions(+) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.in

Re: [PATCH 2/5] vmbus: Switch bus reset to 3-phase-reset

2024-01-22 Thread Maciej S. Szmigiero
On 19.01.2024 17:35, Peter Maydell wrote: Switch vmbus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off

Re: [PATCH v1 0/2] memory-device: reintroduce memory region size check

2024-01-22 Thread Maciej S. Szmigiero
Hi David, On 17.01.2024 14:55, David Hildenbrand wrote: Reintroduce a modified region size check, after we would now allow some configurations that don't make any sense (e.g., partial hugetlb pages, 1G+1byte DIMMs). We have to take care of hv-balloon first, which was the case why we remove that

[PATCH v2 2/3] hw/arm/virt: Wire up non-secure EL2 virtual timer IRQ

2024-01-22 Thread Peter Maydell
Armv8.1+ CPUs have the Virtual Host Extension (VHE) which adds a non-secure EL2 virtual timer. We implemented the timer itself in the CPU model, but never wired up its IRQ line to the GIC. Wire up the IRQ line (this is always safe whether the CPU has the interrupt or not, since it always creates

[PATCH v2 3/3] tests/qtest/bios-tables-tests: Update virt golden reference

2024-01-22 Thread Peter Maydell
Update the virt golden reference files to say that the FACP is ACPI v6.3, and the GTDT table is a revision 3 table with space for the virtual EL2 timer. Diffs from iasl: @@ -1,32 +1,32 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20200925 (64-bit version) * Cop

[PATCH v2 1/3] tests/qtest/bios-tables-test: Allow changes to virt GTDT

2024-01-22 Thread Peter Maydell
Allow changes to the virt GTDT -- we are going to add the IRQ entry for a new timer to it. Signed-off-by: Peter Maydell --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-tes

[PATCH v2 0/3] virt: wire up NS EL2 virtual timer IRQ

2024-01-22 Thread Peter Maydell
This patchset wires up the NS EL2 virtual timer IRQ on the virt board, similarly to what commit 058262e0a8b2 did for the sbsa-ref board. Version 1 was an RFC patchset, originally sent back in autumn: https://patchew.org/QEMU/20230919101240.2569334-1-peter.mayd...@linaro.org/ The main reason for it

Re: [PATCH] crypto/gcrypt: prefer kernel as direct source of entropy

2024-01-22 Thread Daniel P . Berrangé
On Fri, Jan 19, 2024 at 05:39:40PM -0300, Cristian Rodríguez wrote: > gcrypt by default uses an userspace RNG, which cannot know > when it is time to discard/invalidate its buffer > (suspend, resume, vm forks, other corner cases) > as a "when to discard" event is unavailable to userspace. So in th

[PATCH v3 01/21] hw/riscv: Use misa_mxl instead of misa_mxl_max

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki The effective MXL value matters when booting. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-23-alex.ben...@linaro.org> Message-Id: <20231213-riscv-v7-1-a760156a3...@daynix.com> Signed-off-by: Alex Bennée --- hw/riscv/boot.c | 2 +- 1 file changed, 1 inser

[PATCH v3 03/21] target/riscv: Move misa_mxl_max to class

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki misa_mxl_max is common for all instances of a RISC-V CPU class so they are better put into class. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-25-alex.ben...@linaro.org> Message-Id: <20231213-riscv-v7-3-a760156a3...@daynix.com> [AJB: fixed merge conflicts]

[PATCH v3 08/21] gdbstub: Use GDBFeature for gdb_register_coprocessor

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki This is a tree-wide change to introduce GDBFeature parameter to gdb_register_coprocessor(). The new parameter just replaces num_regs and xml parameters for now. GDBFeature will be utilized to simplify XML lookup in a following change. Signed-off-by: Akihiko Odaki Acked-by: A

[PATCH v3 00/21] plugin updates (register access) for 9.0 (pre-PR?)

2024-01-22 Thread Alex Bennée
Akihiko requested the register support not be merged in its current state so it's time for another round of review. I've made a few tweaks to simplify the register and CPU tracking code in execlog and removed some stale API functions. However from my point of view its ready to merge. v3 -- - spl

[PATCH v3 04/21] target/riscv: Validate misa_mxl_max only once

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki misa_mxl_max is now a class member and initialized only once for each class. This also moves the initialization of gdb_core_xml_file which will be referenced before realization in the future. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-26-alex.ben...@lina

[PATCH v3 07/21] target/riscv: Use GDBFeature for dynamic XML

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-29-alex.ben...@linaro.org> Message

[PATCH v3 10/21] gdbstub: Change gdb_get_reg_cb and gdb_set_reg_cb

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki Align the parameters of gdb_get_reg_cb and gdb_set_reg_cb with the gdb_read_register and gdb_write_register members of CPUClass to allow to unify the logic to access registers of the core and coprocessors in the future. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée

[PATCH v3 02/21] target/riscv: Remove misa_mxl validation

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki It is initialized with a simple assignment and there is little room for error. In fact, the validation is even more complex. Signed-off-by: Akihiko Odaki Acked-by: LIU Zhiwei Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Message-Id: <20240103173349.39852

[PATCH v3 11/21] gdbstub: Simplify XML lookup

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki Now we know all instances of GDBFeature that is used in CPU so we can traverse them to find XML. This removes the need for a CPU-specific lookup function for dynamic XMLs. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20240103173349.398526-33-alex.ben..

[PATCH v3 15/21] plugins: Use different helpers when reading registers

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki This avoids optimizations incompatible when reading registers. Signed-off-by: Akihiko Odaki Reviewed-by: Pierrick Bouvier Message-Id: <20240103173349.398526-37-alex.ben...@linaro.org> Message-Id: <20231213-gdb-v17-12-777047380...@daynix.com> Signed-off-by: Alex Bennée Revi

[PATCH v3 20/21] docs/devel: lift example and plugin API sections up

2024-01-22 Thread Alex Bennée
This makes them a bit more visible in the TCG emulation menu rather than hiding them away bellow the ToC limit. Message-Id: <20240103173349.398526-43-alex.ben...@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- docs/devel/tcg-plugins.

[PATCH v3 16/21] gdbstub: expose api to find registers

2024-01-22 Thread Alex Bennée
Expose an internal API to QEMU to return all the registers for a vCPU. The list containing the details required to called gdb_read_register(). Based-on: <20231025093128.33116-15-akihiko.od...@daynix.com> Cc: Akihiko Odaki Message-Id: <20240103173349.398526-38-alex.ben...@linaro.org> Signed-off-by

[PATCH v3 12/21] gdbstub: Infer number of core registers from XML

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki GDBFeature has the num_regs member so use it where applicable to remove magic numbers. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-34-alex.ben...@linaro.org> Message-Id: <20231213-gdb-v17-8-777047380...@daynix.com> Signed-off-by: Alex Bennée --- include

[PATCH v3 21/21] docs/devel: document some plugin assumptions

2024-01-22 Thread Alex Bennée
While we attempt to hide implementation details from the plugin we shouldn't be totally obtuse. Let the user know what they can and can't expect with the various instrumentation options. Message-Id: <20240103173349.398526-44-alex.ben...@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Ale

[PATCH v3 13/21] hw/core/cpu: Remove gdb_get_dynamic_xml member

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki This function is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20240103173349.398526-35-alex.ben...@linaro.org> Message-Id: <20231213-gdb-v17-9-777047380...@daynix.com> Signed-off-by: Alex Bennée --- include/hw/core/cpu.h | 4 ta

[PATCH v3 05/21] target/arm: Use GDBFeature for dynamic XML

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki In preparation for a change to use GDBFeature as a parameter of gdb_register_coprocessor(), convert the internal representation of dynamic feature from plain XML to GDBFeature. Signed-off-by: Akihiko Odaki Acked-by: Richard Henderson Message-Id: <20240103173349.398526-27-al

[PATCH v3 19/21] contrib/plugins: extend execlog to track register changes

2024-01-22 Thread Alex Bennée
With the new plugin register API we can now track changes to register values. Currently the implementation is fairly dumb which will slow down if a large number of register values are being tracked. This could be improved by only instrumenting instructions which mention registers we are interested

[PATCH v3 14/21] gdbstub: Add members to identify registers to GDBFeature

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki These members will be used to help plugins to identify registers. The added members in instances of GDBFeature dynamically generated by CPUs will be filled in later changes. Signed-off-by: Akihiko Odaki Message-Id: <20240103173349.398526-36-alex.ben...@linaro.org> Message-Id

Re: [PATCH v2 3/3] s390x/pci: drive ISM reset from subsystem reset

2024-01-22 Thread Matthew Rosato
On 1/19/24 4:07 PM, Halil Pasic wrote: > On Thu, 18 Jan 2024 13:51:51 -0500 > Matthew Rosato wrote: > >> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c >> index eaf61d3640..c99682b07d 100644 >> --- a/hw/s390x/s390-virtio-ccw.c >> +++ b/hw/s390x/s390-virtio-ccw.c >> @@ -118,6

[PATCH v3 18/21] contrib/plugins: fix imatch

2024-01-22 Thread Alex Bennée
We can't directly save the ephemeral imatch from argv as that memory will get recycled. Message-Id: <20240103173349.398526-40-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- contrib/plugins/execlog.c | 2 +- 1 file

[PATCH] cpu-exec: simplify jump cache management

2024-01-22 Thread Paolo Bonzini
Unless I'm missing something egregious, the jmp cache is only every populated with a valid entry by the same thread that reads the cache. Therefore, the contents of any valid entry are always consistent and there is no need for any acquire/release magic. Indeed ->tb has to be accessed with atomics

[PATCH v3 17/21] plugins: add an API to read registers

2024-01-22 Thread Alex Bennée
We can only request a list of registers once the vCPU has been initialised so the user needs to use either call the get function on vCPU initialisation or during the translation phase. We don't expose the reg number to the plugin instead hiding it behind an opaque handle. This allows for a bit of

Re: [PULL 0/8] tcg + linux-user patch queue

2024-01-22 Thread Peter Maydell
On Sun, 21 Jan 2024 at 00:22, Richard Henderson wrote: > > The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc: > > Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging > (2024-01-19 11:39:38 +) > > are available in the Git repository at: > >

[PATCH v2 1/2] oslib-posix: refactor memory prealloc threads

2024-01-22 Thread Mark Kanda
Refactor the memory prealloc threads support: - Make memset context a global qlist - Move the memset thread join/cleanup code to a separate routine This is functionally equivalent and facilitates multiple memset contexts (used in a subsequent patch). Signed-off-by: Mark Kanda --- util/oslib-pos

[PATCH v2 2/2] oslib-posix: initialize backend memory objects in parallel

2024-01-22 Thread Mark Kanda
QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are initialized in series. Allow the initialization to occur in parallel. In order to ensure optimal

[PATCH v2 0/2] Initialize backend memory objects in parallel

2024-01-22 Thread Mark Kanda
v2: - require MADV_POPULATE_WRITE (simplify the implementation) - require prealloc context threads to ensure optimal thread placement - use machine phase 'initialized' to detremine when to allow parallel init QEMU initializes preallocated backend memory when parsing the corresponding objects from

[PATCH v3 09/21] gdbstub: Use GDBFeature for GDBRegisterState

2024-01-22 Thread Alex Bennée
From: Akihiko Odaki Simplify GDBRegisterState by replacing num_regs and xml members with one member that points to GDBFeature. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240103173349.398526-31-alex.ben...@linaro.org> Message-Id: <2

[PATCH] tests/unit/test-iov: Fix timeout problem on NetBSD and OpenBSD

2024-01-22 Thread Thomas Huth
The test-iov code uses usleep() with small values (<= 30) in some nested loops with many iterations. This causes a small delay on OSes like Linux that have a precise sleeping mechanism, but on systems like NetBSD and OpenBSD, each usleep() call takes multiple microseconds, which then sum up in a to

[PATCH v2] cpu-exec: simplify jump cache management

2024-01-22 Thread Paolo Bonzini
Unless I'm missing something egregious, the jmp cache is only every populated with a valid entry by the same thread that reads the cache. Therefore, the contents of any valid entry are always consistent and there is no need for any acquire/release magic. Indeed ->tb has to be accessed with atomics

Re: [PATCH] migration/docs: Explain two solutions for VMSD compatibility

2024-01-22 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > The current article is not extremely easy to follow, and may contain too > much information for someone looking for solutions on VMSD compatibility > issues. Meanwhile, VMSD versioning is not discussed. > > I'm not yet sure whether we should just ob

Re: [PATCH v3 3/3] tests/tcg: Add the PROT_NONE gdbstub test

2024-01-22 Thread Alex Bennée
Ilya Leoshkevich writes: > Make sure that qemu gdbstub, like gdbserver, allows reading from and > writing to PROT_NONE pages. > > Signed-off-by: Ilya Leoshkevich Hmm I'm seeing the test hang and drop to the interactive python shell: TESTbasic gdbstub support on aarch64 Failed to read

  1   2   3   >