[PATCH-for-10.0 1/5] qtest/bios-tables-test: Add test for -M virt, its=off

2025-03-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test.c| 22 ++ tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 23

Re: [PATCH v2 11/42] accel/tcg: Perform aligned atomic reads in translator_ld

2025-03-31 Thread Philippe Mathieu-Daudé
Cc'ing Jim & Frank On 18/3/25 22:31, Richard Henderson wrote: Perform aligned atomic reads in translator_ld, if possible. According to https://lore.kernel.org/qemu-devel/20240607101403.1109-1-jim@sifive.com/ this is required for RISC-V Ziccif. Signed-off-by: Richard Henderson --- accel

Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset

2025-03-31 Thread Dongli Zhang
Hi ewanhai, On 3/30/25 8:55 PM, ewanhai wrote: > Hi Dongli, > [snip] > > [2] As mentioned in [1], QEMU always sets the vCPU's vendor to match the > host's > vendor > when acceleration (KVM or HVF) is enabled. Therefore, if users want to > emulate a > Zhaoxin CPU on an Intel host, the vendor

Re: [PATCH 2/2] pc-bios: Move device tree files in their own subdir

2025-03-31 Thread Philippe Mathieu-Daudé
+Stefan On 29/3/25 16:43, BALATON Zoltan wrote: We have several device tree files already and may have more in the future so add a new dtb subdirectory and move device tree files there so they are not mixed with ROM binaries. Signed-off-by: BALATON Zoltan --- MAINTAINERS

Re: [PATCH v2 4/4] qapi: rephrase return docs to avoid type name

2025-03-31 Thread Markus Armbruster
John Snow writes: > On Fri, Mar 28, 2025 at 4:36 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Well, I tried. Maybe not very hard. Sorry! >> >> No need to be sorry! Kick-starting discussion with limited effort is >> better than a big effort going into a direction that turns out to

Re: [PATCH] bsd-user: add option to enable plugins

2025-03-31 Thread Philippe Mathieu-Daudé
Hi Pierrick, On 1/4/25 01:42, Pierrick Bouvier wrote: Nothing prevent plugins to be enabled on this platform for user binaries, only the option in the driver is missing. Per commit 903e870f245 ("plugins/api: split out binary path/start/end/entry code") this is deliberate: The BSD user-mod

[PULL 02/23] hw/arm/imx8mp-evk: Fix reference count of SoC object

2025-03-31 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow TYPE_FSL_IMX8MP is created using object_new(), so must be realized with qdev_realize_and_unref() to keep the reference counting intact. Fixes: a4eefc69b237 "hw/arm: Add i.MX 8M Plus EVK board" Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Message-ID: <202503

[PULL 16/23] hw/ufs: free irq on exit

2025-03-31 Thread Philippe Mathieu-Daudé
From: Zheng Huang Fix a memory leak bug in ufs_init_pci() due to u->irq not being freed in ufs_exit(). Signed-off-by: Zheng Huang Reviewed-by: Philippe Mathieu-Daudé Message-ID: <43ceb427-87aa-44ee-9007-dbaecc499...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ufs/ufs.c | 3 +++ 1

[PULL 11/23] hw/misc/pll: Do not expose as user-creatable

2025-03-31 Thread Philippe Mathieu-Daudé
All these devices are part of SoC components and can not be created manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250325224310.8785-9-phi...@linaro.org> --- hw/misc/bcm2835_cprman.c | 8 hw/misc/npcm_clk.c | 6 ++ hw/misc/stm32l4x5_rc

Re: [PATCH 2/9] cxl-mailbox-utils: 0x5600 - FMAPI Get DCD Info

2025-03-31 Thread Anisa Su
On Tue, Mar 18, 2025 at 03:56:24PM +, Jonathan Cameron wrote: > On Mon, 17 Mar 2025 16:31:29 + > anisa.su...@gmail.com wrote: > > > From: Anisa Su > > > > FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section > > 7.6.7.6.1 > > > > Signed-off-by: Anisa Su > > --- a/hw/c

[PULL 23/23] target/mips: Simplify and fix update_pagemask

2025-03-31 Thread Philippe Mathieu-Daudé
From: Richard Henderson When update_pagemask was split from helper_mtc0_pagemask, we failed to actually write to the new parameter but continue to write to env->CP0_PageMask. Thus the use within page_table_walk_refill modifies cpu state and not the local variable as expected. Simplify by renami

[PULL 08/23] hw/dma/i82374: Categorize and add description

2025-03-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250325224310.8785-5-phi...@linaro.org> --- hw/dma/i82374.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index 9652d47adcd..0bf69ef399b 100644 --- a/hw/dma/i82374.c +++ b/hw/dm

[PULL 17/23] hw/pci-host/designware: Fix ATU_UPPER_TARGET register access

2025-03-31 Thread Philippe Mathieu-Daudé
Fix copy/paste error writing to the ATU_UPPER_TARGET register, we want to update the upper 32 bits. Cc: qemu-sta...@nongnu.org Reported-by: Joey Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2861 Fixes: d64e5eabc4c ("pci: Add support for Designware IP block") Signed-off-by: Philippe Mat

Re: [PATCH 3/3] ipmi/bmc-sim: Add 'Get Channel Info' command

