Re: [PATCH v6 2/8] gdbstub: Try unlinking the unix socket before binding

2025-01-17 Thread Alex Bennée
Ilya Leoshkevich writes: > In case an emulated process execve()s another emulated process, bind() > will fail, because the socket already exists. So try deleting it. Use > the existing unix_listen() function which does this. Link qemu-user > with qemu-sockets.c and add the monitor_get_fd() stub.

[PATCH 1/1] pc-bios/s390-ccw: Abort IPL on invalid loadparm

2025-01-17 Thread jrossi
From: Jared Rossi Because the loadparm specifies an exact kernel the user wants to boot, if the loadparm is invalid it must represent a misconfiguration of the guest. Thus we should abort the IPL immediately, without attempting to use other devices, to avoid booting into an unintended guest image

Re: [PATCH v6 6/8] gdbstub: Allow late attachment

2025-01-17 Thread Alex Bennée
Ilya Leoshkevich writes: > Allow debugging individual processes in multi-process applications by > starting them with export QEMU_GDB=/tmp/qemu-%d.sock,suspend=n. > Currently one would have to attach to every process to ensure the app > makes progress. > > In case suspend=n is not specified, the

[PATCH 0/1] s390x: Abort immediately on invalid loadparm

2025-01-17 Thread jrossi
From: Jared Rossi This is a small fix to the IPL behavior in case the user has entered an invalid loadparm. The loadparm is a very specific value, which must be deliberately set by the user. Therefore, if it is not valid, then it is a mistake in the guest configuration. As such, we immediately

Re: [PATCH v6 0/8] gdbstub: Allow late attachment

2025-01-17 Thread Alex Bennée
Ilya Leoshkevich writes: > > Hi, > > This series adds the ability to attach GDB to a running qemu-user > instance. This is useful for debugging multi-process apps. > > Patches 1 and 2 implement a small related feature: the ability to > create individual UNIX sockets for each child process. > > P

Re: [PATCH v2 01/81] tcg: Move call abi parameters from tcg-target.h to tcg-target.c.inc

2025-01-17 Thread Alex Bennée
Richard Henderson writes: > These defines are not required outside of tcg/tcg.c, > which includes tcg-target.c.inc before use. > Reduces the exported symbol set of tcg-target.h. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Benné

[PATCH 08/10] rust: qdev: switch from legacy reset to Resettable

2025-01-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 1 + rust/hw/char/pl011/src/device.rs | 10 ++- rust/qemu-api/src/qdev.rs| 116 --- rust/qemu-api/tests/tests.rs | 5 +- 4 files changed, 102 insertions(+), 30 deletions(-) diff --git

Re: [PATCH V7 24/24] migration: cpr-transfer documentation

2025-01-17 Thread Steven Sistare
On 1/17/2025 2:06 PM, Fabiano Rosas wrote: Steven Sistare writes: On 1/17/2025 10:29 AM, Fabiano Rosas wrote: Steven Sistare writes: On 1/17/2025 9:42 AM, Fabiano Rosas wrote: Steve Sistare writes: [...] Thank-you for the simple example. I reproduced the failure. To fix, add "-mach

[PATCH 05/10] rust: qdev: add clock creation

2025-01-17 Thread Paolo Bonzini
Add a Rust version of qdev_init_clock_in, which can be used in instance_init. There are a couple differences with the C version: - in Rust the object keeps its own reference to the clock (in addition to the one embedded in the NamedClockList), and the reference is dropped automatically by ins

[PATCH 09/10] rust: bindings: add Sync markers to types referred to by MemoryRegionOps

2025-01-17 Thread Paolo Bonzini
This is needed for the MemoryRegionOps to be declared as static; Rust requires static elements to be Sync. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/bindings.rs | 19 ++- rust/qemu-api/src/irq.rs | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git

[PATCH] hw/i386/pc: Fix crash that occurs when introspecting TYPE_PC_MACHINE machines

2025-01-17 Thread Thomas Huth
QEMU currently crashes when you try to inspect the machines based on TYPE_PC_MACHINE for their properties: $ echo '{ "execute": "qmp_capabilities" } { "execute": "qom-list-properties","arguments": { "typename": "pc-q35-10.0-machine"}}' \ | ./qemu-system-x86_64 -M

[PATCH 10/10] rust: bindings for MemoryRegionOps

2025-01-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 43 +++--- rust/hw/char/pl011/src/lib.rs| 1 - rust/hw/char/pl011/src/memory_ops.rs | 36 - rust/qemu-api/meson.build| 1 + rust/qemu-api/src/lib.rs | 1 + rust/qemu-api/src/memory.

[RFC PATCH 00/10] rust: remaining part of qdev bindings

