[PATCH v18 07/14] pcie_sriov: Do not manually unrealize

2025-01-03 Thread Akihiko Odaki
A device gets automatically unrealized when being unparented. Signed-off-by: Akihiko Odaki --- hw/pci/pcie_sriov.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c index e9b23221d713..499becd5273f 100644 --- a/hw/pci/pcie_sriov.c +++ b/hw/pci/pcie_

[PATCH v18 12/14] pcie_sriov: Register VFs after migration

2025-01-03 Thread Akihiko Odaki
pcie_sriov doesn't have code to restore its state after migration, but igb, which uses pcie_sriov, naively claimed its migration capability. Add code to register VFs after migration and fix igb migration. Fixes: 3a977deebe6b ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki --- in

[PATCH v18 08/14] pcie_sriov: Ensure VF addr does not overflow

2025-01-03 Thread Akihiko Odaki
pci_new() aborts when creating a VF with addr >= PCI_DEVFN_MAX. Signed-off-by: Akihiko Odaki --- docs/pcie_sriov.txt | 8 +--- include/hw/pci/pcie_sriov.h | 5 +++-- hw/net/igb.c| 10 +++--- hw/nvme/ctrl.c | 22 ++ hw/pci/pcie_sr

[PATCH v18 11/14] pcie_sriov: Remove num_vfs from PCIESriovPF

2025-01-03 Thread Akihiko Odaki
num_vfs is not migrated so use PCI_SRIOV_CTRL_VFE and PCI_SRIOV_NUM_VF instead. Signed-off-by: Akihiko Odaki --- include/hw/pci/pcie_sriov.h | 1 - hw/pci/pcie_sriov.c | 38 +++--- hw/pci/trace-events | 2 +- 3 files changed, 28 insertions(+), 13

[PATCH v18 14/14] hw/qdev: Remove opts member

2025-01-03 Thread Akihiko Odaki
It is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster --- include/hw/qdev-core.h | 4 hw/core/qdev.c | 1 - system/qdev-monitor.c | 12 +++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/i

[PATCH v18 05/14] s390x/pci: Allow plugging SR-IOV devices

2025-01-03 Thread Akihiko Odaki
The guest cannot use VFs due to the lack of multifunction support but can use PFs. Signed-off-by: Akihiko Odaki --- hw/s390x/s390-pci-bus.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 8c5eb69f7d76..c396d55c72

[PATCH v18 13/14] hw/pci: Use -1 as the default value for rombar

2025-01-03 Thread Akihiko Odaki
vfio_pci_size_rom() distinguishes whether rombar is explicitly set to 1 by checking dev->opts, bypassing the QOM property infrastructure. Use -1 as the default value for rombar to tell if the user explicitly set it to 1. The property is also converted from unsigned to signed. -1 is signed so it is

[PATCH v18 06/14] s390x/pci: Check for multifunction after device realization

2025-01-03 Thread Akihiko Odaki
The SR-IOV PFs set the multifunction bit during device realization so check them after that. There is no functional change because we explicitly ignore the multifunction bit for SR-IOV devices. Signed-off-by: Akihiko Odaki --- hw/s390x/s390-pci-bus.c | 28 +--- 1 file cha

[PATCH v18 10/14] pcie_sriov: Release VFs failed to realize

2025-01-03 Thread Akihiko Odaki
Release VFs failed to realize just as we do in unregister_vfs(). Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization (SR/IOV)") Signed-off-by: Akihiko Odaki --- hw/pci/pcie_sriov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sri

[PATCH v18 09/14] pcie_sriov: Reuse SR-IOV VF device instances

2025-01-03 Thread Akihiko Odaki
Disable SR-IOV VF devices by reusing code to power down PCI devices instead of removing them when the guest requests to disable VFs. This allows to realize devices and report VF realization errors at PF realization time. Signed-off-by: Akihiko Odaki --- include/hw/pci/pci.h| 5 --- incl

[PATCH v18 03/14] hw/ppc/spapr_pci: Do not reject VFs created after a PF

2025-01-03 Thread Akihiko Odaki
A PF may automatically create VFs and the PF may be function 0. Signed-off-by: Akihiko Odaki Reviewed-by: Shivaprasad G Bhat Tested-by: Shivaprasad G Bhat --- hw/ppc/spapr_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index

[PATCH v18 04/14] s390x/pci: Avoid creating zpci for VFs

2025-01-03 Thread Akihiko Odaki
VFs are automatically created by PF, and creating zpci for them will result in unexpected usage of fids. Currently QEMU does not support multifunction for s390x so we don't need zpci for VFs anyway. Signed-off-by: Akihiko Odaki --- hw/s390x/s390-pci-bus.c | 21 +++-- 1 file chang

[PATCH v18 02/14] hw/ppc/spapr_pci: Do not create DT for disabled PCI device

2025-01-03 Thread Akihiko Odaki
Disabled means it is a disabled SR-IOV VF and hidden from the guest. Do not create DT when starting the system and also keep the disabled PCI device not linked to DRC, which generates DT in case of hotplug. Signed-off-by: Akihiko Odaki Reviewed-by: Shivaprasad G Bhat Tested-by: Shivaprasad G Bhat

