Re: [PATCH] qtest/fuzz-lsi53c895a-test: set guest RAM to 2G

2022-09-02 Thread Philippe Mathieu-Daudé via
On 2/9/22 15:38, Mauro Matteo Cascella wrote: test_lsi_do_msgout_cancel_req does not run on machines with small size memory. Reduce guest memory from 4G to 2G to alleviate the problem. Reported-by: Bin Meng Signed-off-by: Mauro Matteo Cascella --- tests/qtest/fuzz-lsi53c895a-test.c | 2 +-

Re: [RFC] hw/registerfields: add `FIELDx_1CLEAR()` macro

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 07:32, Richard Henderson wrote: On 9/1/22 02:02, Wilfred Mallawa wrote: From: Wilfred Mallawa Adds a helper macro that implements the `rw1c` behaviour. Ex:    uint32_t data = FIELD32_1CLEAR(val, REG, FIELD); if the specified `FIELD` is set (single/multi bit all fields) then the

Re: [PATCH 13/42] hw/isa/piix3: Add size constraints to rcr_ops

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: According to the PIIX3 datasheet, the reset control register is one byte in size. Moreover, PIIX4 has it, so add it to PIIX3 as well. Signed-off-by: Bernhard Beschow --- hw/isa/piix3.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

Re: [PATCH 42/42] hw/i386/acpi-build: Resolve PIIX ISA bridge rather than ACPI controller

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:26, Bernhard Beschow wrote: Resolving the PIIX ISA bridge rather than the PIIX ACPI controller mirrors the ICH9 code one line below. Signed-off-by: Bernhard Beschow --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c

Re: [PATCH 32/42] hw/isa/piix4: Rename wrongly named method

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:26, Bernhard Beschow wrote: This method post-loads the southbridge, not the IDE device. Signed-off-by: Bernhard Beschow --- hw/isa/piix4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 27/42] hw/isa/piix4: Allow board to provide PCI interrupt routes

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: PIIX3 initializes the PIRQx route control registers to the default values as described in the 82371AB PCI-TO-ISA/IDE XCELERATOR (PIIX4) April 1997 manual. PIIX4, however, initializes the routes according to the Malta™ User’s Manual, ch 6.6, which are IRQs

Re: [PATCH 25/42] hw/isa/piix4: Move pci_ide_create_devs() call to board code

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: For the VIA south bridges there was a comment to have the call in board code. Move it there for PIIX4 as well for consistency. Signed-off-by: Bernhard Beschow --- hw/isa/piix4.c | 1 - hw/mips/malta.c | 10 ++ 2 files changed, 6

Re: [PATCH 22/42] hw/mips/malta: Reuse dev variable

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: While at it, move the assignments closer to where they are used. Signed-off-by: Bernhard Beschow --- hw/mips/malta.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 15/42] hw/isa/piix3: Prefer pci_address_space() over get_system_memory()

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: get_system_memory() accesses global state while pci_address_space() uses whatever has been passed to the device instance, so avoid the global. Moreover, PIIX4 uses pci_address_space() here as well. Signed-off-by: Bernhard Beschow --- hw/isa/piix3.c |

Re: [PATCH 14/42] hw/isa/piix3: Modernize reset handling

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: Rather than registering the reset handler via a function which appends the handler to a global list, prefer to implement it as a virtual method - PIIX4 does the same already. Signed-off-by: Bernhard Beschow --- hw/isa/piix3.c | 8 +++- 1 file

Re: [PATCH 11/42] hw/isa/piix3: Remove extra '; ' outside of functions

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: Fixes the "extra-semi" clang-tidy check. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell --- hw/isa/piix3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 05/42] hw/isa/piix3: Create USB controller in host device

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: The USB controller is an integral part of PIIX3 (function 2). So create it as part of the south bridge. Note that the USB function is optional in QEMU. This is why it gets object_initialize_child()'ed in realize rather than in instance_init.

Re: [PATCH 01/42] hw/i386/pc: Create DMA controllers in south bridges

2022-09-01 Thread Philippe Mathieu-Daudé via
On 1/9/22 18:25, Bernhard Beschow wrote: Just like in the real hardware (and in PIIX4), create the DMA controllers in the south bridges. Signed-off-by: Bernhard Beschow --- hw/i386/pc.c | 3 --- hw/i386/pc_piix.c | 2 ++ hw/isa/Kconfig| 2 ++ hw/isa/lpc_ich9.c | 3 +++

Re: [PATCH v2 00/10] Instantiate VT82xx functions in host device

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 21:00, Bernhard Beschow wrote: v2: * Keep the call to pci_ide_create_devs() in board code for consistency (Zoltan) * Create rtc-time alias in board rather than in south bridge code * Remove stale comments about PCI functions v1: This series instantiates all PCI functions of the