2025-03-31 Thread Nicholas Piggin
On Mon Mar 31, 2025 at 11:25 PM AEST, Corey Minyard wrote: > On Mon, Mar 31, 2025 at 10:57:24PM +1000, Nicholas Piggin wrote: >> Linux issues this command when booting a powernv machine. > > This is good, just a couple of nits. > >> >> Signed-off-by: Nicholas Piggin >> --- >> include/hw/ipmi/ipm

[PATCH] bsd-user: add option to enable plugins

2025-03-31 Thread Pierrick Bouvier
Nothing prevent plugins to be enabled on this platform for user binaries, only the option in the driver is missing. Signed-off-by: Pierrick Bouvier --- bsd-user/main.c | 12 1 file changed, 12 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index fdb160bed0f..329bd1acc

[PATCH-for-10.0 1/2] hw/misc/aspeed_scu: Set MemoryRegionOps::impl::access_size to 32-bit

2025-03-31 Thread Philippe Mathieu-Daudé
All MemoryRegionOps::read/write() handlers switch over a 32-bit aligned value, because converted using TO_REG(), which is defined as: #define TO_REG(offset) ((offset) >> 2) So all implementations are 32-bit. Set min/max access_size accordingly. Signed-off-by: Philippe Mathieu-Daudé --- hw/mi

Re: [PATCH] hw/aspeed: Correct minimum access size for all models

2025-03-31 Thread Philippe Mathieu-Daudé
Hi Joel, On 19/11/24 11:29, Peter Maydell wrote: On Tue, 19 Nov 2024 at 02:53, Joel Stanley wrote: On Mon, 18 Nov 2024 at 20:40, Peter Maydell wrote: Have you reviewed all the device read/write function implementations for these devices to check whether (a) changing the .valid value does th

[PATCH-for-10.0 0/2] hw/misc/aspeed_scu: Correct minimum access size for AST2500 / AST2600

2025-03-31 Thread Philippe Mathieu-Daudé
Mark SCU MemoryRegionOps read/write handler implementations as 32-bit, then allow down to 8-bit accesses. Joel Stanley (1): hw/misc/aspeed_scu: Correct minimum access size for AST2500 / AST2600 Philippe Mathieu-Daudé (1): hw/misc/aspeed_scu: Set MemoryRegionOps::impl::access_size to 32-bit

[PULL 14/23] hw/sd/sdhci: free irq on exit