[PATCH v18 01/14] hw/pci: Rename has_power to enabled

2025-01-03 Thread Akihiko Odaki
The renamed state will not only represent powering state of PFs, but also represent SR-IOV VF enablement in the future. Signed-off-by: Akihiko Odaki --- include/hw/pci/pci.h| 7 ++- include/hw/pci/pci_device.h | 2 +- hw/pci/pci.c| 14 +++--- hw/pci/pci_host

[PATCH v18 00/14] hw/pci: SR-IOV related fixes and improvements

2025-01-03 Thread Akihiko Odaki
Supersedes: <20240714-rombar-v2-0-af1504ef5...@daynix.com> ("[PATCH v2 0/4] hw/pci: Convert rom_bar into OnOffAuto") I submitted a RFC series[1] to add support for SR-IOV emulation to virtio-net-pci. During the development of the series, I fixed some trivial bugs and made improvements that I think

[PATCH v4 1/2] virtio-net: Convert feature properties to OnOffAuto

2025-01-03 Thread Akihiko Odaki
Some features are not always available, and virtio-net used to disable them when not available even if the corresponding properties were explicitly set to "on". Convert feature properties to OnOffAuto so that the user can explicitly tell QEMU to automatically select the value by setting them "auto

[PATCH v4 0/2] virtio-net: Convert feature properties to OnOffAuto

2025-01-03 Thread Akihiko Odaki
Based-on: <20250104-virtio-v3-0-63ef70e9d...@daynix.com> ("[PATCH v3 0/3] virtio: Convert feature properties to OnOffAuto") Some features are not always available, and virtio-net used to disable them when not available even if the corresponding properties were explicitly set to "on". Convert feat

[PATCH v4 2/2] virtio-net: Report RSS warning at device realization

2025-01-03 Thread Akihiko Odaki
Warning about RSS fallback at device realization allows the user to notice the configuration problem early. Signed-off-by: Akihiko Odaki --- hw/net/virtio-net.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 6b2104

[PATCH v5 2/2] memory: Do not create circular reference with subregion

2025-01-03 Thread Akihiko Odaki
memory_region_update_container_subregions() used to call memory_region_ref(), which creates a reference to the owner of the subregion, on behalf of the owner of the container. This results in a circular reference if the subregion and container have the same owner. memory_region_ref() creates a ref

[PATCH v3 0/3] virtio: Convert feature properties to OnOffAuto