Re: [PATCH v2 00/10] Instantiate VT82xx functions in host device

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 21:00, Bernhard Beschow wrote: v2: * Keep the call to pci_ide_create_devs() in board code for consistency (Zoltan) * Create rtc-time alias in board rather than in south bridge code * Remove stale comments about PCI functions v1: This series instantiates all PCI functions of the

Re: [PATCH v2 10/10] hw/isa/vt82c686: Create rtc-time alias in boards instead

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 21:00, Bernhard Beschow wrote: According to good QOM practice, an object should only deal with objects of its own sub tree. Having devices create an alias on the machine object doesn't respect this good practice. To resolve this, create the alias in the machine's code. IIUC, this is

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 30/8/22 18:18, Peter Xu wrote: On Tue, Aug 30, 2022 at 02:06:32PM +0200, Philippe Mathieu-Daudé wrote: On 27/8/22 20:59, Peter Xu wrote: Hi, Alberto, On Fri, Aug 26, 2022 at 05:09:27PM +0100, Alberto Faria wrote: Apply cache->xlat to addr before passing it to

Re: [PATCH 1/2] target/arm: Remove useless TARGET_BIG_ENDIAN check in armv7m_load_kernel()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 18:04, Peter Maydell wrote: Arm system emulation targets always have TARGET_BIG_ENDIAN clear, so there is no need to have handling in armv7m_load_kernel() for the case when it is defined. Remove the unnecessary code. Side notes: * our M-profile implementation is always

Re: [PATCH v4 3/4] hw/ssi: ibex_spi: fixup/add rw1c functionality

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 08:12, Wilfred Mallawa wrote: From: Wilfred Mallawa This patch adds the `rw1c` functionality to the respective registers. The status fields are cleared when the respective field is set. Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis --- hw/ssi/ibex_spi_host.c

Re: [PATCH 2/2] target/arm: Make boards pass base address to armv7m_load_kernel()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 23/8/22 18:04, Peter Maydell wrote: Currently armv7m_load_kernel() takes the size of the block of memory where it should load the initial guest image, but assumes that it should always load it at address 0. This happens to be true of all our M-profile boards at the moment, but it isn't

Re: [PATCH v3 3/3] util/aio-win32: Correct the event array size in aio_poll()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:52, Bin Meng wrote: From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil

Re: [PATCH v3 2/3] util/main-loop: Avoid adding the same HANDLE twice

2022-08-30 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:52, Bin Meng wrote: From: Bin Meng Fix the logic in qemu_add_wait_object() to avoid adding the same HANDLE twice, as the behavior is undefined when passing an array that contains same HANDLEs to WaitForMultipleObjects() API. Signed-off-by: Bin Meng --- Changes in v3: - new

Re: [PATCH 0/7] configure: fix misc shellcheck warnings

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:06, Peter Maydell wrote: Currently if you run shellcheck on our configure script it generates a ton of warnings. This patchset fixes some of the easier ones. I wasn't aiming for completeness or consistency; I just wanted to zap some of the ones where the fix is clear and didn't

Re: [PATCH 5/7] configure: Remove use of backtick `...` syntax

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: 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 --- configure | 2 +- 1 file changed, 1

Re: [PATCH 6/7] configure: Check mkdir result directly, not via $?

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: 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. It is also safer, in case someone add another command between the two

Re: [PATCH 4/7] configure: Add './' on front of glob of */config-devices.mak.d

2022-08-30 Thread Philippe Mathieu-Daudé via
On 25/8/22 17:07, Peter Maydell wrote: 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. Interesting, TIL. Reviewed-by: Philippe Mathieu-Daudé Fix this by adding './'.

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-08-30 Thread Philippe Mathieu-Daudé via
On 27/8/22 20:59, Peter Xu wrote: Hi, Alberto, On Fri, Aug 26, 2022 at 05:09:27PM +0100, Alberto Faria wrote: Apply cache->xlat to addr before passing it to flatview_(read|write)_continue(), to convert it from the MemoryRegionCache's address space to the FlatView's. Any bug encountered?

Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-08-30 Thread Philippe Mathieu-Daudé via
On 27/8/22 10:22, Paolo Bonzini wrote: The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If the read of the fields are not ordered after the read of the flag, QEMU might see stale values. Cc: Peter Xu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6

Re: [PATCH 0/3] target/avr: Fix skips vs interrupts

2022-08-30 Thread Philippe Mathieu-Daudé via
On 26/8/22 22:55, Richard Henderson wrote: Fixes https://gitlab.com/qemu-project/qemu/-/issues/1118 Thanks! Richard Henderson (3): target/avr: Call avr_cpu_do_interrupt directly target/avr: Only execute one interrupt at a time target/avr: Disable interrupts when env->skip set

Re: [PATCH v1 15/25] Deprecate 32 bit big-endian MIPS