2025-01-17 Thread Paolo Bonzini
This is what I have left for qdev bindings, including 1) reference counting and object creation 2) clocks 3) Resettable 4) MemoryRegionOps. I have no rush for this series, and I expect HPET to be merged before it. The documentation is not yet complete (will be fixed) and the API is limited to what

[PATCH 02/10] rust: qom: add reference counting functionality

2025-01-17 Thread Paolo Bonzini
Add a smart pointer that allows to add and remove references from QOM objects. It's important to note that while all QOM objects have a reference count, in practice not all of them have their lifetime guarded by it. Embedded objects, specifically, are confined to the lifetime of the owner. When

[PATCH v2 5/8] tests/qtest/xhci: add a test for TR NOOP commands

2025-01-17 Thread Nicholas Piggin
Run some TR NOOP commands through the transfer ring. Signed-off-by: Nicholas Piggin --- tests/qtest/usb-hcd-xhci-test.c | 36 - 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/tests/qtest/usb-hcd-xhci-test.c b/tests/qtest/usb-hcd-xhci-test.c index b9

[PATCH v2 1/8] hw/usb/xhci: Move HCD constants to a header and add register constants

2025-01-17 Thread Nicholas Piggin
Prepare to use some of these constants in xhci qtest code. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci.h | 214 ++ hw/usb/hcd-xhci.c | 450 +++--- 2 files changed, 360 insertions(+), 304 deletions(-) diff --git a/hw/usb/hcd-xhci

[PATCH v2 3/8] tests/qtest/xhci: Add controller and device setup and ring tests

2025-01-17 Thread Nicholas Piggin
Add tests which init the host controller registers to the point where command and event rings, irqs are operational. Enumerate ports and set up an attached device context that enables device transfer ring to be set up and tested. This test does a bunch of things at once and is not yet well librifi

[PATCH v2 4/8] hw/usb/xhci: Support TR NOOP commands

2025-01-17 Thread Nicholas Piggin
Implement XHCI TR NOOP commands by setting up then immediately completing the packet. The IBM AIX XHCI HCD driver uses NOOP commands to check driver and hardware health, which works after this change. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci.c | 28 +++- 1 file

[PATCH v2 8/8] hw/usb/hcd-xhci-pci: Add TI TUSB73X0 XHCI controller model