2025-01-03 Thread Akihiko Odaki
This series was spun off from: "[PATCH 0/3] virtio-net: Convert feature properties to OnOffAuto" (https://patchew.org/QEMU/20240714-auto-v3-0-e27401aab...@daynix.com/) Some features are not always available with vhost. Legacy features are not available with vp_vdpa in particular. virtio devices us

[PATCH v3 3/3] virtio: Convert feature properties to OnOffAuto

2025-01-03 Thread Akihiko Odaki
Some features are not always available with vhost. Legacy features are not available with vp_vdpa in particular. virtio devices used to disable them when not available even if the corresponding properties were explicitly set to "on". QEMU already has OnOffAuto type, which includes the "auto" value

[PATCH v3 2/3] qdev-properties: Add DEFINE_PROP_ON_OFF_AUTO_BIT64()

2025-01-03 Thread Akihiko Odaki
DEFINE_PROP_ON_OFF_AUTO_BIT64() corresponds to DEFINE_PROP_ON_OFF_AUTO() as DEFINE_PROP_BIT64() corresponds to DEFINE_PROP_BOOL(). The difference is that DEFINE_PROP_ON_OFF_AUTO_BIT64() exposes OnOffAuto instead of bool. Signed-off-by: Akihiko Odaki --- include/hw/qdev-properties.h | 18

[PATCH v3 1/3] qdev-properties: Accept bool for OnOffAuto

2025-01-03 Thread Akihiko Odaki
Accept bool literals for OnOffAuto properties for consistency with bool properties. This enables users to set the "on" or "off" value in a uniform syntax without knowing whether the "auto" value is accepted. This behavior is especially useful when converting an existing bool property to OnOffAuto o

[PATCH v5 0/2] Fix check-qtest-ppc64 sanitizer errors

2025-01-03 Thread Akihiko Odaki
I saw various sanitizer errors when running check-qtest-ppc64. While I could just turn off sanitizers, I decided to tackle them this time. Unfortunately, GLib versions older than 2.81.0 do not free test data in some cases so some sanitizer errors remain. All sanitizer errors will be gone with this

[PATCH v5 1/2] memory: Update inline documentation

2025-01-03 Thread Akihiko Odaki
Do not refer to "memory region's reference count" - Now MemoryRegions do have their own reference counts, but they will not be used when their owners are not themselves. However, the documentation of memory_region_ref() says it adds "1 to a memory re

[PATCH v5] target/arm: Always add pmu property for Armv7-A/R+

2025-01-03 Thread Akihiko Odaki
kvm-steal-time and sve properties are added for KVM even if the corresponding features are not available. Always add pmu property for Armv7+. Note that the property is added only for Armv7-A/R+ as QEMU currently emulates PMU only for such versions, and a different version may have a different defin

[PATCH v4] hw/core: Unify hotplug decision logic

2025-01-03 Thread Akihiko Odaki
Commit 03fcbd9dc508 ("qdev: Check for the availability of a hotplug controller before adding a device") says: > The qdev_unplug() function contains a g_assert(hotplug_ctrl) > statement, so QEMU crashes when the user tries to device_add + > device_del a device that does not have a corresponding hotp

Re: [RFC PATCH 2/6] target/hexagon: Add Kconfig file

2025-01-03 Thread Brian Cain
On 1/3/2025 5:17 PM, Philippe Mathieu-Daudé wrote: Keep the Hexagon target in line with others. Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Brian Cain target/Kconfig | 1 + target/hexagon/Kconfig | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 target

Re: [PATCH] MAINTAINERS: Remove myself as Avocado Framework reviewer

2025-01-03 Thread BALATON Zoltan
On Sat, 4 Jan 2025, Philippe Mathieu-Daudé wrote: While I was very enthusiast when Avocado was presented to I think 'enthusiastic' would be correct here. Regards, BALATON Zoltan the QEMU community and pushed forward to have it integrated, time passed and I lost interest. Be honest, remove my

Re: [PATCH v2 0/2] qtest: Remove uses of 'first_cpu'

2025-01-03 Thread Philippe Mathieu-Daudé
On 3/1/25 13:26, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: Hi Fabiano, On 12/12/24 00:37, Philippe Mathieu-Daudé wrote: Replace first_cpu->as by address_space_memory. Philippe Mathieu-Daudé (2): system/qtest: Remove uses of 'first_cpu' qtest/fuzz: Remove uses of 'first_cpu

[PATCH] MAINTAINERS: Remove myself as Avocado Framework reviewer

2025-01-03 Thread Philippe Mathieu-Daudé
While I was very enthusiast when Avocado was presented to the QEMU community and pushed forward to have it integrated, time passed and I lost interest. Be honest, remove my R: tag to not give fake expectation I'd review patches related to Avocado anymore. Signed-off-by: Philippe Mathieu-Daudé ---

[RFC PATCH 1/6] target: Only link capstone to targets requiring it

2025-01-03 Thread Philippe Mathieu-Daudé
No need to link capstone to targets which don't use it. Signed-off-by: Philippe Mathieu-Daudé --- disas/meson.build| 1 - target/arm/meson.build | 1 + target/i386/meson.build | 1 + target/ppc/meson.build | 1 + target/s390x/meson.build | 1 + 5 files changed, 4 insertions(+), 1 de

[RFC PATCH 5/6] Kconfig: Expose host CONFIG_CAPSTONE definition

2025-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 1 + Kconfig.host | 3 +++ 2 files changed, 4 insertions(+) diff --git a/meson.build b/meson.build index a35ef579c28..28f9120a781 100644 --- a/meson.build +++ b/meson.build @@ -3224,6 +3224,7 @@ host_kconfig = \ (have_ivshmem ? ['CONFIG

[RFC PATCH 2/6] target/hexagon: Add Kconfig file

2025-01-03 Thread Philippe Mathieu-Daudé
Keep the Hexagon target in line with others. Signed-off-by: Philippe Mathieu-Daudé --- target/Kconfig | 1 + target/hexagon/Kconfig | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 target/hexagon/Kconfig diff --git a/target/Kconfig b/target/Kconfig index d0c7b59d9c7..17cfb46

[RFC PATCH 4/6] disas: Have each system target select its disassembler

2025-01-03 Thread Philippe Mathieu-Daudé
No change for host or user emulation. For system emulation, each target explicitly selects its disassembler. This change allows selecting more than two (host + target) disassemblers in a binary supporting multiple targets. Signed-off-by: Philippe Mathieu-Daudé --- meson.build |

[RFC PATCH 3/6] target/xtensa: Move xtensa-isa.c to common_ss[]

2025-01-03 Thread Philippe Mathieu-Daudé
The Xtensa disassembler (selected with CONFIG_XTENSA_DIS=y) uses methods defined in xtensa-isa.c, so this file has to be compiled when the disassembler is linked. Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --g

[RFC PATCH 6/6] disas: Select capstone targets by default

2025-01-03 Thread Philippe Mathieu-Daudé
When capstone is available, we get ARM/X86/PPC/S390X disassemblers in common_ss[] for free. Signed-off-by: Philippe Mathieu-Daudé --- disas/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/disas/Kconfig b/disas/Kconfig index 1d2c397c953..8af8ecd5c81 100644 --- a/disas/Kconfig +++

[RFC PATCH 0/6] disas: Allow linking multiple disassemblers in a heterogeneous binary

2025-01-03 Thread Philippe Mathieu-Daudé
Hi, This series is an experiment to link multiple disassembler in the same system binary. At least in my prototype I wanted to get 3: x86 host and microblaze/xtensa targets. Instead of having meson.build select one pair of host+target, we let targets to be selected by Kconfig. By default each tar

Re: [PULL 00/17] Migration patches for 2024-12-17

2025-01-03 Thread Fabiano Rosas
Fabiano Rosas writes: > Stefan Hajnoczi writes: > >> On Fri, 3 Jan 2025 at 13:32, Fabiano Rosas wrote: >>> >>> Thomas Huth writes: >>> >>> > On 20/12/2024 17.28, Peter Xu wrote: >>> >> On Thu, Dec 19, 2024 at 03:53:22PM -0300, Fabiano Rosas wrote: >>> >>> Stefan Hajnoczi writes: >>> >>> >>> >

Re: [PULL 00/17] Migration patches for 2024-12-17

2025-01-03 Thread Fabiano Rosas
Stefan Hajnoczi writes: > On Fri, 3 Jan 2025 at 13:32, Fabiano Rosas wrote: >> >> Thomas Huth writes: >> >> > On 20/12/2024 17.28, Peter Xu wrote: >> >> On Thu, Dec 19, 2024 at 03:53:22PM -0300, Fabiano Rosas wrote: >> >>> Stefan Hajnoczi writes: >> >>> >> Hi Fabiano, >> Please take

Re: [PATCH v9 09/12] migration/multifd: Enable DSA offloading in multifd sender path.

2025-01-03 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > Multifd sender path gets an array of pages queued by the migration > thread. It performs zero page checking on every page in the array. > The pages are classfied as either a zero page or a normal page. This > change uses Intel DSA to offload the zero pag

Re: [PATCH v9 10/12] util/dsa: Add unit test coverage for Intel DSA task submission and completion.

2025-01-03 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > * Test DSA start and stop path. > * Test DSA configure and cleanup path. > * Test DSA task submission and completion path. > > Signed-off-by: Bryan Zhang > Signed-off-by: Hao Xiang > Signed-off-by: Yichen Wang Reviewed-by: Fabiano Rosas

Re: [PULL 00/17] Migration patches for 2024-12-17

2025-01-03 Thread Stefan Hajnoczi
On Fri, 3 Jan 2025 at 13:32, Fabiano Rosas wrote: > > Thomas Huth writes: > > > On 20/12/2024 17.28, Peter Xu wrote: > >> On Thu, Dec 19, 2024 at 03:53:22PM -0300, Fabiano Rosas wrote: > >>> Stefan Hajnoczi writes: > >>> > Hi Fabiano, > Please take a look at this CI failure: > > >

Re: [PATCH 2/3] vfio/pci: introduce config_offset field in VFIOConfigMirrorQuirk

2025-01-03 Thread Alex Williamson
On Tue, 31 Dec 2024 23:19:52 +0800 Tomita Moeko wrote: > Device may only expose a specific portion of PCI config space through a > region in a BAR, such behavior is seen in igd GGC and BDSM mirrors in > BAR0. To handle these, config_offset is introduced to allow mirroring > arbitrary region in PC

Re: [PATCH 3/3] vfio/igd: use VFIOConfigMirrorQuirk for mirrored registers

2025-01-03 Thread Alex Williamson
On Tue, 31 Dec 2024 23:19:53 +0800 Tomita Moeko wrote: > With the introduction of config_offset field, VFIOConfigMirrorQuirk can > now be used for those mirrored register in igd bar0. This eliminates > the need for the macro intoduced in 1a2623b5c9e7 ("vfio/igd: add macro > for declaring mirrored

[PATCH] MAINTAINERS: Remove myself from reviewers

2025-01-03 Thread wainersm
From: Wainer dos Santos Moschetta The time I spent contributing to QEMU was great, but I've not been active for a long time now. So removing myself from the reviewers list of "Integration Testing with the Avocado framework" and "Build and test automation" subsystems. Signed-off-by: Wainer dos Sa

Re: [PULL 00/17] Migration patches for 2024-12-17

2025-01-03 Thread Fabiano Rosas
Thomas Huth writes: > On 20/12/2024 17.28, Peter Xu wrote: >> On Thu, Dec 19, 2024 at 03:53:22PM -0300, Fabiano Rosas wrote: >>> Stefan Hajnoczi writes: >>> Hi Fabiano, Please take a look at this CI failure: >>> MALLOC_PERTURB_=61 QTEST_QEMU_BINARY=./qemu-system-s390x >>>

Re: [PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG)

2025-01-03 Thread Peter Xu
On Fri, Jan 03, 2025 at 06:16:38PM +0100, Philippe Mathieu-Daudé wrote: > On 3/1/25 16:15, Daniel P. Berrangé wrote: > > On Fri, Jan 03, 2025 at 04:05:58PM +0100, Philippe Mathieu-Daudé wrote: > > > As Daniel suggested [*]: > > > > > > > We should consider to rank HVF above TCG, on the basis > > >

Re: [PULL 0/8] QTest patches for 2025-01-02

2025-01-03 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH 3/5] aspeed: Introduce AST27x0 SoC with Cortex-M4 support

2025-01-03 Thread Cédric Le Goater
Hello Steven, [ ... ] +struct Aspeed27x0CM4SoCState { +AspeedSoCState parent; + +ARMv7MState armv7m; Why not use Aspeed10x0SoCState instead ? The AST2700's CM4 is not part of the AST10x0 series SoC. ok. These are different HW designs. However, since the structure is identical, I

Re: [PATCH 2/5] aspeed: ast27x0: Map unimplemented devices in SoC memory

2025-01-03 Thread Cédric Le Goater
On 1/3/25 10:57, Steven Lee wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Sent: Friday, January 3, 2025 5:44 PM To: Steven Lee ; Peter Maydell ; Troy Lee ; Jamin Lin ; Andrew Jeffery ; Joel Stanley ; open list:ASPEED BMCs ; open list:All patches CC here Cc: Troy Lee ; Yu

[PATCH v7 2/4] tests/qtest/boot-serial-test: Reduce for() loop in PL011 tests

2025-01-03 Thread Philippe Mathieu-Daudé
Since registers are not modified, we don't need to refill their values. Directly jump to the previous store instruction to keep filling the TXDAT register. The equivalent C code remains: while (true) { *UART_DATA = 'T'; } Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Hend

[PATCH v7 1/4] tests/qtest/boot-serial-test: Improve ASM comments of PL011 tests

2025-01-03 Thread Philippe Mathieu-Daudé
Re-indent ASM comments adding the 'loop:' label. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Fabiano Rosas --- tests/qtest/boot-serial-test.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/qtest/boot-serial-tes

Re: [PATCH 1/2] hw/s390x: Declare loadparm as char[LOADPARM_LEN]

2025-01-03 Thread Philippe Mathieu-Daudé
On 3/1/25 18:17, Thomas Huth wrote: On 30/12/2024 18.02, Philippe Mathieu-Daudé wrote: ping for this single cleanup patch? On 20/11/24 09:52, Philippe Mathieu-Daudé wrote: "hw/s390x/ipl/qipl.h" defines loadparm[] length as LOADPARM_LEN, use that instead of the magic '8' value. Use a char type

[PATCH v7 4/4] tests/qtest/boot-serial-test: Initialize PL011 Control register

2025-01-03 Thread Philippe Mathieu-Daudé
The tests using the PL011 UART of the virt and raspi machines weren't properly enabling the UART and its transmitter previous to sending characters. Follow the PL011 manual initialization recommendation by setting the proper bits of the control register. Update the ASM code prefixing: *UART_CTR

[PATCH v7 0/4] tests/qtest: Update tests using PL011 UART

2025-01-03 Thread Philippe Mathieu-Daudé
(Series fully reviewed) Since v6: - Corrected ASM comment (Fabiano) This series split a patch [*] which was previously posted too compact in multiple trivial steps. The last patch initializes the PL011 Control register, enabling the UART and its transmit channel, before using it to send the 'T' c

[PATCH v7 3/4] tests/qtest/boot-serial-test: Reorder pair of instructions in PL011 test

2025-01-03 Thread Philippe Mathieu-Daudé
In the next commit we are going to use a different value for the $w1 register, maintaining the same $x2 value. In order to keep the next commit trivial to review, set $x2 before $w1. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Fabiano Rosas --- tests/qtest

Re: [PATCH 1/2] hw/s390x: Declare loadparm as char[LOADPARM_LEN]

2025-01-03 Thread Thomas Huth
On 30/12/2024 18.02, Philippe Mathieu-Daudé wrote: ping for this single cleanup patch? On 20/11/24 09:52, Philippe Mathieu-Daudé wrote: "hw/s390x/ipl/qipl.h" defines loadparm[] length as LOADPARM_LEN, use that instead of the magic '8' value. Use a char type for char buffer. Signed-off-by: Phil

Re: [PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG)

2025-01-03 Thread Philippe Mathieu-Daudé
On 3/1/25 16:15, Daniel P. Berrangé wrote: On Fri, Jan 03, 2025 at 04:05:58PM +0100, Philippe Mathieu-Daudé wrote: As Daniel suggested [*]: We should consider to rank HVF above TCG, on the basis that HW acceleration is faster and should provide a host<->guest security boundary that we don't cl

[PATCH 4/5] semihosting/console: Avoid including 'cpu.h'

2025-01-03 Thread Philippe Mathieu-Daudé
The CPUState structure is declared in "hw/core/cpu.h", the EXCP_HALTED definition in "exec/cpu-common.h". Both headers are indirectly include by "cpu.h". In order to remove "cpu.h" from "semihosting/console.h", explicitly include them in console.c, otherwise we'd get: ../semihosting/console.c:88

[PATCH 3/5] semihosting/arm-compat: Include missing 'cpu.h' header

2025-01-03 Thread Philippe Mathieu-Daudé
ARM semihosting implementations in "common-semi-target.h" must de-reference the target CPUArchState, which is declared in each target "cpu.h" header. Include it in order to avoid when refactoring: In file included from ../../semihosting/arm-compat-semi.c:169: ../target/riscv/common-semi-target

[PATCH 2/5] semihosting/uaccess: Include missing 'exec/cpu-all.h' header

2025-01-03 Thread Philippe Mathieu-Daudé
TLB_INVALID_MASK is defined in "exec/cpu-all.h". Include it in order to avoid when refactoring: ../semihosting/uaccess.c:41:21: error: use of undeclared identifier 'TLB_INVALID_MASK' 41 | if (flags & TLB_INVALID_MASK) { | ^ Signed-off-by: Philippe Mathi

[PATCH 5/5] semihosting/meson: Build config.o and console.o once

2025-01-03 Thread Philippe Mathieu-Daudé
config.c and console.c don't use any target specific headers anymore, move them from specific_ss[] to system_ss[] so they are built once, but will also be linked once, removing global symbol clash in a single QEMU binary. Signed-off-by: Philippe Mathieu-Daudé --- semihosting/meson.build | 9

[PATCH 0/5] semihosting: Reduce target specific code

2025-01-03 Thread Philippe Mathieu-Daudé
This series makes semihosting config.c and console.c target agnostic, building them once, removing symbol collision of the following functions in the single binary: - qemu_semihosting_chardev_init - qemu_semihosting_config_options - qemu_semihosting_config_opts - qemu_semihosting_enable - sem

[PATCH 1/5] semihosting/syscalls: Include missing 'exec/cpu-defs.h' header

2025-01-03 Thread Philippe Mathieu-Daudé
target_ulong is defined in each target "cpu-param.h", itself included by "exec/cpu-defs.h". Include the latter in order to avoid when refactoring: include/semihosting/syscalls.h:26:24: error: unknown type name 'target_ulong' 26 |target_ulong fname, target_ulong fname

Re: [PATCH] Remove the deprecated "-runas" command line option

2025-01-03 Thread Daniel P . Berrangé
On Fri, Jan 03, 2025 at 04:54:11PM +0100, Thomas Huth wrote: > It has been marked as deprecated two releases ago, so it should > be fine now to remove this command line option. > > Signed-off-by: Thomas Huth > --- > docs/about/deprecated.rst | 6 -- > docs/about/removed-features.rst |

[PATCH v5 0/4] hw/ssi/pnv_spi: Remove PnvXferBuffer and fix CID 1558827

2025-01-03 Thread Chalapathi V
Hello, In this revision two new commits are added to address multi chip SPI issues. Updates in V5: 1. Use of PnvXferBuffer results in a additonal process overhead due to frequent dynamic allocations and hence use an existing Fifo8 buffer. 2. Use a local variable seq_index and use it with in while

[PATCH v5 2/4] hw/ssi/pnv_spi: Coverity CID 1558827: Use local var seq_index instead of get_seq_index().

2025-01-03 Thread Chalapathi V
Use a local variable seq_index instead of repeatedly calling get_seq_index() method and open-code next_sequencer_fsm(). Signed-off-by: Chalapathi V --- hw/ssi/pnv_spi.c | 93 +--- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/hw/ssi/p

[PATCH v5 3/4] hw/ssi/pnv_spi: Make bus names distinct for each controllers of a socket

2025-01-03 Thread Chalapathi V
Create a spi buses with distict names on each socket so that responders are attached to correct SPI controllers. QOM tree on a 2 socket machine: (qemu) info qom-tree /machine (powernv10-machine) /chip[0] (power10_v2.0-pnv-chip) /pib_spic[0] (pnv-spi) /chip0.pnv.spi.bus.0 (SSI) /x

[PATCH v5 1/4] hw/ssi/pnv_spi: Replace PnvXferBuffer with Fifo8 structure

2025-01-03 Thread Chalapathi V
In PnvXferBuffer dynamically allocating and freeing is a process overhead. Hence used an existing Fifo8 buffer with capacity of 16 bytes. Signed-off-by: Chalapathi V --- include/hw/ssi/pnv_spi.h | 3 + hw/ssi/pnv_spi.c | 237 +-- 2 files changed, 81

[PATCH v5 4/4] hw/ssi/pnv_spi: Put a limit to RDR match failures

2025-01-03 Thread Chalapathi V
There is a possibility that SPI controller can get into loop due to indefinite RDR match failures. Hence put a limit to failures and stop the sequencer. Signed-off-by: Chalapathi V --- hw/ssi/pnv_spi.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv

Re: [PATCH] tests/tcg/s390x: Use the SLOF libc headers for the multiarch tests

2025-01-03 Thread Thomas Huth
On 16/12/2024 14.37, Ilya Leoshkevich wrote: Compiling the s390x tests on Fedora, which has the s390x cross-compiler installed, fails with: In file included from qemu/tests/tcg/s390x/console.c:8: qemu/tests/tcg/s390x/../../../pc-bios/s390-ccw/sclp.c:11:10: fatal error: string.h: No su

[PATCH] Remove the deprecated "-runas" command line option

2025-01-03 Thread Thomas Huth
It has been marked as deprecated two releases ago, so it should be fine now to remove this command line option. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 -- docs/about/removed-features.rst | 6 ++ system/vl.c | 9 - qemu-options.hx

Re: [PATCH v2] migration: Add more error handling to analyze-migration.py

2025-01-03 Thread Peter Xu
On Fri, Jan 03, 2025 at 11:13:05AM -0300, Fabiano Rosas wrote: > The analyze-migration script was seen failing in s390x in misterious > ways. It seems we're reaching the VMSDFieldStruct constructor without > any fields, which would indicate an empty .subsection entry, a > VMSTATE_STRUCT with no fie

Re: [PATCH v6 0/4] i386: Support SMP Cache Topology

2025-01-03 Thread Zhao Liu
> > > > You asked me for the opposite though, and I described how you can > > > > share the cache. If you want a cache per thread, then you probably > > > > want a node per thread. > > > > > > > > Rob > > > > > > > > > > Hi Rob, > > > > > > That's right, I made the mistake in my prior message

Re: [PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG)

2025-01-03 Thread Daniel P . Berrangé
On Fri, Jan 03, 2025 at 04:05:58PM +0100, Philippe Mathieu-Daudé wrote: > As Daniel suggested [*]: > > > We should consider to rank HVF above TCG, on the basis > > that HW acceleration is faster and should provide a > > host<->guest security boundary that we don't claim for TCG > > [*] https://lo

Re: [PATCH v6 4/4] tests/qtest/boot-serial-test: Initialize PL011 Control register

2025-01-03 Thread Philippe Mathieu-Daudé
On 3/1/25 16:00, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: The tests using the PL011 UART of the virt and raspi machines weren't properly enabling the UART and its transmitter previous to sending characters. Follow the PL011 manual initialization recommendation by setting the proper

[PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG)

2025-01-03 Thread Philippe Mathieu-Daudé
As Daniel suggested [*]: > We should consider to rank HVF above TCG, on the basis > that HW acceleration is faster and should provide a > host<->guest security boundary that we don't claim for TCG [*] https://lore.kernel.org/qemu-devel/z07yasl2pd3cp...@redhat.com/ Suggested-by: Daniel P. Berrangé

Re: [PATCH] docs/about/deprecated: Remove paragraph about initial deprecation in 2.10

2025-01-03 Thread Daniel P . Berrangé
On Fri, Jan 03, 2025 at 03:57:02PM +0100, Thomas Huth wrote: > When we introduced the deprecation rule of keeping deprecated features > for two more releases, we had to state that we would not remove features > by surprise that had already been marked as deprecated before. Nowadays, > this paragrap

Re: [PATCH v6 4/4] tests/qtest/boot-serial-test: Initialize PL011 Control register

2025-01-03 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > The tests using the PL011 UART of the virt and raspi machines > weren't properly enabling the UART and its transmitter previous > to sending characters. Follow the PL011 manual initialization > recommendation by setting the proper bits of the control register. > >

Re: [PATCH] dockerfiles: Remove 'MAINTAINER' entry in debian-tricore-cross.docker

2025-01-03 Thread Philippe Mathieu-Daudé
On 2/1/25 20:49, Alex Bennée wrote: Philippe Mathieu-Daudé writes: From: Philippe Mathieu-Daudé AMSAT closed its email service [*] so my personal email address is now defunct. Remove it to avoid bouncing emails. [*] https://forum.amsat-dl.org/index.php?thread/4581-amsat-mail-alias-service-

[PATCH] docs/about/deprecated: Remove paragraph about initial deprecation in 2.10

2025-01-03 Thread Thomas Huth
When we introduced the deprecation rule of keeping deprecated features for two more releases, we had to state that we would not remove features by surprise that had already been marked as deprecated before. Nowadays, this paragraph is not needed anymore, so we can remove it now. Signed-off-by: Tho

Re: [PATCH v4 7/8] qom: Remove container_get()

2025-01-03 Thread Richard Henderson
On 1/2/25 13:17, Philippe Mathieu-Daudé wrote: From: Peter Xu Now there's no user of container_get(), remove it. Signed-off-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Message-ID:<20241121192202.4155849-14-pet...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/qom/object.h

[PATCH 01/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.4 and 2.5 machine types

2025-01-03 Thread Thomas Huth
They are older than 6 years, so according to our machine support policy, they can be removed now. This removes the requirements for the storage keys "migration-enabled" property which will be removed in the next patch. It also removes the code that sets "max_revision" to 0 for some CCW devices, bu

[PATCH 09/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.8 machine type

2025-01-03 Thread Thomas Huth
The s390-ccw-virtio-2.8 machine is older than 6 years, so according to our machine support policy, it can be removed now. Signed-off-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 17 - 1 file changed, 17 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-vir

[PATCH 08/10] hw/s390x: Remove the cpu_model_allowed flag and related code

2025-01-03 Thread Thomas Huth
Now that the last machine type that disabled cpu_model_allowed has been removed, we can also remove the cpu_model_allowed flag itself and all the related conditional code. Signed-off-by: Thomas Huth --- include/hw/s390x/s390-virtio-ccw.h | 3 --- hw/s390x/s390-virtio-ccw.c | 9 +---

[PATCH 02/10] hw/s390x/s390-skeys: Remove the "migration-enabled" property

2025-01-03 Thread Thomas Huth
This property was only set to "off" by the old s390-ccw-virtio-2.4 machine type which has now been removed. So we can now remove the property and the related code, too. Signed-off-by: Thomas Huth --- include/hw/s390x/storage-keys.h | 2 -- hw/s390x/s390-skeys.c | 10 +- 2 file

[PATCH 07/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.7 machine type

2025-01-03 Thread Thomas Huth
The s390-ccw-virtio-2.7 machine is older than 6 years, so according to our machine support policy, it can be removed now. Signed-off-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virti

[PATCH 03/10] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.6 machine type

2025-01-03 Thread Thomas Huth
The s390-ccw-virtio-2.6 machine is older than 6 years, so according to our machine support policy, it can be removed now. Signed-off-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 20 1 file changed, 20 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-

[PATCH 10/10] hw/s390x: Remove the "adapter_routes_max_batch" property from the flic

2025-01-03 Thread Thomas Huth
Now that the s390-ccw-virtio-2.8 machine has been removed, we don't need the "adapter_routes_max_batch" property anymore and can remove it. Signed-off-by: Thomas Huth --- include/hw/s390x/s390_flic.h | 2 -- hw/intc/s390_flic.c | 9 - hw/s390x/virtio-ccw.c| 5 ++--- 3 fi

[PATCH 00/10] hw/s390x: Remove deprecated machine types 2.4 up to 2.8

2025-01-03 Thread Thomas Huth
According to our support policy, we don't support machine types anymore that are older than 6 years, so we can remove the very old 2.x machine types now. Let's start by removing all s390-virtio-ccw machines up to version 2.8. (This also helps to get rid of the problem that has been described in: ht

Re: [PATCH v4 8/8] system: Inline machine_containers[] in qemu_create_machine_containers()

2025-01-03 Thread Richard Henderson
On 1/2/25 13:18, Philippe Mathieu-Daudé wrote: Only qemu_create_machine_containers() uses the machine_containers[] array, restrict the scope to this single user. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Peter Xu --- system/vl.c | 16 +++- 1 file changed, 7 insertions(+),

[PATCH 04/10] hw/s390x: Remove the "ri_allowed" switch

2025-01-03 Thread Thomas Huth
Only s390-ccw-virtio-2.6 and older used to set this switch to "off", for newer machine types it is always enabled. Since we removed the old machine types now, we can also remove the switch in the code and assume that it is always enabled now. Signed-off-by: Thomas Huth --- include/hw/s390x/s390-

[PATCH 06/10] hw/s390x/css-bridge: Remove the "css_dev_path" property

2025-01-03 Thread Thomas Huth
Now that the s390-ccw-virtio-2.6 and older machine types have been removed, the "css_dev_path" property of the css-bridge is also not used anymore and thus can be removed. This way we finally get rid of the problem that has been described in: https://gitlab.com/qemu-project/qemu/-/issues/2213 Sig

[PATCH 05/10] hw/s390x/ipl: Remove the "iplbext_migration" property

2025-01-03 Thread Thomas Huth
Now that the old machine types that used this property have been removed, we can remove the property and the corresponding code. Signed-off-by: Thomas Huth --- hw/s390x/ipl.h | 1 - hw/s390x/ipl.c | 10 -- 2 files changed, 11 deletions(-) diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h in

Re: [PATCH v4 1/8] qdev: Implement qdev_create_fake_machine() for user emulation

2025-01-03 Thread Philippe Mathieu-Daudé
On 3/1/25 15:24, Richard Henderson wrote: On 1/2/25 13:17, Philippe Mathieu-Daudé wrote: When a QDev instance is realized, qdev_get_machine() ends up called. In the next commit, qdev_get_machine() will require a "machine" container to be always present. To satisfy this QOM containers design, Imp

Re: [PATCH v4 6/8] qom: Use object_get_container()

2025-01-03 Thread Richard Henderson
On 1/2/25 13:17, Philippe Mathieu-Daudé wrote: From: Peter Xu Use object_get_container() whenever applicable across the tree. Signed-off-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Message-ID:<20241121192202.4155849-13-pet...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- backends

Re: [PATCH v4 5/8] qom: Add object_get_container()

2025-01-03 Thread Richard Henderson
On 1/2/25 13:17, Philippe Mathieu-Daudé wrote: From: Peter Xu Add a helper to fetch a root container (under object_get_root()). Sanity check on the type of the object. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Peter Xu Message-ID:<20241121192202.4155849

Re: [PATCH v4 4/8] qdev: Use machine_get_container()

2025-01-03 Thread Richard Henderson
On 1/2/25 13:17, Philippe Mathieu-Daudé wrote: From: Peter Xu Use machine_get_container() whenever applicable across the tree. Signed-off-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Message-ID:<20241121192202.4155849-11-pet...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/core

Re: [PATCH v4 3/8] qdev: Add machine_get_container()

2025-01-03 Thread Richard Henderson
On 1/2/25 13:17, Philippe Mathieu-Daudé wrote: From: Peter Xu Add a helper to fetch machine containers. Add some sanity check around. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Xu Message-ID: <20241121192202.4155849-10-pet...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé

  1   2   >