2025-03-31 Thread Philippe Mathieu-Daudé
From: Zheng Huang Fix a memory leak bug in sdhci_pci_realize() due to s->irq not being freed in sdhci_pci_exit(). Signed-off-by: Zheng Huang Reviewed-by: Philippe Mathieu-Daudé Message-ID: <09ddf42b-a6db-42d5-954b-148d09d8d...@gmail.com> [PMD: Moved qemu_free_irq() call before sdhci_common_unr

[PULL 04/23] hw/arm/fsl-imx8mp: Remove unused define

2025-03-31 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The SoC has three SPI controllers, not four. Remove the extra define of an SPI IRQ. Fixes: 06908a84f036 "hw/arm/fsl-imx8mp: Add SPI controllers" Reviewed-by: Peter Maydell Signed-off-by: Bernhard Beschow Message-ID: <20250318205709.28862-4-shen...@gmail.com> Signed-off-b

Re: [PATCH v8 0/7] Allow to enable multifd and postcopy migration together

2025-03-31 Thread Fabiano Rosas
Prasad Pandit writes: > From: Prasad Pandit > > Hello, > > * This series (v8) splits earlier patch-2 which enabled multifd and > postcopy options together into two separate patches. One modifies > the channel discovery in migration_ioc_process_incoming() function, > and second one enables

Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset

2025-03-31 Thread Ewan Hai
[2] As mentioned in [1], QEMU always sets the vCPU's vendor to match the host's vendor when acceleration (KVM or HVF) is enabled. Therefore, if users want to emulate a Zhaoxin CPU on an Intel host, the vendor must be set manually.Furthermore, should we display a warning to users who enable both vP

Re: [PATCH-for-10.0] hw/core/machine.c: Fix -machine dumpdtb=file.dtb

2025-03-31 Thread Philippe Mathieu-Daudé
On 1/4/25 06:15, Joel Stanley wrote: In commit 8fd2518ef2f8 ("hw: Centralize handling of -machine dumpdtb option") the call to dump was moved with respect to the init of the machine. This resulted in the device tree missing parts of the machine description, depending on how they construct their

Re: [PATCH v2 2/4] docs, qapi: generate undocumented return sections

2025-03-31 Thread Markus Armbruster
John Snow writes: > On Thu, Mar 27, 2025 at 5:11 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > This patch changes the qapidoc transmogrifier to generate Return value >> > documentation for any command that has a return value but hasn't >> > explicitly documented that return value.

Re: [RFC PATCH 0/3] translation performance improvements

2025-03-31 Thread Richard Henderson
On 3/31/25 10:54, Nicholas Piggin wrote: I've been struggling with these couple of performance issues with TB coherency. I almost thought deferring flush to icbi would be workable, buta note in the docs says that exceptions require TB to be coherent... I don't know what requires that, maybe it co

[PULL 20/23] target/sparc: Log unimplemented ASI load/store accesses

2025-03-31 Thread Philippe Mathieu-Daudé
When the cache-controller feature is not implemented, log potential ASI access as unimplemented. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Clément Chigot Message-Id: <20250325123927.74939-4-phi...@linaro.org> --- target/sparc/ldst_helper.c | 6 ++ 1 file changed, 6 insertions(+) d

[PULL 12/23] hw/nvram/xlnx-efuse: Do not expose as user-creatable

2025-03-31 Thread Philippe Mathieu-Daudé
This device is part of SoC components thus can not be created manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250325224310.8785-10-phi...@linaro.org> --- hw/nvram/xlnx-efuse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/nvram/xlnx-efuse.c b/h

[PULL 15/23] hw/char/bcm2835_aux: Fix incorrect interrupt ID when RX disabled

2025-03-31 Thread Philippe Mathieu-Daudé
From: Chung-Yi Chen Fix a misconfiguration issue in the read implementation of the AUX_MU_IIR_REG register. This issue can lead to a transmit interrupt being incorrectly interpreted as a receive interrupt when the receive interrupt is disabled and the receive FIFO holds valid bytes. The AUX_MU_I

Re: [RFC PATCH 1/3] accel/tcg: Option to permit incoherent translation block cache vs stores

2025-03-31 Thread Richard Henderson
On 3/31/25 10:54, Nicholas Piggin wrote: Add an option TARGET_HAS_LAZY_ICACHE that does not invalidate TBs upon store, but instead tracks that the icache has become incoherent, and provides a tb_flush_incoherent() function that the target may call to bring the TB back to coherency. We're not go

[PULL 07/23] hw/display/dm163: Add description

2025-03-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20250325224310.8785-4-phi...@linaro.org> --- hw/display/dm163.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/dm163.c b/hw/display/dm163.c index 75a91f62bd3..f6f0ec0c632 100644 --- a/hw/d

[PULL 09/23] hw/mips: Mark the "mipssim" machine as deprecated

2025-03-31 Thread Philippe Mathieu-Daudé
From: Thomas Huth We are not aware of anybody still using this machine, support for it has been withdrawn from the Linux kernel (i.e. there also won't be any future development anymore), and we are not aware of any binaries online that could be used for regression testing to avoid that the machin

Re: [PATCH 1/3] ipmi/bmc-sim: implement watchdog dont log flag

2025-03-31 Thread Nicholas Piggin
On Mon Mar 31, 2025 at 11:13 PM AEST, Corey Minyard wrote: > On Mon, Mar 31, 2025 at 10:57:22PM +1000, Nicholas Piggin wrote: >> If the dont-log flag is set in the 'timer use' field for the >> 'set watchdog' command, a watchdog timeout will not get logged as >> a timer use expiration. >> >> Signed

Re: [PATCH 1/3] ipmi/bmc-sim: implement watchdog dont log flag

2025-03-31 Thread Corey Minyard
On Mon, Mar 31, 2025 at 06:03:11PM -0500, Corey Minyard wrote: > On Tue, Apr 01, 2025 at 08:37:19AM +1000, Nicholas Piggin wrote: > > On Mon Mar 31, 2025 at 11:13 PM AEST, Corey Minyard wrote: > > > On Mon, Mar 31, 2025 at 10:57:22PM +1000, Nicholas Piggin wrote: > > >> If the dont-log flag is set

[PATCH-for-10.0] hw/core/machine.c: Fix -machine dumpdtb=file.dtb

2025-03-31 Thread Joel Stanley
In commit 8fd2518ef2f8 ("hw: Centralize handling of -machine dumpdtb option") the call to dump was moved with respect to the init of the machine. This resulted in the device tree missing parts of the machine description, depending on how they construct their device tree. The arm virt machine is m

[PULL 03/23] hw/arm/fsl-imx8mp: Derive struct FslImx8mpState from TYPE_SYS_BUS_DEVICE

2025-03-31 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Deriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon machine reset. It also makes the SoC implementation not user-creatable which can trigger the following crash: $ ./qemu-system-aarch64 -M virt -device fsl-imx8mp ** ERROR:../../devel/qemu/tcg/tcg

Re: [PATCH v2 15/42] include/exec: Split out mmap-lock.h

2025-03-31 Thread Pierrick Bouvier
On 3/18/25 14:31, Richard Henderson wrote: Split out mmap_lock, et al from page-protection.h to a new header. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson This breaks bsd-user which needs some extra includes as well. See here for details and a patch fixing it [1] (also att

Re: [PATCH v2 15/42] include/exec: Split out mmap-lock.h

2025-03-31 Thread Pierrick Bouvier
On 3/31/25 15:05, Pierrick Bouvier wrote: On 3/18/25 14:31, Richard Henderson wrote: Split out mmap_lock, et al from page-protection.h to a new header. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson This breaks bsd-user which needs some extra includes as well. See here for

Re: [PATCH-for-10.0 2/2] hw/misc/aspeed_scu: Correct minimum access size for AST2500 / AST2600

2025-03-31 Thread Andrew Jeffery
On Tue, 2025-04-01 at 01:04 +0200, Philippe Mathieu-Daudé wrote: > From: Joel Stanley > > Guest code was performing a byte load to the SCU MMIO region, leading > to the guest code crashing (it should be using proper accessors, but > that is not Qemu's bug). Hardware and the documentation[1] both

Re: [PATCH] mips: Mark the "mipssim" machine as deprecated

2025-03-31 Thread Philippe Mathieu-Daudé
On 21/1/25 11:36, Thomas Huth wrote: We are not aware of anybody still using this machine, support for it has been withdrawn from the Linux kernel (i.e. there also won't be any future development anymore), and we are not aware of any binaries online that could be used for regression testing to av

[PULL 21/23] target/mips: Revert TARGET_PAGE_BITS_VARY

2025-03-31 Thread Philippe Mathieu-Daudé
From: Richard Henderson Revert ee3863b9d41 and a08d60bc6c2b. The logic behind changing the system page size because of what the Loongson kernel "prefers" is flawed. In the Loongson-2E manual, section 5.5, it is clear that the cpu supports a 4k page size (along with many others). Similarly for

Re: [PATCH 3/5] python: update missing dependencies from minreqs

2025-03-31 Thread John Snow
On Thu, Mar 27, 2025 at 1:36 AM Markus Armbruster wrote: > John Snow writes: > > > On Wed, Mar 26, 2025 at 2:08 AM Markus Armbruster > wrote: > > > >> John Snow writes: > >> > >> > A few transitive dependencies were left floating; as a result, pip's > >> > dependency solver can pull in newer d

Re: [PATCH v3 00/29] single-binary: start make hw/arm/ common

2025-03-31 Thread Richard Henderson
On 3/24/25 23:58, Pierrick Bouvier wrote: This series focuses on removing compilation units duplication in hw/arm. We start with this architecture because it should not be too hard to transform it, and should give us some good hints on the difficulties we'll meet later. We first start by making

[PULL 05/23] hw/core/cpu: Use size_t for memory_rw_debug len argument

2025-03-31 Thread Philippe Mathieu-Daudé
From: Richard Henderson Match the prototype of cpu_memory_rw_debug(). Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-Id: <20250325224403.4011975-4-richard.hender...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/c

[PATCH-for-10.0 0/5] hw/arm/virt-acpi: Do not advertise disabled GIC ITS in MADT table

2025-03-31 Thread Philippe Mathieu-Daudé
GIC ITS can be disabled using '-M its=off'. When that occurs, it shouldn't be advertised in ACPI tables. Philippe Mathieu-Daudé (5): qtest/bios-tables-test: Add test for -M virt,its=off qtest/bios-tables-test: Whitelist aarch64/virt/APIC.its_off blob hw/arm/virt-acpi: Factor its_enabled() he

[PATCH-for-10.0 5/5] qtest/bios-tables-test: Update aarch64/virt/APIC.its_off blob

2025-03-31 Thread Philippe Mathieu-Daudé
Changes in the tables: @@ -1,32 +1,32 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20240927 (64-bit version) * Copyright (c) 2000 - 2023 Intel Corporation * * Disassembly of tests/data/acpi/aarch64/virt/APIC.its_off * * ACPI Data Table

[PATCH-for-10.0 2/5] qtest/bios-tables-test: Whitelist aarch64/virt/APIC.its_off blob

2025-03-31 Thread Philippe Mathieu-Daudé
Prepare for ACPI table change in aarch64/virt/APIC.its_off. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index d

Re: [PATCH v2 26/42] semihosting: Move user-only implementation out-of-line

2025-03-31 Thread Pierrick Bouvier
On 3/18/25 14:31, Richard Henderson wrote: Avoid testing CONFIG_USER_ONLY in semihost.h. The only function that's required is semihosting_enabled. Signed-off-by: Richard Henderson This breaks bsd-user, CONFIG_SEMIHOSTING is not defined in configs/targets/*bsd-user*, thus the user stub is not

[PATCH v3 05/10] target/i386/kvm: extract unrelated code out of kvm_x86_build_cpuid()

2025-03-31 Thread Dongli Zhang
The initialization of 'has_architectural_pmu_version', 'num_architectural_pmu_gp_counters', and 'num_architectural_pmu_fixed_counters' is unrelated to the process of building the CPUID. Extract them out of kvm_x86_build_cpuid(). In addition, use cpuid_find_entry() instead of cpu_x86_cpuid(), beca

[PULL 13/23] hw/scsi/lsi53c895a: fix memory leak in lsi_scsi_realize()

2025-03-31 Thread Philippe Mathieu-Daudé
From: Zheng Huang Address a memory leak bug in the usages of timer_del(). The issue arises from the incorrect use of the ambiguous timer API timer_del(), which does not free the timer object. The LeakSanitizer report this issue during fuzzing. The correct API timer_free() freed the timer object

Re: [PATCH v2 1/3] util: Add functions for s390x mmio read/write

2025-03-31 Thread Niklas Schnelle
On Fri, 2025-03-28 at 12:06 -0700, Farhan Ali wrote: > Starting with z15 (or newer) we can execute mmio > instructions from userspace. On older platforms > where we don't have these instructions available > we can fallback to using system calls to access > the PCI mapped resources. > > This patch

Re: [PATCH v2 4/5] target/riscv: pmp: exit csr writes early if value was not changed

2025-03-31 Thread LIU Zhiwei
On 2025/3/31 17:44, Loïc Lefort wrote: On Sat, Mar 29, 2025 at 10:03 AM LIU Zhiwei wrote: On 2025/3/14 03:30, Loïc Lefort wrote: > Signed-off-by: Loïc Lefort > Reviewed-by: Daniel Henrique Barboza > --- >   target/riscv/pmp.c | 22 +++--- >   1 fil

Re: [PATCH] hw/pci-host/gt64120.c: Fix PCI host bridge endianness handling

2025-03-31 Thread Philippe Mathieu-Daudé
On 29/3/25 12:30, Rakesh J wrote: Thanks for feedback on [PATCH v1]! I've posted v2 incorporating the suggestions:ve posted v2 incorporating your suggestions  Paolo: You pointed out the size issue with .min_access_size = 1 and .max_access_size = 4, where bswap32 was wrong for 2-byte accesse

Re: [PATCH-for-10.1 2/5] gdbstub: Remove ldtul_be_p() and ldtul_le_p() macros

2025-03-31 Thread Philippe Mathieu-Daudé
On 26/3/25 13:59, Alex Bennée wrote: Philippe Mathieu-Daudé writes: Last uses of ldtul_be_p() were removed in commit 78920b4ff2b ("target/sparc: Use explicit big-endian LD/ST API"), and of ldtul_le_p() in 39631d57d7c ("target/riscv: Use explicit little-endian LD/ST API"). Remove these legacy m

Re: Central repo for VirtIO conformance tests?

2025-03-31 Thread Stefan Hajnoczi
On Mon, Mar 31, 2025 at 6:39 AM Alex Bennée wrote: > So what do people think? Where would be a good place for common test > repository to live? Maintaining the tests alongside the VIRTIO spec seems like a good fit to me. Here is information on how to create a GitHub repo under the OASIS VIRTIO Te

Re: [PATCH v3 2/2] hw/pci-host: Remove unused pci_host_data_be_ops

2025-03-31 Thread Philippe Mathieu-Daudé
On 30/3/25 23:01, Rakesh Jeyasingh wrote: pci_host_data_be_ops became unused after endianness fixes Suggested-by: Paolo Bonzini Signed-off-by: Rakesh Jeyasingh Reviewed-by: Philippe Mathieu-Daudé --- hw/pci/pci_host.c | 6 -- include/hw/pci-host/dino.h | 4 inclu

Re: [PATCH] mips: Mark the "mipssim" machine as deprecated

2025-03-31 Thread Philippe Mathieu-Daudé
On 21/1/25 13:09, Jiaxun Yang wrote: 在2025年1月21日一月 下午12:07,Jiaxun Yang写道: 在2025年1月21日一月 上午10:36,Thomas Huth写道: We are not aware of anybody still using this machine, support for it has been withdrawn from the Linux kernel (i.e. there also won't be any future development anymore), and we are no

[PATCH 1/2] target/ppc: Big-core scratch register fix

2025-03-31 Thread Nicholas Piggin
The per-core SCRATCH0-7 registers are shared between big cores, which was missed in the big-core implementation. It is difficult to model well with the big-core == 2xPnvCore scheme we moved to, this fix uses the even PnvCore to store the scrach data. Also remove a stray log message that came in wi

[PATCH 2/2] target/ppc: Fix SPRC/SPRD SPRs for P9/10

2025-03-31 Thread Nicholas Piggin
Commit 60d30cff847 ("target/ppc: Move SPR indirect registers into PnvCore") was mismerged and moved the SPRs to power8-only, instead of power9/10-only. Fixes: 60d30cff847 ("target/ppc: Move SPR indirect registers into PnvCore") Cc: qemu-sta...@nongnu.org Signed-off-by: Nicholas Piggin --- target

Re: [PATCH] mips: Mark the "mipssim" machine as deprecated

2025-03-31 Thread Philippe Mathieu-Daudé
On 31/3/25 14:03, Philippe Mathieu-Daudé wrote: On 21/1/25 13:09, Jiaxun Yang wrote: 在2025年1月21日一月 下午12:07,Jiaxun Yang写道: 在2025年1月21日一月 上午10:36,Thomas Huth写道: We are not aware of anybody still using this machine, support for it has been withdrawn from the Linux kernel (i.e. there also won't be

[PATCH 3/3] ipmi/bmc-sim: Add 'Get Channel Info' command

2025-03-31 Thread Nicholas Piggin
Linux issues this command when booting a powernv machine. Signed-off-by: Nicholas Piggin --- include/hw/ipmi/ipmi.h | 14 +++ hw/ipmi/ipmi_bmc_sim.c | 56 -- hw/ipmi/ipmi_bt.c | 2 ++ hw/ipmi/ipmi_kcs.c | 1 + 4 files changed, 71 inserti

Re: [PATCH] alsaaudio: Set try-poll to false by default

2025-03-31 Thread BALATON Zoltan
On Sun, 23 Mar 2025, Christian Schoenebeck wrote: On Sunday, March 16, 2025 1:20:46 AM CET BALATON Zoltan wrote: Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to use an event loop instead of the audio timer. This works most of the time. But the poll event handler in the ALSA

[PATCH] pnv/xive: Expand implementation of XIVE physical thread enables

2025-03-31 Thread Nicholas Piggin
Clearing the physical thread enable register should reset the TCTX state and reject accesses to it. xive currently does not model this. skiboot firmware uses this register to reset the XIVE TIMA state (see xive_reset_enable_thread()), which can be in an arbitrary state e.g., when called by OPAL_XI

[PATCH v3 1/2] gdbstub: Improve physical memory access handling

2025-03-31 Thread Nicholas Piggin
Bring gdb's physical memory access handling up to speed with the CPU memory access, by setting MemTxAttribute.debug=1, and by checking for memory transaction errors. GDB with PhyMemMode will now report failure for memory access outside valid system memory addresses, and it is also able to write to

[PATCH v3 2/2] memory: suppress INVALID_MEM logs caused by debug access

2025-03-31 Thread Nicholas Piggin
Debugger-driven invalid memory accesses are not guest errors, so should not cause these error logs. Debuggers can access memory wildly, including access to addresses not specified by the user (e.g., gdb it might try to walk the stack or load target addresses to display disassembly). Failure is rep

[PATCH v3 0/2] gdb invalid memory access handling improvements

2025-03-31 Thread Nicholas Piggin
This adds .debug=1 attribute for GDB's phys mem access mode, adds memory transaction error handling for it so it reports cannot access memory instead of silent success, and silences warning logs for invalid memory access coming from the debugger. Changes since v1: - Move phys_memory_rw_debug() int

Re: [PATCH v2 2/3] include: Add a header to define PCI MMIO functions

2025-03-31 Thread Stefan Hajnoczi
On Fri, Mar 28, 2025 at 12:06:26PM -0700, Farhan Ali wrote: > Add a generic QEMU API for PCI MMIO reads/writes. > The functions access little endian memory and returns > the result in host cpu endianness. > > Signed-off-by: Farhan Ali > --- > include/qemu/pci-mmio.h | 116 +++

[PATCH] hw/9pfs: add cleanup operation for 9p-synth

2025-03-31 Thread Zheng Huang
Hi, This patch adds a cleanup operation for 9p-synth, which fixes a memory leak bug in synth_init() and other related operations. All child nodes of synth_root need to be freed before the entire filesystem exits. If you have any better ideas for the implementation, please feel free to share them.

[PATCH v3 3/4] hw/s390x: support migration of CPI data

2025-03-31 Thread Shalini Chellathurai Saroja
Register Control-Program Identification data with the live migration infrastructure. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Nina Schoetterl-Glausch --- hw/s390x/sclpcpi.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/s390x/sclpcpi.c b/hw/s3

[PATCH v3 2/4] hw/s390x: add Control-Program Identification to QOM

2025-03-31 Thread Shalini Chellathurai Saroja
Add Control-Program Identification data to the QEMU Object Model (QOM), along with the timestamp in which the data was received. Example: virsh # qemu-monitor-command vm --pretty '{ "execute": "qom-get", "arguments": { "path": "/machine/sclp/s390-sclp-event-facility/sclpcpi", "property": "control-

Re: [PATCH v2 1/1] goldfish_rtc: keep time offset when resetting

2025-03-31 Thread Philippe Mathieu-Daudé
On 21/3/25 23:12, Heinrich Schuchardt wrote: Currently resetting the leads to resynchronizing the Goldfish RTC with the system clock of the host. In real hardware an RTC reset would not change the wall time. Other RTCs like pl031 do not show this behavior. Move the synchronization of the RTC wit

Re: [PATCH 0/3] target/mips: Revert TARGET_PAGE_BITS_VARY and bug fixes

2025-03-31 Thread Philippe Mathieu-Daudé
On 28/3/25 18:55, Richard Henderson wrote: Richard Henderson (3): target/mips: Revert TARGET_PAGE_BITS_VARY target/mips: Require even maskbits in update_pagemask target/mips: Simplify and fix update_pagemask Series queued, thanks!

Re: [PATCH-for-10.0 00/12] hw: Categorize few devices and add their descriptions

2025-03-31 Thread Philippe Mathieu-Daudé
On 25/3/25 23:42, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (12): hw/block/m25p80: Categorize and add description hw/display/dm163: Add description hw/dma/i82374: Categorize and add description hw/misc/pll: Do not expose as user-creatable hw/nvram/xlnx-efuse: Do n

[PATCH] ppc: Implement print_info interface function for the CPU class

2025-03-31 Thread Nicholas Piggin
PPC CPU has TYPE_INTERRUPT_STATS_PROVIDER interface but it does not implement the print_info function. This causes 'info pic' to print a line like: Interrupt controller information not available for power10_v2.0-powerpc64-cpu. Add a print_info panel for CPUs with irq delivery status. Sig

[PATCH] target/i386: Fix model number of Zhaoxin YongFeng vCPU template

2025-03-31 Thread Ewan Hai
The model number was mistakenly set to 0x0b (11) in commit ff04bc1ac4. The correct value is 0x5b. This mistake occurred because the extended model bits in cpuid[eax=0x1].eax were overlooked, and only the base model was used. This patch corrects the model field. Signed-off-by: Ewan Hai --- targe

Re: [PATCH v3 6/7] memory: Attach MemoryAttributeManager to guest_memfd-backed RAMBlocks

2025-03-31 Thread Chenyi Qiang
On 3/14/2025 6:23 PM, Chenyi Qiang wrote: > > > On 3/14/2025 5:50 PM, David Hildenbrand wrote: >> On 14.03.25 10:30, Chenyi Qiang wrote: >>> >>> >>> On 3/14/2025 5:00 PM, David Hildenbrand wrote: On 14.03.25 09:21, Chenyi Qiang wrote: > Hi David & Alexey, Hi, >

Re: [PATCH v2 4/5] target/riscv: pmp: exit csr writes early if value was not changed

2025-03-31 Thread Loïc Lefort
On Sat, Mar 29, 2025 at 10:03 AM LIU Zhiwei wrote: > > On 2025/3/14 03:30, Loïc Lefort wrote: > > Signed-off-by: Loïc Lefort > > Reviewed-by: Daniel Henrique Barboza > > --- > > target/riscv/pmp.c | 22 +++--- > > 1 file changed, 15 insertions(+), 7 deletions(-) > > > > diff

Re: [PATCH 2/2] rust/hw/char/pl011/src/device: Implement logging

2025-03-31 Thread Daniel P . Berrangé
On Sun, Mar 30, 2025 at 10:58:57PM +0200, Bernhard Beschow wrote: > Now that there is logging support in Rust for QEMU, use it in the pl011 > device. > > Signed-off-by: Bernhard Beschow > --- > rust/hw/char/pl011/src/device.rs | 12 > 1 file changed, 8 insertions(+), 4 deletions(-)

Re: [PATCH 1/2] rust/qemu-api: Add initial logging support based on C API

2025-03-31 Thread Paolo Bonzini
On 3/30/25 22:58, Bernhard Beschow wrote: A qemu_log_mask!() macro is provided which expects similar arguments as the C version. However, the formatting works as one would expect from Rust. To maximize code reuse the macro is just a thin wrapper around qemu_log(). Also, just the bare minimum of

Re: [PATCH v8 3/7] migration: enable multifd and postcopy together

2025-03-31 Thread Fabiano Rosas
Prasad Pandit writes: > From: Prasad Pandit > > Enable Multifd and Postcopy migration together. > The migration_ioc_process_incoming() routine > checks magic value sent on each channel and > helps to properly setup multifd and postcopy > channels. > > The Precopy and Multifd threads work during

[PATCH 0/3] ipmi: bmc-sim improvements

2025-03-31 Thread Nicholas Piggin
These little things came up when looking at behaviour of IPMI with the bmc-sim implementation running the ppc powernv machine, and trying to clean up error messages and missing features. Thanks, Nick Nicholas Piggin (3): ipmi/bmc-sim: implement watchdog dont log flag ipmi/bmc-sim: add error h

Re: [PATCH v8 7/7] migration/ram: Implement save_postcopy_prepare()

2025-03-31 Thread Fabiano Rosas
Prasad Pandit writes: > From: Peter Xu > > Implement save_postcopy_prepare(), preparing for the enablement of both > multifd and postcopy. > > Please see the rich comment for the rationals. > > Signed-off-by: Peter Xu > Signed-off-by: Prasad Pandit > --- > migration/ram.c | 37 +++

[PATCH-for-10.1 2/2] hw/pci-host/designware: Use deposit/extract API

2025-03-31 Thread Philippe Mathieu-Daudé
Prefer the safer (less bug-prone) deposit/extract API to access lower/upper 32-bit of 64-bit registers. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/designware.c | 47 ++-- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/hw/pci-host/de

[RFC PATCH 1/3] accel/tcg: Option to permit incoherent translation block cache vs stores

2025-03-31 Thread Nicholas Piggin
Add an option TARGET_HAS_LAZY_ICACHE that does not invalidate TBs upon store, but instead tracks that the icache has become incoherent, and provides a tb_flush_incoherent() function that the target may call to bring the TB back to coherency. XXX: docs/devel/tcg.rst says that this is not permitted

[RFC PATCH 3/3] target/ppc: Allow goto-tb on fixed real mode translations

2025-03-31 Thread Nicholas Piggin
Fixed translations (mapping and protections unchanged) do not have to restrict TB chaining to within a target page. Hypervisor-real mode is a fixed translation. TODO: Supervisor-real mode in spapr should also be a fixed translation. --- target/ppc/translate.c | 20 1 file ch

[RFC PATCH 0/3] translation performance improvements

2025-03-31 Thread Nicholas Piggin
I've been struggling with these couple of performance issues with TB coherency. I almost thought deferring flush to icbi would be workable, buta note in the docs says that exceptions require TB to be coherent... I don't know what requires that, maybe it could be worked around? Another thing is Pow

Re: [PATCH v2 3/3] block/nvme: Use QEMU PCI MMIO API

2025-03-31 Thread Stefan Hajnoczi
On Fri, Mar 28, 2025 at 12:06:27PM -0700, Farhan Ali wrote: > Use the QEMU PCI MMIO functions to read/write > to NVMe registers, rather than directly accessing > them. > > Signed-off-by: Farhan Ali > --- > block/nvme.c | 37 + > 1 file changed, 21 insertions(+

Re: [PATCH-for-10.1 2/2] hw/pci-host/designware: Use deposit/extract API

2025-03-31 Thread Gustavo Romero
Hi Phil, On 3/31/25 12:20, Philippe Mathieu-Daudé wrote: Prefer the safer (less bug-prone) deposit/extract API to access lower/upper 32-bit of 64-bit registers. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/designware.c | 47 ++-- 1 file changed,

Re: [PATCH] hw/scsi/lsi53c895a: fix memory leak in lsi_scsi_realize()

2025-03-31 Thread Philippe Mathieu-Daudé
On 28/3/25 04:21, Zheng Huang wrote: Hi, This patch addresses a memory leak bug in the usages of `timer_del()`. The issue arisesfrom the incorrect use of the ambiguous timer API `timer_del()`, which does not free the timer object. The LeakSanitizer report this issue during fuzzing. The correct AP

Re: [PATCH] hw/char/bcm2835_aux: Fix incorrect interrupt ID when RX disabled

2025-03-31 Thread Philippe Mathieu-Daudé
On 28/3/25 13:37, Chung-Yi Chen wrote: This patch fixes a misconfiguration issue in the read implementation of the AUX_MU_IIR_REG register. This issue can lead to a transmit interrupt being incorrectly interpreted as a receive interrupt when the receive interrupt is disabled and the receive FIFO

Re: [PATCH] hw/ufs: free irq on exit

2025-03-31 Thread Philippe Mathieu-Daudé
On 29/3/25 12:47, Zheng Huang wrote: Hi, This patch fixes a memory leak bug in `ufs_init_pci()`. `u->irq` is not freed in `ufs_exit()`. Signed-off-by: Zheng Huang --- hw/ufs/ufs.c | 3 +++ 1 file changed, 3 insertions(+) Queued to hw-misc, thanks!

Re: Central repo for VirtIO conformance tests?

2025-03-31 Thread Alex Bennée
Stefan Hajnoczi writes: > On Mon, Mar 31, 2025 at 6:39 AM Alex Bennée wrote: >> The unikernel utilizes rcore-os's no_std VirtIO drivers to discover and >> initialize a range of VirtIO devices. > > https://github.com/rcore-os/virtio-drivers > > I noticed that VIRTIO_F_VERSION_1, VIRTIO_F_RING_PAC

Re: [PATCH 1/3] target/mips: Revert TARGET_PAGE_BITS_VARY

2025-03-31 Thread Philippe Mathieu-Daudé
On 28/3/25 18:55, Richard Henderson wrote: Revert ee3863b9d41 and a08d60bc6c2b. The logic behind changing the system page size because of what the Loongson kernel "prefers" is flawed. In the Loongson-2E manual, section 5.5, it is clear that the cpu supports a 4k page size (along with many other

Re: [PATCH for-10.1 30/32] vfio: Rename VFIO dirty tracking services

2025-03-31 Thread Joao Martins
On 21/03/2025 11:22, Cédric Le Goater wrote: > On 3/19/25 13:21, Joao Martins wrote: >> On 18/03/2025 09:54, Cédric Le Goater wrote: >>> Rename these routines : >>> >>>    vfio_devices_all_device_dirty_tracking_started -> >>> vfio_dirty_tracking_devices_is_started_all >>>    vfio_devices_all_dirty_

Re: [PATCH 2/3] target/mips: Require even maskbits in update_pagemask

2025-03-31 Thread Philippe Mathieu-Daudé
On 28/3/25 18:55, Richard Henderson wrote: The number of bits set in PageMask must be even. Fixes: d40b55bc1b86 ("target/mips: Fix PageMask with variable page size") Signed-off-by: Richard Henderson --- target/mips/tcg/system/cp0_helper.c | 23 --- 1 file changed, 8 inser

Re: [PATCH 3/3] target/mips: Simplify and fix update_pagemask

2025-03-31 Thread Philippe Mathieu-Daudé
On 28/3/25 18:55, Richard Henderson wrote: When update_pagemask was split from helper_mtc0_pagemask, we failed to actually write to the new parameter but continue to write to env->CP0_PageMask. Thus the use within page_table_walk_refill modifies cpu state and not the local variable as expected.

Re: [PATCH] hw/sd/sdhci: free irq on exit

2025-03-31 Thread Philippe Mathieu-Daudé
On 28/3/25 10:49, Zheng Huang wrote: Hi, This patch fixes a memory leak bug in `sdhci_pci_realize()`. `s->irq` is not freed in `sdhci_pci_exit()`. Signed-off-by: Zheng Huang --- hw/sd/sdhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) Queued to hw-misc, thanks!

Re: [PATCH v4] target/ppc: Deprecate Power8E and Power8NVL

2025-03-31 Thread Philippe Mathieu-Daudé
On 30/3/25 23:10, Aditya Gupta wrote: Power8E and Power8NVL variants are not of much use in QEMU now, and not being maintained either. Newer skiboot might not be able to boot Power8NVL since skiboot v7.0 Deprecate the 8E and 8NVL variants. After deprecation, QEMU will print a warning like belo

Re: [PATCH v3] target/ppc: Deprecate Power8E and Power8NVL

2025-03-31 Thread Aditya Gupta
On 25/03/30 10:24AM, Philippe Mathieu-Daudé wrote: > On 29/3/25 19:04, Aditya Gupta wrote: > > <...snip...> > > > > +if (_deprecation_note) { > > \ > > +cc->deprecation_note = _deprecation_note; > > \ > > As men

Re: [PATCH 2/2] target/ppc: Fix SPRC/SPRD SPRs for P9/10

2025-03-31 Thread Philippe Mathieu-Daudé
On 31/3/25 14:03, Nicholas Piggin wrote: Commit 60d30cff847 ("target/ppc: Move SPR indirect registers into PnvCore") was mismerged and moved the SPRs to power8-only, instead of power9/10-only. Fixes: 60d30cff847 ("target/ppc: Move SPR indirect registers into PnvCore") Cc: qemu-sta...@nongnu.org

Re: Central repo for VirtIO conformance tests?

2025-03-31 Thread Daniel P . Berrangé
On Mon, Mar 31, 2025 at 07:52:33AM -0400, Stefan Hajnoczi wrote: > On Mon, Mar 31, 2025 at 6:39 AM Alex Bennée wrote: > > So what do people think? Where would be a good place for common test > > repository to live? > > Maintaining the tests alongside the VIRTIO spec seems like a good fit > to me.

  1   2   >