2025-01-17 Thread Nicholas Piggin
The TI TUSB73X0 controller has some interesting differences from NEC, notably a separate BAR for MSIX, and PM capabilities. The spec is freely available without sign-up. This controller is accepted by IBM Power proprietary firmware and software (when the subsystem IDs are set to Power servers, whi

[PATCH v2 6/8] tests/qtest/xhci: test the qemu-xhci device

2025-01-17 Thread Nicholas Piggin
Add support in the test code for running multiple drivers, and add tests for the qemu-xhci device. Signed-off-by: Nicholas Piggin --- tests/qtest/usb-hcd-xhci-test.c | 96 + 1 file changed, 63 insertions(+), 33 deletions(-) diff --git a/tests/qtest/usb-hcd-xhci-t

[PATCH v2 2/8] hw/usb/xhci: Rename and move HCD register region constants to header

2025-01-17 Thread Nicholas Piggin
This also adds some missing constants rather than open-coding offsets and sizes. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci.h | 16 hw/usb/hcd-xhci.c | 48 ++- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/hw

[PATCH v2 0/8] usb/xhci: TR NOOP, TI HCD device, more qtests

2025-01-17 Thread Nicholas Piggin
Since last posting, I accounted for feedback from Phil and others. - Improved the names of the XHCI register constants when moving them to the header file. - Leaving the symbolic cases for unimplemented registers in the handlers. - Fixed a bug introduced in a register field calculation when

[PATCH v2 7/8] hw/usb/hcd-xhci-pci: Make PCI device more configurable

2025-01-17 Thread Nicholas Piggin
To prepare to support another USB PCI Host Controller, make some PCI configuration dynamic. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci-pci.h | 9 + hw/usb/hcd-xhci-pci.c | 87 +-- 2 files changed, 85 insertions(+), 11 deletions(-) diff --git

Re: [PATCH 1/2] hw/pci/msix: Warn on PBA writes

2025-01-17 Thread Akihiko Odaki
On 2025/01/18 2:28, Nicholas Piggin wrote: Of the MSI-X PBA pending bits, the PCI Local Bus Specification says: Software should never write, and should only read Pending Bits. If software writes to Pending Bits, the result is undefined. Log a GUEST_ERROR message if the PBA is written t

Re: [PATCH 8/9] net/e1000e: Fix xITR minimum value

2025-01-17 Thread Akihiko Odaki
On 2025/01/18 2:03, Nicholas Piggin wrote: The ITR minimum value may be a mis-reading or ambiguity in the spec. Section 10.2.4.2 says the maximum observable interrupt rate should never exceed 7813, but that is in context of example of the interval being programmed to 500. On the other hand 7.4.4

[PATCH 03/10] rust: qom: add object creation functionality

2025-01-17 Thread Paolo Bonzini
The basic object lifecycle test can now be implemented using safe code! Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 13 - rust/qemu-api/src/prelude.rs | 1 + rust/qemu-api/src/qom.rs | 23 +-- rust/qemu-api/tests/tests.rs |

[PATCH 01/10] rust: qemu-api: add sub-subclass to the integration tests

2025-01-17 Thread Paolo Bonzini
From: Zhao Liu missing signed-off-by from zhao --- rust/qemu-api/tests/tests.rs | 56 ++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 526c3f4f8ea..5c3e75ed3d5 100644 --- a/rust/q

[PATCH 07/10] rust: qdev: make ObjectImpl a supertrait of DeviceImpl

2025-01-17 Thread Paolo Bonzini
In practice it has to be implemented always in order to access an implementation of ClassInitImpl. Make the relationship explicit in the code. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/qdev.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/qemu-api/src/qdev.rs

[PATCH 04/10] rust: callbacks: allow passing optional callbacks as ()

2025-01-17 Thread Paolo Bonzini
In some cases, callbacks are optional. Using "Some(function)" and "None" does not work well, because when someone writes "None" the compiler does not know what to use for "F" in "Option". Therefore, adopt () to mean a "null" callback. It is possible to enforce that a callback is valid by adding

[PATCH 06/10] rust: qom: allow initializing interface vtables

2025-01-17 Thread Paolo Bonzini
Unlike regular classes, interface vtables can only be obtained via object_class_dynamic_cast. Provide a wrapper that allows accessing the vtable and pass it to a ClassInitImpl implementation, for example ClassInitImpl. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/prelude.rs | 1 + rust/q

Nested virtualization with windows guest

2025-01-17 Thread Michał Zegan
Hello, I am running on the host with intel alderlake (12'th gen) cpu which is i7 12700h, running fedora 40, linux kernel 6.12.8, qemu 8.2.8. I run newest windows 11 as a guest, but this problem traces back at least to windows 10. It works, until I enable hyperv. After that, it starts boot

Re: [PATCH V7 24/24] migration: cpr-transfer documentation

2025-01-17 Thread Fabiano Rosas
Steven Sistare writes: > On 1/17/2025 2:06 PM, Fabiano Rosas wrote: >> Steven Sistare writes: >> >>> On 1/17/2025 10:29 AM, Fabiano Rosas wrote: Steven Sistare writes: > On 1/17/2025 9:42 AM, Fabiano Rosas wrote: >> Steve Sistare writes: > [...] >>> >>> Thank-you for the s

Re: [PATCH v2 03/81] tcg: Move tcg_op_insert_{after, before} decls to tcg-internal.h

2025-01-17 Thread Alex Bennée
Richard Henderson writes: > These are not particularly useful outside of optimization passes. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] plugins: fix -Werror=maybe-uninitialized false-positive

2025-01-17 Thread Pierrick Bouvier
Hi Marc-André, I could successfully build all targets with gcc 14.2.0 (using a debian sid container) with ubsan and asan enabled, and with -O2. Pierrick On 1/14/25 22:40, Marc-André Lureau wrote: Hi On Tue, Jan 14, 2025 at 8:00 PM Pierrick Bouvier wrote: On 1/14/25 02:48, marcandre.lur..

Re: [PATCH] migration: ram block cpr blockers

2025-01-17 Thread Peter Xu
On Fri, Jan 17, 2025 at 02:10:14PM -0500, Steven Sistare wrote: > On 1/17/2025 1:16 PM, Peter Xu wrote: > > On Fri, Jan 17, 2025 at 09:46:11AM -0800, Steve Sistare wrote: > > > +/* > > > + * Return true if ram contents would be lost during CPR. > > > + * Return false for ram_device because it is re

Re: [PATCH-for-10.1 v2 00/13] hw/arm: Remove virt-2.6 up to virt-2.12 machines

2025-01-17 Thread Thomas Huth
On 17/01/2025 09.09, Daniel P. Berrangé wrote: On Fri, Jan 17, 2025 at 07:47:15AM +0100, Thomas Huth wrote: On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote: Hi Peter, On 16/1/25 15:59, Philippe Mathieu-Daudé wrote: The versioned 'virt' machines up to 2.12 been marked as deprecated two relea

Re: [PATCH-for-10.1 v2 00/13] hw/arm: Remove virt-2.6 up to virt-2.12 machines

2025-01-17 Thread Philippe Mathieu-Daudé
On 17/1/25 09:09, Daniel P. Berrangé wrote: On Fri, Jan 17, 2025 at 07:47:15AM +0100, Thomas Huth wrote: On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote: Hi Peter, On 16/1/25 15:59, Philippe Mathieu-Daudé wrote: The versioned 'virt' machines up to 2.12 been marked as deprecated two releases

[PULL 02/38] rust: add --check-cfg test to rustc arguments

2025-01-17 Thread Paolo Bonzini
rustc will check that every reachable #[cfg] matches a list of the expected config names and values. Recent versions of rustc are also complaining about #[cfg(test)], even if it is basically a standard part of the language. So, always allow it. Signed-off-by: Paolo Bonzini --- scripts/rust/rus

[PULL v2 00/38] Rust, i386 patches for 2024-01-10

2025-01-17 Thread Paolo Bonzini
The following changes since commit 6528013b5f5ba6bb3934b7f5fe57a3110680530f: Merge tag 'qga-pull-2025-01-06' of https://github.com/kostyanf14/qemu into staging (2025-01-06 09:39:02 -0500) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you

Re: [PATCH 01/21] hw/i386/pc: Remove unused pc_compat_2_3 declarations

2025-01-17 Thread Thomas Huth
On 16/01/2025 00.22, Philippe Mathieu-Daudé wrote: We removed the implementations in commit 46a2bd52571 ("hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine") but forgot to remove the declarations. Do it now. Fixes: 46a2bd52571 ("hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine") Signed-off-

[PATCH 05/10] rust: pl011: pull interrupt updates out of read/write ops

2025-01-17 Thread Paolo Bonzini
qemu_irqs are not part of the vmstate, therefore they will remain in PL011State. Update them if needed after regs_read()/regs_write(). Apply #[must_use] to functions that return whether the interrupt state could have changed, so that it's harder to forget the call to update(). Signed-off-by: Pao

[PATCH 09/10] rust: pl011: pull device-specific code out of MemoryRegionOps callbacks

2025-01-17 Thread Paolo Bonzini
read() can now return a simple u64. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 16 +--- rust/hw/char/pl011/src/memory_ops.rs | 23 --- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/

[PATCH 08/10] rust: pl011: remove duplicate definitions

2025-01-17 Thread Paolo Bonzini
Unify the "Interrupt" enum and the "INT_*" constants with a struct that contains the bits. The "int_level" and "int_enabled" fields could use a crate such as "bitflags". Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 36 - rust/hw/char/pl011/src/lib.

[PATCH 04/10] rust: pl011: extract CharBackend receive logic into a separate function

2025-01-17 Thread Paolo Bonzini
Prepare for moving all references to the registers and the FIFO into a separate struct. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/

[PATCH 03/10] rust: pl011: extract conversion to RegisterOffset

2025-01-17 Thread Paolo Bonzini
As an added bonus, this also makes the new function return u32 instead of u64, thus factoring some casts into a single place. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 114 +-- 1 file changed, 63 insertions(+), 51 deletions(-) diff --git a/r

[PATCH 02/10] rust: pl011: hide unnecessarily "pub" items from outside pl011::device

2025-01-17 Thread Paolo Bonzini
The only public interfaces for pl011 are TYPE_PL011 and pl011_create. Remove pub from everything else. Note: the "allow(dead_code)" is removed later. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 2 +- rust/hw/char/pl011/src/device_class.rs | 2 +- rust/hw/char/pl0

[PATCH 00/10] rust: pl011: correctly use interior mutability

2025-01-17 Thread Paolo Bonzini
QOM devices are aliased from the moment that they are added to the QOM tree, and therefore must not use &mut. This has been a known issue since the beginning of the Rust in QEMU project, and since then a solution was developed in the form of BqlCell and BqlRefCell. This series moves the MMIO code

[PATCH 10/10] rust: qdev: make reset take a shared reference

2025-01-17 Thread Paolo Bonzini
Because register reset is within a borrow_mut() call, reset does not need anymore a mut reference to the PL011State. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 4 ++-- rust/qemu-api/src/qdev.rs| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a

Re: CXL emulation on aarch64

2025-01-17 Thread Jonathan Cameron via
On Fri, 17 Jan 2025 09:24:15 +0900 Itaru Kitayama wrote: > > On Jan 16, 2025, at 19:58, Jonathan Cameron > > wrote: > > > > On Thu, 16 Jan 2025 15:04:53 +0900 > > Itaru Kitayama wrote: > > > >> Hi Jonathan, > >> > >>> On Jan 14, 2025, at 19:26, Jonathan Cameron > >>> wrote: > >>> > >

Re: [RFC 04/13] rust: add bindings for gpio_{in|out} initialization

2025-01-17 Thread Paolo Bonzini
Like timer there are just a couple nits here. On Thu, Jan 16, 2025 at 3:45 AM Zhao Liu wrote: > * gpio_in and gpio_out: > > /// Trait for methods of [`DeviceState`] and its subclasses. > pub trait DeviceMethods: ObjectDeref > where > Self::Target: IsA, > { > fn init_gpio_in(&self, lines_n

Re: [PATCH-for-10.1 v2 00/13] hw/arm: Remove virt-2.6 up to virt-2.12 machines

2025-01-17 Thread Daniel P . Berrangé
On Fri, Jan 17, 2025 at 09:29:40AM +0100, Thomas Huth wrote: > On 17/01/2025 09.09, Daniel P. Berrangé wrote: > > On Fri, Jan 17, 2025 at 07:47:15AM +0100, Thomas Huth wrote: > > > On 16/01/2025 22.13, Philippe Mathieu-Daudé wrote: > > > > Hi Peter, > > > > > > > > On 16/1/25 15:59, Philippe Mathi

Re: [PATCH 0/3] Remove deprecated machines pc-i440fx-2.4 up to pc-i440fx-2.12

2025-01-17 Thread Daniel P . Berrangé
On Fri, Jan 17, 2025 at 11:27:35AM +0100, Thomas Huth wrote: > While our new auto-disablement of old machine types will only kick > in with the next (v10.1) release, the pc-i440fx-2.* machine types > have been explicitly marked as deprecated via our old deprecation > policy mechanism before (two re

Re: [PATCH 0/3] Remove deprecated machines pc-i440fx-2.4 up to pc-i440fx-2.12

2025-01-17 Thread Thomas Huth
On 17/01/2025 12.07, Daniel P. Berrangé wrote: On Fri, Jan 17, 2025 at 11:27:35AM +0100, Thomas Huth wrote: While our new auto-disablement of old machine types will only kick in with the next (v10.1) release, the pc-i440fx-2.* machine types have been explicitly marked as deprecated via our old d

Re: [PATCH v3] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`

2025-01-17 Thread Jonathan Cameron via
On Fri, 17 Jan 2025 10:20:44 +0300 Michael Tokarev wrote: > 15.01.2025 10:58, Li Zhijian via wrote: > > This assertion always happens when we sanitize the CXL memory device. > > $ echo 1 > /sys/bus/cxl/devices/mem0/security/sanitize > > > > It is incorrect to register an MSIX number beyond the d

[PATCH 0/2] net: Fix announce_self with vhost

2025-01-17 Thread Laurent Vivier
announce_self that sends a RARP packet after migration or with announce_self QMP/HMP command doesn't work with vhost because of the vnet headers. announce_self is the only user of QEMU_NET_PACKET_FLAG_RAW and this flag is not correctly managed. This series fix a problem with this flag in filter-d

[PATCH 1/2] net: Fix announce_self

2025-01-17 Thread Laurent Vivier
b9ad513e1876 ("net: Remove receive_raw()") adds an iovec entry in qemu_deliver_packet_iov() to add the virtio-net header in the data when QEMU_NET_PACKET_FLAG_RAW is set but forgets to increase the number of iovec entries in the array, so receive_iov() will only send the first entry (the virtio-net

[PATCH 2/2] net/dump: Correctly compute Ethernet packet offset

2025-01-17 Thread Laurent Vivier
When a packet is sent with QEMU_NET_PACKET_FLAG_RAW by QEMU it never includes virtio-net header even if qemu_get_vnet_hdr_len() is not 0, and filter-dump is not managing this case. The only user of QEMU_NET_PACKET_FLAG_RAW is announce_self, we can show the problem using it and tcpddump: - QEMU pa

Re: [PATCH 1/1] cxl/cxl-host: Support creation of a new CXL Host Bridge

2025-01-17 Thread Jonathan Cameron via
On Fri, 17 Jan 2025 11:43:43 +0800 Yuquan Wang wrote: > This work defines a new cxl host bridge type (TYPE_CXL_HOST). This > could be considered as a prototype of an independent cxl host bridge > which combines gpex features (ecam, mmio windows & irq) and pxb-cxl > features(CHBCR) at meanwhile. >

Re: [PATCH 2/3] hw/i386/pc_piix: Remove pc-i440fx-2.4 up to pc-i440fx-2.12

2025-01-17 Thread Kashyap Chamarthy
On Fri, Jan 17, 2025 at 11:27:37AM +0100, Thomas Huth wrote: > These machines have explicitly been marked as deprecated in > QEMU 9.1, so it should be fine to remove these antique versioned > machine types two releases later in 10.0. > > Signed-off-by: Thomas Huth > --- > docs/about/deprecated.r

Re: [PATCH v3 1/4] Add support for emulation of CRC32 instructions

2025-01-17 Thread Aleksandar Rakic
Hi, Could you please let us know if you have any comments on the latest version of this patch? Kind regards, Aleksandar Rakic

Re: [PATCH v3 3/4] target/mips: Enable MSA ASE using a CLI flag

2025-01-17 Thread Aleksandar Rakic
Hi, Could you please let us know if you have any comments on the latest version of this patch? Kind regards, Aleksandar Rakic

Re: [PATCH 1/3] tests/qtest/test-x86-cpuid-compat: Remove tests related to pc-i440fx-2.3

2025-01-17 Thread Fabiano Rosas
Thomas Huth writes: > The pc-i440fx-2.3 machine type has been removed in commit 46a2bd5257 > ("hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine") already, so > these tests are just dead code by now. > > Signed-off-by: Thomas Huth Reviewed-by: Fabiano Rosas I'm queuing this one individually

Re: [PATCH v3 2/4] Skip NaN mode check for soft-float

2025-01-17 Thread Aleksandar Rakic
Hi, Could you please let us know if you have any comments on the latest version of this patch? Kind regards, Aleksandar Rakic

Re: [RFC PATCH 1/2] cpus: Introduce const_cpu_env() and const_env_archcpu()

2025-01-17 Thread Daniel Henrique Barboza
On 1/16/25 8:04 PM, Philippe Mathieu-Daudé wrote: const_cpu_env() is similar to cpu_env() but return a const CPU 'env' state. Same for const_env_archcpu() w.r.t. env_archcpu(). Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 5 + include/hw/core/cpu.h | 6 +++

[PATCH v3 2/3] scripts: validate SPDX license choices

2025-01-17 Thread Daniel P . Berrangé
We expect all new code to be contributed with the "GPL-2.0-or-later" license tag. Divergence is permitted if the new file is derived from pre-existing code under a different license, whether from elsewhere in QEMU codebase, or outside. Issue a warning if the declared license is not "GPL-2.0-or-lat

[PATCH v3 3/3] scripts: forbid use of arbitrary SPDX tags besides license identifiers

2025-01-17 Thread Daniel P . Berrangé
While SPDX-License-Identifier is a well known SPDX tag, there are a great many more besides that[1]. These are mostly focused on making machine readable metadata available to the 'reuse' tool and similar. They cover concepts like author names, copyright owners, and much more. It is even possible to

[PATCH v3 1/3] scripts: mandate that new files have SPDX-License-Identifier

2025-01-17 Thread Daniel P . Berrangé
Going forward we want all newly created source files to have an SPDX-License-Identifier tag present. Initially mandate this for C, Python, Perl, Shell source files, as well as JSON (QAPI) and Makefiles, while encouraging users to consider it for other file types. Reviewed-by: Brian Cain Reviewed

[PATCH v3 0/3] scripts: mandate use of SPDX-License-Identifier tags in new files

2025-01-17 Thread Daniel P . Berrangé
One of the items raised at the QEMU maintainers meeting at KVM Forum 2024 was adoption of SPDX-License-Identifier for licensing of newly contributed source files, for which there were no dissenting voices. Thus, this series proposes a way to put this into action by extending checkpatch.pl to manda

Re: [RFC PATCH 2/2] target/arm: Constify lot of helpers taking CPUARMState argument

2025-01-17 Thread Daniel Henrique Barboza
On 1/16/25 8:04 PM, Philippe Mathieu-Daudé wrote: When methods don't modify the CPUARMState* argument, we can mark it const. This allow enforcing places where the CPU env shouldn't be modified at all, Signed-off-by: Philippe Mathieu-Daudé --- We should use 'const' more often in general IMO

Re: [PATCH 03/21] hw/i386/pc: Remove PCMachineClass::broken_reserved_end field

2025-01-17 Thread Thomas Huth
On 16/01/2025 00.22, Philippe Mathieu-Daudé wrote: The PCMachineClass::broken_reserved_end field was only used by the pc-q35-2.4 and pc-i440fx-2.4 machines, which got removed. Remove it and simplify pc_memory_init(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i

Re: [PATCH 08/21] hw/net/e1000: Remove unused E1000_FLAG_MAC flag

2025-01-17 Thread Thomas Huth
On 16/01/2025 00.22, Philippe Mathieu-Daudé wrote: E1000_FLAG_MAC was only used by the hw_compat_2_4[] array, via the 'extra_mac_registers=off' property. We removed all machines using that array, lets remove all the code around E1000_FLAG_MAC. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/

[PATCH 07/10] rust: qemu_api: add vmstate_struct

2025-01-17 Thread Paolo Bonzini
It is not type safe, but it's the best that can be done without const_refs_static. It can also be used with BqlCell and BqlRefCell. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/vmstate.rs | 33 + 1 file changed, 33 insertions(+) diff --git a/rust/qemu-api/

[PATCH 03/10] rust: vmstate: add varray support to vmstate_of!

2025-01-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/vmstate.rs | 42 ++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs index abe15c96011..3c3ed8510ab 100644 --- a/rust/qemu-api/src/vmstate

[PATCH 04/10] rust: vmstate: implement Zeroable for VMStateField

2025-01-17 Thread Paolo Bonzini
This shortens a bit the constants. Do not bother using it in the vmstate macros since most of them will go away soon. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/vmstate.rs | 18 +++--- rust/qemu-api/src/zeroable.rs | 31 +++

[PATCH 00/10] rust: (mostly) type safe VMState

2025-01-17 Thread Paolo Bonzini
The existing translation of the C macros for vmstate does not make any attempt to type-check vmstate declarations against the struct, so introduce a new system that computes VMStateField based on the actual struct declaration. Macros do not have full access to the type system, therefore a full imp

Re: [PULL 47/50] target/riscv: Add Smdbltrp ISA extension enable switch

2025-01-17 Thread Clément Léger
Hey Alistair, While doing a non regression with default bios (OpenSBI 1.5) and max cpu, Atish found that this breaks boot with OpenSBI 1.5 since it does not have support for double trap clearing. On Henrique guidance, I resent this patch alone with an associated fix. : https://lore.kernel.org/qe

[PATCH 02/10] rust: vmstate: implement VMState for non-leaf types

2025-01-17 Thread Paolo Bonzini
Arrays, pointers and cells use a VMStateField that is based on that for the inner type. The implementation therefore delegates to the VMState implementation of the inner type. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/vmstate.rs | 79 +++- 1 file changed

[PATCH 06/10] rust: vmstate: add public utility macros to implement VMState

2025-01-17 Thread Paolo Bonzini
Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/vmstate.rs | 61 ++-- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs index b0a2ce105cc..8f32c72a0fd 100644 --- a/ru

[PATCH 01/10] rust: vmstate: add new type safe implementation

2025-01-17 Thread Paolo Bonzini
The existing translation of the C macros for vmstate does not make any attempt to type-check vmstate declarations against the struct, so introduce a new system that computes VMStateField based on the actual struct declaration. Macros do not have full access to the type system, therefore a full imp

[PATCH 08/10] rust: pl011: switch vmstate to new-style macros

2025-01-17 Thread Paolo Bonzini
Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 3 ++- rust/hw/char/pl011/src/device_class.rs | 36 +- rust/hw/char/pl011/src/lib.rs | 6 + 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/rust

Re: [RFC 04/13] rust: add bindings for gpio_{in|out} initialization

2025-01-17 Thread Paolo Bonzini
Il ven 17 gen 2025, 11:55 Zhao Liu ha scritto: > > > assert!(pins.len() > 0); > > > > !pins.is_empty(). > > Yes. > > > But I am not sure it's needed... > > > > > > unsafe { > > > qdev_init_gpio_out( > > > self.upcast::() as *const DeviceState as > *mut

Re: [PATCH 0/2] support block encryption/decryption in parallel

2025-01-17 Thread Daniel P . Berrangé
On Thu, Jan 16, 2025 at 01:37:44PM +0100, Kevin Wolf wrote: > Am 13.12.2024 um 16:56 hat Daniel P. Berrangé geschrieben: > > On Thu, Nov 28, 2024 at 06:51:20PM +0800, t...@chinatelecom.cn wrote: > > > From: Guoyi Tu > > > > > > Currently, disk I/O encryption and decryption operations are performe

Re: [PATCH 2/2] qapi/crypto: support enable encryption/decryption in parallel

2025-01-17 Thread Daniel P . Berrangé
On Thu, Nov 28, 2024 at 06:51:22PM +0800, t...@chinatelecom.cn wrote: > From: Guoyi Tu > > add encrypt-in-parallel option to enable encryption/decryption > in parallel > > Signed-off-by: Guoyi Tu > --- > block/crypto.c | 8 > block/crypto.h | 9 + > qapi/block-core

Re: [PATCH v4 1/2] glib-compat: Define g_spawn_check_wait_status()

2025-01-17 Thread Daniel P . Berrangé
On Wed, Jan 15, 2025 at 09:03:07PM +0900, Akihiko Odaki wrote: > g_spawn_check_exit_status() is renamed to g_spawn_check_wait_status() > in 2.70. > > Signed-off-by: Akihiko Odaki > Tested-by: Lei Yang > --- > include/glib-compat.h | 11 +++ > 1 file changed, 11 insertions(+) Reviewed-b

Re: [PATCH v4 2/2] tap: Use g_spawn_sync() and g_spawn_check_wait_status()

2025-01-17 Thread Daniel P . Berrangé
On Wed, Jan 15, 2025 at 09:03:08PM +0900, Akihiko Odaki wrote: > g_spawn_sync() (for GLib < 2.68) or g_spawn_async_with_pipes_and_fds() > (for the newer) gives an informative message if it fails to execute > the script instead of reporting exiting status 1. > > g_spawn_check_wait_status() also giv

[PULL 01/37] semihosting: add guest_error logging for failed opens

2025-01-17 Thread Alex Bennée
This usually indicates the semihosting call was expecting to find something but didn't. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-2-alex.ben...@linaro.org> diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index c40348f996..f6451d9bb

Re: [PATCH 0/2] net: Fix announce_self with vhost

2025-01-17 Thread Laurent Vivier
CC: qemu-stable and qemu-trivial. On 17/01/2025 12:17, Laurent Vivier wrote: announce_self that sends a RARP packet after migration or with announce_self QMP/HMP command doesn't work with vhost because of the vnet headers. announce_self is the only user of QEMU_NET_PACKET_FLAG_RAW and this flag

Re: [PULL 0/8] Xen regression fixes and cleanups

2025-01-17 Thread Stefan Hajnoczi
On Fri, 17 Jan 2025 at 06:37, David Woodhouse wrote: > > On Fri, 2025-01-17 at 11:49 +0100, Phil Dennis-Jordan wrote: > > > > This note made me realise that my feature addition (macOS PV graphics > > device) that caused the regression requiring my patch in this series > > hasn't made it into the c

[PULL 34/37] docs/devel: add information on how to setup build environments

2025-01-17 Thread Alex Bennée
From: Pierrick Bouvier MacOS and Linux are straightforward, but Windows needs a bit more details. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-5-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-35-

[PULL 24/37] docs/devel/style: add a section about bitfield, and disallow them for packed structures

2025-01-17 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Tested-by: Stefan Weil Tested-by: Philippe Mathieu-Daudé Message-Id: <20250110203401.178532-3-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <202501

[PULL 31/37] docs/sphinx: include kernel-doc script as a dependency

2025-01-17 Thread Alex Bennée
When we update the script we should rebuild the docs. Otherwise breaking changes made to the kdoc script don't become apparent until later. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-32-alex.ben...@linaro.org> diff --git a/docs/sphinx/depfile.py

[PULL 26/37] plugins: fix kdoc annotation

2025-01-17 Thread Alex Bennée
The function is qemu_plugin_mem_get_value() Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-27-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 0fba36ae02..3a850aa216 100644 --- a/include/qemu/qemu-pl

[PULL 32/37] docs/devel: add git-publish for patch submitting

2025-01-17 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-3-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-33-alex.ben...@linaro.org> diff --git a/docs/devel/submitting-a-patch.rst b/d

[PULL 25/37] plugins: enable linking with clang/lld

2025-01-17 Thread Alex Bennée
From: Pierrick Bouvier Windows uses a special mechanism to enable plugins to work (DLL delay loading). Option for lld is different than ld. MSYS2 clang based environment use lld by default, so restricting to this config on Windows is safe, and will avoid false bug reports. Reviewed-by: Philippe

[PULL 20/37] contrib/plugins/hotpages: fix 32-bit build

2025-01-17 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-11-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-21-alex.ben...@linaro.org> diff --git a/contrib/plugins/hotpages.c b/contrib

[PULL 19/37] contrib/plugins/hwprofile: fix 32-bit build

2025-01-17 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-10-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-20-alex.ben...@linaro.org> diff --git a/contrib/plugins/hwprofile.c b/contri

[PULL 37/37] scripts/nsis.py: Run dependency check for each DLL file only once

2025-01-17 Thread Alex Bennée
From: Stefan Weil Each DLL should only be checked once for dependencies, but several hundred (781 in my test) unneeded checks were done. Now the script is significantly faster (16 s in my build). Signed-off-by: Stefan Weil Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Mes

Re: [PATCH v2] checkpatch: Check .m, .build, .hx, .json and .plist

2025-01-17 Thread Daniel P . Berrangé
On Sat, Jan 11, 2025 at 05:07:48PM +0900, Akihiko Odaki wrote: > Check more text files: Objective-C, Meson, "hx", JSON, and property > list. Objective-C looks sensible at least. For the others though, I'm wondering if any of the current checks performed are liable to cause false positives for the

Re: [PATCH v4 6/8] chardev/char-mux: implement backend chardev multiplexing

2025-01-17 Thread Kevin Wolf
Am 17.01.2025 um 09:03 hat Roman Penyaev geschrieben: > On Thu, Jan 16, 2025 at 12:27 PM Kevin Wolf wrote: > > Whatever you choose to do, my one request for you would be that you > > really make sure that CLI and QMP are structured and behave exactly the > > same with your new option, to avoid mak

[PULL 36/37] docs: add a glossary

2025-01-17 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241209183104.365796-7-pierrick.bouv...@linaro.org> [AJB: update MAINTAINERS] Signed-off-by: Alex Bennée Message-Id: <20250116160306.1709518-37-alex.ben...@linaro.org> diff --git a/MAINTAINERS

  1   2   3   >