2022-08-29 Thread Philippe Mathieu-Daudé via
Hi Alex, (+Aleksandar/Huacai) On 26/8/22 19:21, Alex Bennée wrote: It's becoming harder to maintain a cross-compiler to test this host architecture as the old stable Debian 10 ("Buster") moved into LTS which supports fewer architectures. For now: - mark it's deprecation in the docs -

Re: [PATCH v1 13/25] gitlab-ci/custom-runners: Disable -static-pie for ubuntu-20.04-aarch64

2022-08-29 Thread Philippe Mathieu-Daudé via
On 26/8/22 19:21, Alex Bennée wrote: From: Richard Henderson The project has reached the magic size at which we see /usr/aarch64-linux-gnu/lib/libc.a(init-first.o): in function `__libc_init_first': (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against \ symbol

Re: [PATCH v1 12/25] tests/vm: Remove obsolete Fedora VM test

2022-08-29 Thread Philippe Mathieu-Daudé via
On 26/8/22 19:21, Alex Bennée wrote: From: Thomas Huth It's still based on Fedora 30 - which is not supported anymore by QEMU since years. Seems like nobody is using (and refreshing) this, and it's easier to test this via a container anyway, so let's remove this now. Signed-off-by: Thomas

Re: [PATCH] MAINTAINERS: Update Akihiko Odaki's email address

2022-08-29 Thread Philippe Mathieu-Daudé via
On 29/8/22 10:31, Akihiko Odaki wrote: I am now employed by Daynix. Although my role as a reviewer of macOS-related change is not very relevant to the employment, I decided to use the company email address to avoid confusions from different addresses. Signed-off-by: Akihiko Odaki ---

Re: [PATCH] tests/avocado/migration: Get find_free_port() from the ports

2022-08-29 Thread Philippe Mathieu-Daudé via
On 29/8/22 14:19, Thomas Huth wrote: In upstream Avocado, the find_free_port() function is not available from "network" anymore, but must be used via "ports", see: https://github.com/avocado-framework/avocado/commit/22fc98c6ff76cc55c48 To be able to update to a newer Avocado version later,

Re: [PATCH] KVM: dirty ring: add missing memory barrier

2022-08-26 Thread Philippe Mathieu-Daudé via
Hi Paolo, On Fri, Aug 26, 2022 at 1:17 PM Paolo Bonzini wrote: > The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If > the read of the fields are not ordered after the read of the flag, > QEMU might see stale values. > > Cc: Peter Xu > Cc: Gavin Shan > Signed-off-by: Paolo

Re: [PATCH v2 00/11] misc: Remove variable-length arrays on the stack

2022-08-25 Thread Philippe Mathieu-Daudé via
On 19/8/22 17:39, Peter Maydell wrote: This is a resend of a subset of patches from a series that Philippe sent out last year: https://patchew.org/QEMU/20210505211047.1496765-1-phi...@redhat.com/ Basically I just pulled out the patches which: (1) trivially applied on a rebase (2) had got a

Re: [PATCH] configure: improve error for ucontext coroutine backend

2022-08-25 Thread Philippe Mathieu-Daudé via
On 19/8/22 19:02, Paolo Bonzini wrote: Instead of using feature_not_found(), which is not a good match because there is no "remedy" to fix the lack of makecontext(), just print a custom error. This happens to remove the last use of feature_not_found(), so remove the definition and the

Re: [PATCH v1 1/6] tests/avocado: push default timeout to QemuBaseTest

2022-08-25 Thread Philippe Mathieu-Daudé via
On 22/8/22 18:56, Alex Bennée wrote: All of the QEMU tests eventually end up derrived from this class. Move Typo "derived". the default timeout from LinuxTest to ensure we catch them all. As 15 minutes is fairly excessive we drop the default down to 2 minutes which is a more reasonable

Re: [PATCH] target/avr: Support probe argument to tlb_fill

2022-08-25 Thread Philippe Mathieu-Daudé via
On 23/8/22 07:07, Richard Henderson wrote: While there are no target-specific nonfaulting probes, generic code may grow some uses at some point. Note that the attrs argument was incorrect -- it should have been MEMTXATTRS_UNSPECIFIED. Just use the simpler interface. Signed-off-by: Richard

Re: [PATCH] tests/avocado: Fix trivial typo

2022-08-25 Thread Philippe Mathieu-Daudé via
On 24/8/22 10:09, Thomas Huth wrote: The intention was likely to use "intend" instead of "indent" here. Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH] tests/vm: Remove obsolete Fedora VM test

2022-08-25 Thread Philippe Mathieu-Daudé via
On 24/8/22 19:29, Alex Bennée wrote: Thomas Huth writes: It's still based on Fedora 30 - which is not supported anymore by QEMU since years. Seems like nobody is using (and refreshing) this, and it's easier to test this via a container anyway, so let's remove this now. Signed-off-by: Thomas

Re: [PATCH] hw/arm/bcm2835_property: Add support for RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS

2022-08-15 Thread Philippe Mathieu-Daudé via
On 12/8/22 16:35, Enrik Berkhan wrote: In more recent Raspbian OS Linux kernels, the fb driver gives up immediately if RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS fails or no displays are reported. This change simply always reports one display. It makes bcm2835_fb work again with these more

Re: [PATCH] target/arm: Rearrange cpu64.c so all the CPU initfns are together

2022-08-15 Thread Philippe Mathieu-Daudé via
On 12/8/22 19:41, Peter Maydell wrote: cpu64.c has ended up in a slightly odd order -- it starts with the initfns for most of the models-real-hardware CPUs; after that comes a bunch of support code for SVE, SME, pauth and LPA2 properties. Then come the initfns for the 'host' and 'max' CPU

Re: [PATCH] meson: be strict for boolean options

2022-08-15 Thread Philippe Mathieu-Daudé via
On 13/8/22 14:15, Anton Kochkov wrote: While Meson buildsystem accepts the 'false' as a value for boolean options, it's not covered by the specification and in general invalid. Some alternative Meson implementations, like Muon, do not accept 'false' or 'true' as a valid value for the boolean

Re: [PATCH 2/2] hw/mips/boston: Pack fdt in fdt filter

2022-08-15 Thread Philippe Mathieu-Daudé via
On 13/8/22 18:27, Jiaxun Yang wrote: FDT can be awfully fat after series of modifications in fdt filter. Just pack it up before add to ram. Signed-off-by: Jiaxun Yang --- hw/mips/boston.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index

Re: [PATCH] hw/riscv: microchip_pfsoc: fix kernel panics due to missing peripherals

2022-08-15 Thread Philippe Mathieu-Daudé via
Hi Conor, On 15/8/22 00:48, conor.doo...@microchip.com wrote: On 14/08/2022 23:08, Alistair Francis wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe On Sat, Aug 13, 2022 at 11:51 PM Conor Dooley wrote: QEMU support for PolarFire SoC seems to

Re: [PATCH 6/7] target/xtensa: Honour -semihosting-config userspace=on

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 21:03, Peter Maydell wrote: Honour the commandline -semihosting-config userspace=on option, instead of always permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(). Note that this is a

Re: [PATCH 4/7] target/mips: Honour -semihosting-config userspace=on

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 21:03, Peter Maydell wrote: Honour the commandline -semihosting-config userspace=on option, instead of always permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(). Note that this is a

Re: [PATCH 1/7] semihosting: Allow optional use of semihosting from userspace

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 21:02, Peter Maydell wrote: Currently our semihosting implementations generally prohibit use of semihosting calls in system emulation from the guest userspace. This is a very long standing behaviour justified originally "to provide some semblance of security" (since code with access

Re: [PATCH 19/20] disas/nanomips: Add modifier static

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Modifier static has been added to the remaining functions that shouldn't be used outside of the nanomips disassembler. Signed-off-by: Milica Lazarevic --- disas/nanomips.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 04/20] disas/nanomips: Remove helper methods from class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Helper methods from NMD class like NMD::renumber_registers, NMD::decode_gpr_gpr4... etc. are removed from the class. They're now declared global static functions. Following helper methods have been deleted because they're not used by the nanomips

Re: [PATCH 10/20] disas/nanomips: Delete nanomips.h

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Header file nanomips.h has been deleted for the nanomips disassembler to stay consistent with the rest of the disassemblers which don't include extra header files. Signed-off-by: Milica Lazarevic --- disas/nanomips.h | 28

Re: [PATCH 05/20] disas/nanomips: Remove __cond methods from class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 16:20, Thomas Huth wrote: On 15/08/2022 13.07, Philippe Mathieu-Daudé wrote: On 15/8/22 09:26, Milica Lazarevic wrote: NMD class methods with the conditional_function type like NMD::ADDIU_32__cond, NMD::ADDIU_RS5__cond, etc. are removed from the NMD class. They're now declared

Re: [PATCH 09/20] disas/nanomips: Move typedefs etc to nanomips.cpp

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: The following is moved from the nanomips.h to nanomips.cpp file: - #include line - typedefs - enums - definition of the Pool struct. Header file nanomips.h will be deleted to be consistent with the rest of the disas/ code. Signed-off-by: Milica

Re: [PATCH 07/20] disas/nanomips: Remove Pool tables from the class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Pool tables are no longer declared as static fields of the NMD class but as global static variables. The NMD::Disassemble method is using the MAJOR Pool table variable, so its implementation is moved to the end of the nanomips.cpp file, right after the

Re: [PATCH 06/20] disas/nanomips: Remove disasm methods from class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: NMD class methods with the disassembly_function type like NMD::ABS_D, NMD::ABS_S, etc. are removed from the class. They're now declared global static functions. Therefore, typedef of the function pointer, disassembly_function is defined outside of the

Re: [PATCH 05/20] disas/nanomips: Remove __cond methods from class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: NMD class methods with the conditional_function type like NMD::ADDIU_32__cond, NMD::ADDIU_RS5__cond, etc. are removed from the NMD class. They're now declared global static functions. Therefore, typedef of the function pointer, conditional_function is

Re: [PATCH 03/20] disas/nanomips: Delete NMD class fields

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Class fields have been replaced with the public static variables. Therefore, there is no more need for a constructor. The main goal is to remove NMD class completely. Signed-off-by: Milica Lazarevic --- disas/nanomips.cpp | 6 +-

Re: [PATCH for-7.1] target/arm: Don't report Statistical Profiling Extension in ID registers

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 15:11, Peter Maydell wrote: The newly added neoverse-n1 CPU has ID register values which indicate the presence of the Statistical Profiling Extension, because the real hardware has this feature. QEMU's TCG emulation does not yet implement SPE, though (not even as a minimal stub

Re: [PATCH v1 6/8] tests/avocado: add timeout to the aspeed tests

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 17:14, Alex Bennée wrote: On some systems the test can hang. At least defining a timeout stops it from hanging forever. Signed-off-by: Alex Bennée --- tests/avocado/machine_aspeed.py | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v1 8/8] accel/tcg: remove trace_vcpu_dstate TB checking

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 17:14, Alex Bennée wrote: We removed the ability to do vcpu tcg tracing between: d9a6bad542 (docs: remove references to TCG tracing) and 126d4123c5 (tracing: excise the tcg related from tracetool) but missed a bunch of other code. Lets continue the clean-up by removing the

Re: [PATCH v1 5/8] ssi: cache SSIPeripheralClass to avoid GET_CLASS()

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 17:14, Alex Bennée wrote: Investigating why some BMC models are so slow compared to a plain ARM virt machines I did some profiling of: ./qemu-system-arm -M romulus-bmc -nic user \ -drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd \ -nographic

Re: [PATCH v1 4/8] cputlb: used cached CPUClass in our hot-paths

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 17:14, Alex Bennée wrote: Before: 35.912 s ± 0.168 s After: 35.565 s ± 0.087 s Signed-off-by: Alex Bennée --- accel/tcg/cputlb.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) s/used/use/ in subject (also previous patch). Reviewed-by: Philippe

Re: [PATCH v1 3/8] hw/core/cpu-sysemu: used cached class in cpu_asidx_from_attrs

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 17:14, Alex Bennée wrote: This is a heavily used function so lets avoid the cost of CPU_GET_CLASS. On the romulus-bmc run it has a modest effect: Before: 36.812 s ± 0.506 s After: 35.912 s ± 0.168 s Signed-off-by: Alex Bennée --- hw/core/cpu-sysemu.c | 5 ++--- 1 file

Re: [PATCH v1 2/8] cpu: cache CPUClass in CPUState for hot code paths

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 17:14, Alex Bennée wrote: The class cast checkers are quite expensive and always on (unlike the dynamic case who's checks are gated by CONFIG_QOM_CAST_DEBUG). To avoid the overhead of repeatedly checking something which should never change we cache the CPUClass reference for use in

Re: Missing dll

2022-08-11 Thread Philippe Mathieu-Daudé via
Cc'ing qemu-windows@ team On 10/8/22 23:42, Peter Butler wrote: In x64 win10 I today I d/l QEMU into new directory. Then navigated to that dir and… qemu-system-aarch64 -boot d -cdrom f:\Downloads\debian-11.4.0-arm64-netinst.iso -m 2048 Error message:…libncursesw6.dll not found… Please

Re: [PATCH] tests/qtest: misc tweaks to readconfig

2022-08-11 Thread Philippe Mathieu-Daudé via
On 9/8/22 11:38, Daniel P. Berrangé wrote: The property name parameter is ignored when visiting a top level type, but the obvious typo should be fixed to avoid confusion. A few indentation issues were tidied up. We can break out of the loop when finding the RNG device. Finally, close the temp FD

Re: [PATCH] riscv: Make semihosting configurable for all privilege modes

2022-08-11 Thread Philippe Mathieu-Daudé via
On 11/8/22 22:41, Furquan Shaikh wrote: Unlike ARM, RISC-V does not define a separate breakpoint type for semihosting. Instead, it is entirely ABI. Thus, we need an option to allow users to configure what the ebreak behavior should be for different privilege levels - M, S, U, VS, VU. As per the

Re: [PATCH] tests/unit: fix a -Wformat-trunction warning

2022-08-10 Thread Philippe Mathieu-Daudé via
On 10/8/22 14:24, Markus Armbruster wrote: Typo in subject, it's -Wformat-truncation marcandre.lur...@redhat.com writes: From: Marc-André Lureau ../tests/test-qobject-input-visitor.c: In function ‘test_visitor_in_list’: ../tests/test-qobject-input-visitor.c:454:49: warning: ‘%d’ directive

Re: [PATCH for-7.1] cutils: Add missing dyld(3) include on macOS

2022-08-10 Thread Philippe Mathieu-Daudé via
+Thomas On 10/8/22 00:20, Philippe Mathieu-Daudé wrote: Commit 06680b15b4 moved qemu_*_exec_dir() to cutils but forgot to move the macOS dyld(3) include, resulting in the following error (when building with Homebrew GCC on macOS Monterey 12.4): [313/1197] Compiling C object

[PATCH for-7.1] cutils: Add missing dyld(3) include on macOS

2022-08-09 Thread Philippe Mathieu-Daudé via
Commit 06680b15b4 moved qemu_*_exec_dir() to cutils but forgot to move the macOS dyld(3) include, resulting in the following error (when building with Homebrew GCC on macOS Monterey 12.4): [313/1197] Compiling C object libqemuutil.a.p/util_cutils.c.o FAILED: libqemuutil.a.p/util_cutils.c.o

[PULL 2/3] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-08-08 Thread Philippe Mathieu-Daudé via
From: Igor Mammedov QEMU crashes trying to save VMSTATE when only MIPS target are compiled in $ qemu-system-mips -monitor stdio (qemu) migrate "exec:gzip -c > STATEFILE.gz" Segmentation fault (core dumped) It happens due to PIIX4_PM trying to parse hotplug vmstate structures which are

[PULL 3/3] hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses

2022-08-08 Thread Philippe Mathieu-Daudé via
From: Peter Maydell In real hardware, the APB and AHB PNP data tables can be accessed with byte and halfword reads as well as word reads. Our implementation currently only handles word reads. Add support for the 8 and 16 bit accesses. Note that we only need to handle aligned accesses --

[PULL 1/3] target/mips: Handle lock_user() failure in UHI_plog semihosting call

2022-08-08 Thread Philippe Mathieu-Daudé via
From: Peter Maydell Coverity notes that we forgot to check the error return from lock_user() in one place in the handling of the UHI_plog semihosting call. Add the missing error handling. report_fault() is rather brutal in that it will call abort(), but this is the same error-handling used in

[PULL 0/3] MIPS/SPARC patches for 2022-08-09

2022-08-08 Thread Philippe Mathieu-Daudé via
The following changes since commit 8a1337e60400ef54432e063164faf5043a5d: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-08-08 09:57:37 -0700) are available in the Git repository at: https://github.com/philmd/qemu.git tags/mips-20220809 for you to fetch

Re: [PATCH 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-08 Thread Philippe Mathieu-Daudé via
On Mon, Aug 8, 2022 at 5:56 PM Bin Meng wrote: > On Fri, Aug 5, 2022 at 10:56 PM Bin Meng wrote: > > > > From: Bin Meng > > > > The maximum number of wait objects for win32 should be > > MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. > > > > Signed-off-by: Bin Meng > > --- > > > >

Re: [PATCH for-7.1] hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses

2022-08-08 Thread Philippe Mathieu-Daudé via
On Mon, Aug 8, 2022 at 11:15 AM Konrad, Frederic wrote: > > -Original Message- > > From: Peter Maydell > > Sent: 02 August 2022 15:34 > > To: Konrad, Frederic > > Cc: qemu-devel@nongnu.org; Fabien Chouteau ; > > Frederic Konrad ; f4...@amsat.org > > Subject: Re: [PATCH for-7.1]

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-08-08 Thread Philippe Mathieu-Daudé via
On Thu, Jul 28, 2022 at 1:50 PM Igor Mammedov wrote: > > QEMU crashes trying to save VMSTATE when only MIPS target are compiled in > $ qemu-system-mips -monitor stdio > (qemu) migrate "exec:gzip -c > STATEFILE.gz" > Segmentation fault (core dumped) > > It happens due to PIIX4_PM trying to

Re: [PATCH] target/mips: Handle lock_user() failure in UHI_plog semihosting call

2022-08-08 Thread Philippe Mathieu-Daudé via
On Tue, Jul 19, 2022 at 9:17 PM Peter Maydell wrote: > > Coverity notes that we forgot to check the error return from > lock_user() in one place in the handling of the UHI_plog semihosting > call. Add the missing error handling. > > report_fault() is rather brutal in that it will call abort(),

Re: [PATCH for-7.1] hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses

2022-08-03 Thread Philippe Mathieu-Daudé via
On Tue, Aug 2, 2022 at 4:33 PM Peter Maydell wrote: > > On Tue, 2 Aug 2022 at 15:20, Konrad, Frederic wrote: > > > > Hi Peter, > > > > CC'ing Philippe. > > > > > -Original Message- > > > From: Qemu-devel > > bounces+fkonrad=amd@nongnu.org> On Behalf Of Peter Maydell > > > Sent: 02

Re: [PATCH] tests/avocado: fix replay-linux test

2022-08-02 Thread Philippe Mathieu-Daudé via
On Tue, Aug 2, 2022 at 12:46 PM Pavel Dovgalyuk wrote: > > Last line of the test is missing by accident. > This patch fixes the script. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/avocado/replay_linux.py |1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] target/mips: Advance pc after semihosting exception

2022-08-02 Thread Philippe Mathieu-Daudé via
On Tue, Aug 2, 2022 at 4:11 PM Richard Henderson wrote: > On 8/1/22 23:48, Philippe Mathieu-Daudé wrote: > > Hi Richard, > > > > On 30/7/22 04:18, Richard Henderson wrote: > >> Delay generating the exception until after we know the > >> insn length, and record that length in env->error_code. > >>

Re: [PATCH] target/mips: Advance pc after semihosting exception

2022-08-02 Thread Philippe Mathieu-Daudé via
Hi Richard, On 30/7/22 04:18, Richard Henderson wrote: Delay generating the exception until after we know the insn length, and record that length in env->error_code. Fixes: 8ec7e3c53d4 ("target/mips: Use an exception for semihosting") Resolves:

Re: [PATCH for-7.1] hw/mips/malta: turn off x86 specific features of PIIX4_PM

2022-08-02 Thread Philippe Mathieu-Daudé via
On 28/7/22 15:16, Igor Mammedov wrote: On Thu, 28 Jul 2022 13:29:07 +0100 Peter Maydell wrote: On Thu, 28 Jul 2022 at 12:50, Igor Mammedov wrote: QEMU crashes trying to save VMSTATE when only MIPS target are compiled in $ qemu-system-mips -monitor stdio (qemu) migrate "exec:gzip -c >

Re: [PATCH 0/2] linux-user: AT_BASE_PLATFORM for MIPS

2022-08-02 Thread Philippe Mathieu-Daudé via
On 1/8/22 22:09, Jiaxun Yang wrote: Hi all, This series properly filled AT_BASE_PLATFORM of MIPS. There is a checkpatch error about braces after if statement, I intentionally left it for style consistency. Thanks. - Jiaxun Jiaxun Yang (2): linux-user: Introduce stubs for ELF

Re: [PATCH 2/2] linux-user: Set ELF_BASE_PLATFORM for MIPS

2022-08-02 Thread Philippe Mathieu-Daudé via
On 1/8/22 22:09, Jiaxun Yang wrote: "On MIPS, AT_BASE_PLATFORM identifies the ISA level (since Linux 5.7)." Match most appropriate base platform string based on insn_flags. Logic is aligned with arch/mips/kernel/cpu-probe.c in Linux kernel. "... aligned with set_isa() from ..." Reviewed-by:

Re: [PATCH 1/2] linux-user: Introduce stubs for ELF AT_BASE_PLATFORM

2022-08-02 Thread Philippe Mathieu-Daudé via
On 1/8/22 22:09, Jiaxun Yang wrote: AT_BASE_PLATFORM is a elf auxiliary vector pointing to a string to pass some architecture information. We can be more specific. "See getauxval(3) man-page." Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jiaxun Yang --- linux-user/elfload.c | 29

Re: When create a new qemu fork, can not run pipeline, what I need to do?

2022-07-28 Thread Philippe Mathieu-Daudé via
On Thu, Jul 28, 2022 at 11:29 AM 罗勇刚(Yonggang Luo) wrote: > On Thu, Jul 28, 2022 at 4:39 PM Daniel P. Berrangé > wrote: > > On Wed, Jul 27, 2022 at 07:20:51PM +0800, 罗勇刚(Yonggang Luo) wrote: > > > ··· > > > Pipeline cannot be run. > > > > > > No stages / jobs for this pipeline. > > > > No jobs

Re: [RFC PATCH 8/8] tests/docker: Selective line reading by python script

2022-07-27 Thread Philippe Mathieu-Daudé via
+Erik/Daniel On Wed, Jul 27, 2022 at 6:37 PM Lucas Mateus Castro(alqotel) wrote: > > Building some images failed on ppc64le because the dockerfile tried to > install some packages that are only available in x86 and arm64, to solve > this while still having those packages be available in those

Re: When create a new qemu fork, can not run pipeline, what I need to do?

2022-07-27 Thread Philippe Mathieu-Daudé via
Cc'ing build and test automation maintainers. On Wed, Jul 27, 2022 at 1:22 PM 罗勇刚(Yonggang Luo) wrote: > > ··· > Pipeline cannot be run. > > No stages / jobs for this pipeline. > > The form contains the following warning: > > 121 warnings found: showing first 25 > > jobs:amd64-centos8-container

Re: [PATCH] Hexagon (tests/tcg/hexagon) add compiler options to EXTRA_CFLAGS

2022-07-26 Thread Philippe Mathieu-Daudé via
Hi Taylor, On 26/7/22 21:17, Taylor Simpson wrote: The cross_cc_cflags_hexagon in configure are not getting passed to the Hexagon cross compiler. Set EXTRA_CFLAGS in tests/tcg/hexagon/Makefile.target. Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson ---

Re: hexagon docker test failure

2022-07-26 Thread Philippe Mathieu-Daudé via
(Cc'ing Paolo for commit cd362defb) On 26/7/22 19:23, Taylor Simpson wrote: -Original Message- From: Richard Henderson Sent: Tuesday, July 26, 2022 10:41 AM To: Taylor Simpson Cc: qemu-devel Subject: hexagon docker test failure Hi Taylor, One of your recent hexagon testsuite

Re: [PATCH 2/2] pci: Sanity check mask argument to pci_set_*_by_mask()

2022-07-26 Thread Philippe Mathieu-Daudé via
On 26/7/22 18:32, Peter Maydell wrote: Coverity complains that in functions like pci_set_word_by_mask() we might end up shifting by more than 31 bits. This is true, but only if the caller passes in a zero mask. Help Coverity out by asserting that the mask argument is valid. Fixes: CID 1487168

Re: [PATCH v1 01/13] tests: refresh to latest libvirt-ci module

2022-07-26 Thread Philippe Mathieu-Daudé via
On 25/7/22 16:05, Alex Bennée wrote: From: Daniel P. Berrangé Notable changes: - libvirt-ci source tree was re-arranged, so the script we run now lives in a bin/ sub-dir - opensuse 15.2 is replaced by opensuse 15.3 - libslirp is temporarily dropped on opensuse as the

Re: [PATCH] ui: -display dbus requires gbm

2022-07-26 Thread Philippe Mathieu-Daudé via
On 26/7/22 12:31, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau For now, -display dbus also requires GBM, for EGL setup. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1108 Signed-off-by: Marc-André Lureau --- meson.build | 2 ++ 1 file changed, 2 insertions(+)

Re: [PATCH v1 06/13] semihosting: Don't return negative values on qemu_semihosting_console_write() failure

2022-07-26 Thread Philippe Mathieu-Daudé via
On 25/7/22 16:05, Alex Bennée wrote: From: Peter Maydell The documentation comment for qemu_semihosting_console_write() says * Returns: number of bytes written -- this should only ever be short * on some sort of i/o error. and the callsites rely on this. However, the implementation code

Re: [PATCH v1 03/13] gitlab: drop 'containers-layer2' stage

2022-07-26 Thread Philippe Mathieu-Daudé via
On 25/7/22 16:05, Alex Bennée wrote: From: Daniel P. Berrangé Since we express dependancies via a 'needs' clause, we don't need to Typo "dependencies". split container builds into separate stages. GitLab happily lets jobs depend on other jobs in the same stage and will run them when

Re: [PATCH] qtest/machine-none: Add LoongArch support

2022-07-13 Thread Philippe Mathieu-Daudé via
On Wed, Jul 13, 2022 at 4:05 AM Song Gao wrote: > > Update the cpu_maps[] to support the LoongArch target. > Reported-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Song Gao > --- > tests/qtest/machine-none-test.c | 1 + > 1 file changed, 1 insertion(+) > > diff

Re: [PATCH] hw/intc/armv7m_nvic: ICPRn must not unpend an IRQ that is being held high

2022-07-12 Thread Philippe Mathieu-Daudé via
On 28/6/22 17:47, Peter Maydell wrote: In the M-profile Arm ARM, rule R_CVJS defines when an interrupt should be set to the Pending state: A) when the input line is high and the interrupt is not Active B) when the input line transitions from low to high and the interrupt is Active (Note

Re: [PATCH] Align Raspberry Pi DMA interrupts with Linux DTS

2022-07-12 Thread Philippe Mathieu-Daudé via
+Pete/Jeremy On 26/6/22 12:16, Peter Maydell wrote: On Fri, 24 Jun 2022 at 21:54, Andrey Makarov wrote: All Raspberry Pi models 1-3 (based on bcm2835) have Linux device tree (arch/arm/boot/dts/bcm2835-common.dtsi +25): /* dma channel 11-14 share one irq */ which mismatched the Qemu

<    1   2   3   4   5   6   7   8   9   10   >