Re: [PATCH v3 3/3] Add support for RAPL MSRs in KVM/Qemu

2024-03-12 Thread Anthony Harivel
Hi Daniel, Paolo, Here my last questions before wrapping up and send v4, or maybe call off my attempt to add RAPL interface in QEMU. Daniel P. Berrangé, Jan 30, 2024 at 10:39: > > +rcu_register_thread(); > > + > > +/* Get QEMU PID*/ > > +pid = getpid(); > > + > > +/* Nb of CPUS

Re: [PATCH] virtio-blk: iothread-vq-mapping coroutine pool sizing

2024-03-12 Thread Kevin Wolf
Am 11.03.2024 um 21:14 hat Stefan Hajnoczi geschrieben: > It is possible to hit the sysctl vm.max_map_count limit when the > coroutine pool size becomes large. Each coroutine requires two mappings > (one for the stack and one for the guard page). QEMU can crash with > "failed to set up stack guard

Re: [PATCH v3 14/29] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
On 30/01/2024 14.01, Igor Mammedov wrote: On Mon, 29 Jan 2024 17:44:56 +0100 Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. commenting here since, I'm not expert on coccinelle scripts. On negative

[PULL for 9.0 0/8] final maintainer updates (testing, gdbstub)

2024-03-12 Thread Alex Bennée
The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f: Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into staging (2024-03-09 20:12:21 +) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-maintainer-final-120324-

[PULL 1/8] gitlab: aggressively avoid extra GIT data

2024-03-12 Thread Alex Bennée
This avoids fetching blobs and tree references for branches we are not going to worry about. Also skip tag references which are similarly not useful and keep the default --prune. This keeps the .git data to around 100M rather than the ~400M even a shallow clone takes. So we can check the savings w

[PULL 2/8] tests/vm: ensure we build everything by default

2024-03-12 Thread Alex Bennée
The "check" target by itself is not enough to ensure we build the user mode binaries. While we can't test them with check-tcg we can at least include them in the build. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Cc: Richard Henderson Cc: Gustavo Romero diff --git a/tests/vm/basevm.py

[PULL 3/8] gdbstub: Rename back gdb_handlesig

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Rename gdb_handlesig_reason back to gdb_handlesig. There is no need to add a wrapper for gdb_handlesig and rename it when a new parameter is added. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20240309030901.1726211-2-

[PULL 4/8] linux-user: Move tswap_siginfo out of target code

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Move tswap_siginfo from target code to handle_pending_signal. This will allow some cleanups and having the siginfo ready to be used in gdbstub. Signed-off-by: Gustavo Romero Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Message-Id: <20240309030901.1726211

[PULL 6/8] gdbstub: Add Xfer:siginfo:read stub

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Add stub to handle Xfer:siginfo:read packet query that requests the machine's siginfo data. This is used when GDB user executes 'print $_siginfo' and when the machine stops due to a signal, for instance, on SIGSEGV. The information in siginfo allows GDB to determiner further

[PULL 7/8] tests/tcg: Add multiarch test for Xfer:siginfo:read stub

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Add multiarch test for testing if Xfer:siginfo:read query is properly handled by gdbstub. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Message-Id: <20240309030901.1726211-6-gustavo.rom...@linaro.org> Signed-off-by: Alex Bennée diff --git a/tests/tcg/multi

[PULL 5/8] gdbstub: Save target's siginfo

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Save target's siginfo into gdbserver_state so it can be used later, for example, in any stub that requires the target's si_signo and si_code. This change affects only linux-user mode. Signed-off-by: Gustavo Romero Suggested-by: Richard Henderson Message-Id: <2024030903090

[PULL 8/8] gdbstub: Fix double close() of the follow-fork-mode socket

2024-03-12 Thread Alex Bennée
From: Ilya Leoshkevich When the terminal GDB_FORK_ENABLED state is reached, the coordination socket is not needed anymore and is therefore closed. However, if there is a communication error between QEMU gdbstub and GDB, the generic error handling code attempts to close it again. Fix by closing i

Re: [PATCH v3] ui/gtk: flush display pipeline before saving vmstate when blob=true

2024-03-12 Thread Marc-André Lureau
Hi On Thu, Mar 7, 2024 at 2:27 AM wrote: > > From: Dongwon Kim > > If the guest state is paused before it gets a response for the current > scanout frame submission (resource-flush), it won't flush new frames > after being restored as it still waits for the old response, which is > accepted as a

Re: [PATCH v5 04/14] spapr: nested: keep nested-hv related code restricted to its API.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > spapr_exit_nested and spapr_get_pate_nested_hv contains code which > is specific to nested-hv API. Isolating code flows based on API > helps extending it to be used with different API as well. > > Signed-off-by: Harsh Prateek Bora > S

Re: [PATCH v5 05/14] spapr: nested: Document Nested PAPR API

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Adding initial documentation about Nested PAPR API to describe the set > of APIs and its usage. Also talks about the Guest State Buffer elements > and it's format which is used between L0/L1 to communicate L2 state. > > Signed-off-by:

Re: [PATCH v5 07/14] spapr: nested: Introduce H_GUEST_[CREATE|DELETE] hcalls.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Introduce the nested PAPR hcalls: > - H_GUEST_CREATE which is used to create and allocate resources for > nested guest being created. > - H_GUEST_DELETE which is used to delete and deallocate resources > for the nested guest be

Re: [PATCH v5 06/14] spapr: nested: Introduce H_GUEST_[GET|SET]_CAPABILITIES hcalls.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Introduce the nested PAPR hcalls: > - H_GUEST_GET_CAPABILITIES which is used to query the capabilities >of the API and the L2 guests it provides. > - H_GUEST_SET_CAPABILITIES which is used to set the Guest API >capabilities t

Re: [PATCH v5 08/14] spapr: nested: Introduce H_GUEST_CREATE_VCPU hcall.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Introduce the nested PAPR hcall H_GUEST_CREATE_VCPU which is used to > create and initialize the specified VCPU resource for the previously > created guest. Each guest can have multiple VCPUs upto max 2048. > All VCPUs for a guest gets

Re: [PATCH 0/2] trace: fix ability to use systemtap with qemu tools

2024-03-12 Thread Daniel P . Berrangé
Ping again for these patches to get into this release. On Fri, Feb 16, 2024 at 01:09:33PM +, Daniel P. Berrangé wrote: > Ping: Stefan, are you OK with picking up these trace patches > for merge ? > > On Mon, Jan 08, 2024 at 05:13:54PM +, Daniel P. Berrangé wrote: > > Currently we're only

Re: [PATCH v2] virtio-gpu: first surface update with blob scanout after resumed

2024-03-12 Thread Marc-André Lureau
Hi On Thu, Mar 7, 2024 at 2:27 AM wrote: > > From: Dongwon Kim > > The guest surface needs to be updated with a blob scanout after resumed > from saved vm state if blob is enabled. > > v2: Rebased > This patch conflicts with the already reviewed (and almost in queue) patch from https://patchew

Re: [PULL 0/6] hw/nvme updates

2024-03-12 Thread Peter Maydell
On Mon, 11 Mar 2024 at 19:11, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi, > > The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f: > > Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into staging > (2024-03-09 20:12:21 +) > > are available in t

[PULL 0/8] Net patches

2024-03-12 Thread Jason Wang
The following changes since commit 05ec974671200814fa5c1d5db710e0e4b88a40af: Merge tag 'm68k-for-9.0-pull-request' of https://github.com/vivier/qemu-m68k into staging (2024-03-11 18:42:53 +) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-reque

[PULL 1/8] igb: fix link state on resume

2024-03-12 Thread Jason Wang
From: Laurent Vivier On resume igb_vm_state_change() always calls igb_autoneg_resume() that sets link_down to false, and thus activates the link even if we have disabled it. The problem can be reproduced starting qemu in paused state (-S) and then set the link to down. When we resume the machine

[PULL 4/8] ebpf: Added eBPF map update through mmap.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko Signed-off-by: Jason Wang --- ebpf/e

Re: [PATCH v5 09/14] spapr: nested: Extend nested_ppc_state for nested PAPR API

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Currently, nested_ppc_state stores a certain set of registers and works > with nested_[load|save]_state() for state transfer as reqd for nested-hv API. > Extending these with additional registers state as reqd for nested PAPR API. > >

[PULL 7/8] qmp: Added new command to retrieve eBPF blob.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko Now, the binary objects may be retrieved by id. It would require for future qmp commands that may require specific eBPF blob. Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF obj

[PULL 2/8] e1000e: fix link state on resume

2024-03-12 Thread Jason Wang
From: Laurent Vivier On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() that sets link_down to false, and thus activates the link even if we have disabled it. The problem can be reproduced starting qemu in paused state (-S) and then set the link to down. When we resume the m

[PULL 6/8] virtio-net: Added property to load eBPF RSS with fds.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko Signed-off-by: Jason Wang --- hw/net/virtio-

[PULL 8/8] ebpf: Updated eBPF program and skeleton.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Also, added map_flags with explicitly declared BPF_F_MMAPABLE. Added check for BPF_F_MMAPABLE flag to meson script and requirements to libbpf version. Also change

Re: [PATCH v5 11/14] spapr: nested: Introduce H_GUEST_[GET|SET]_STATE hcalls.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Introduce the nested PAPR hcalls: > - H_GUEST_GET_STATE which is used to get state of a nested guest or > a guest VCPU. The value field for each element in the request is > destination to be updated to reflect current s

[PULL 3/8] Avoid unaligned fetch in ladr_match()

2024-03-12 Thread Jason Wang
From: Nick Briggs There is no guarantee that the PCNetState is allocated such that csr[8] is allocated on an 8-byte boundary. Since not all hosts are capable of unaligned fetches the 16-bit elements need to be fetched individually to avoid a potential fault. Closes issue #2143 Resolves: https:

Re: [PATCH v5 10/14] spapr: nested: Initialize the GSB elements lookup table.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Nested PAPR API provides a standard Guest State Buffer (GSB) format > with unique IDs for each guest state element for which get/set state is > supported by the API. Some of the elements are read-only and/or guest-wide. > Introducing a

[PULL 5/8] ebpf: Added eBPF initialization by fds.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko Signed-off-by: Jason Wang --- ebpf/ebpf_rss-stub.c | 6 ++

Re: [PATCH v5 12/14] spapr: nested: Use correct source for parttbl info for nested PAPR API.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > For nested PAPR API, we use SpaprMachineStateNestedGuest struct to store > partition table info, use the same in spapr_get_pate_nested() via > helper. > > Signed-off-by: Michael Neuling > Signed-off-by: Harsh Prateek Bora > --- > in

Re: [PATCH v5 13/14] spapr: nested: Introduce H_GUEST_RUN_VCPU hcall.

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > The H_GUEST_RUN_VCPU hcall is used to start execution of a Guest VCPU. > The Hypervisor will update the state of the Guest VCPU based on the > input buffer, restore the saved Guest VCPU state, and start its > execution. > > The Guest V

Re: [PATCH 3/9] backends/confidential-guest-support: Add functions to support IGVM

2024-03-12 Thread Roy Hopkins
On Fri, 2024-03-01 at 16:37 +, Daniel P. Berrangé wrote: > On Tue, Feb 27, 2024 at 02:50:09PM +, Roy Hopkins wrote: > > In preparation for supporting the processing of IGVM files to configure > > guests, this adds a set of functions to ConfidentialGuestSupport > > allowing configuration of

Re: [PATCH v5 14/14] spapr: nested: Introduce cap-nested-papr for Nested PAPR API

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Introduce a SPAPR capability cap-nested-papr which enables nested PAPR > API for nested guests. This new API is to enable support for KVM on PowerVM > and the support in Linux kernel has already merged upstream. > > Signed-off-by: Mich

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Peter Xu
On Tue, Mar 12, 2024 at 10:58:51AM +0100, Cédric Le Goater wrote: > On 3/12/24 08:16, Cédric Le Goater wrote: > > On 3/11/24 21:24, Peter Xu wrote: > > > On Fri, Mar 08, 2024 at 04:15:08PM +0800, Peter Xu wrote: > > > > On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater wrote: > > > > > * [

Re: [PATCH v5 14/14] spapr: nested: Introduce cap-nested-papr for Nested PAPR API

2024-03-12 Thread Nicholas Piggin
On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > Introduce a SPAPR capability cap-nested-papr which enables nested PAPR > API for nested guests. This new API is to enable support for KVM on PowerVM > and the support in Linux kernel has already merged upstream. > > Signed-off-by: Mich

Re: [PATCH] virtio-blk: iothread-vq-mapping coroutine pool sizing

2024-03-12 Thread Stefan Hajnoczi
On Tue, Mar 12, 2024 at 12:24:30PM +0100, Kevin Wolf wrote: > Am 11.03.2024 um 21:14 hat Stefan Hajnoczi geschrieben: > > It is possible to hit the sysctl vm.max_map_count limit when the > > coroutine pool size becomes large. Each coroutine requires two mappings > > (one for the stack and one for t

Re: [PATCH v5 12/14] spapr: nested: Use correct source for parttbl info for nested PAPR API.

2024-03-12 Thread Harsh Prateek Bora
On 3/12/24 17:11, Nicholas Piggin wrote: On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: For nested PAPR API, we use SpaprMachineStateNestedGuest struct to store partition table info, use the same in spapr_get_pate_nested() via helper. Signed-off-by: Michael Neuling Signed-off

Re: [PULL 0/6] hw/nvme updates

2024-03-12 Thread Klaus Jensen
On Mar 12 11:34, Peter Maydell wrote: > On Mon, 11 Mar 2024 at 19:11, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > Hi, > > > > The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f: > > > > Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into > >

Re: [PATCH 4/9] backends/igvm: Implement parsing and processing of IGVM files

2024-03-12 Thread Roy Hopkins
On Fri, 2024-03-01 at 16:51 +, Daniel P. Berrangé wrote: > On Tue, Feb 27, 2024 at 02:50:10PM +, Roy Hopkins wrote: > > This commit adds an implementation of an IGVM loader which parses the > > file specified as a pararameter to ConfidentialGuestSupport and provides > > a function that uses

Re: [PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM

2024-03-12 Thread Roy Hopkins
On Fri, 2024-03-01 at 16:54 +, Daniel P. Berrangé wrote: > On Tue, Feb 27, 2024 at 02:50:12PM +, Roy Hopkins wrote: > > When using an IGVM file the configuration of the system firmware is > > defined by IGVM directives contained in the file. Therefore the default > > system firmware should

[PATCH for 9.0] migration: Skip only empty block devices

2024-03-12 Thread Cédric Le Goater
The block .save_setup() handler calls a helper routine init_blk_migration() which builds a list of block devices to take into account for migration. When one device is found to be empty (sectors == 0), the loop exits and all the remaining devices are ignored. This is a regression introduced when bd

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Cédric Le Goater
On 3/12/24 12:50, Peter Xu wrote: On Tue, Mar 12, 2024 at 10:58:51AM +0100, Cédric Le Goater wrote: On 3/12/24 08:16, Cédric Le Goater wrote: On 3/11/24 21:24, Peter Xu wrote: On Fri, Mar 08, 2024 at 04:15:08PM +0800, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater

Re: [PATCH v5 14/14] spapr: nested: Introduce cap-nested-papr for Nested PAPR API

2024-03-12 Thread Harsh Prateek Bora
Hi Nick, On 3/12/24 17:21, Nicholas Piggin wrote: On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: Introduce a SPAPR capability cap-nested-papr which enables nested PAPR API for nested guests. This new API is to enable support for KVM on PowerVM and the support in Linux kernel has

Re: [PATCH for 9.0] migration: Skip only empty block devices

2024-03-12 Thread Cédric Le Goater
On 3/12/24 13:04, Cédric Le Goater wrote: The block .save_setup() handler calls a helper routine init_blk_migration() which builds a list of block devices to take into account for migration. When one device is found to be empty (sectors == 0), the loop exits and all the remaining devices are igno

Re: [PATCH 2/2] migration: Fix error handling after dup in file migration

2024-03-12 Thread Peter Xu
On Tue, Mar 12, 2024 at 09:57:58AM +, Daniel P. Berrangé wrote: > On Mon, Mar 11, 2024 at 08:33:35PM -0300, Fabiano Rosas wrote: > > The file migration code was allowing a possible -1 from a failed call > > to dup() to propagate into the new QIOFileChannel::fd before checking > > for validity.

Re: [PATCH] target/ppc: Add power10 pmu SPRs

2024-03-12 Thread Nicholas Piggin
On Mon Feb 19, 2024 at 8:39 PM AEST, Madhavan Srinivasan wrote: > Currently in tcg mode, when reading from power10 pmu spr like MMCR3, > qemu logs this message (when starting qemu with -d guest_errors) > > Trying to read invalid spr 754 (0x2f2) at 30056bb0 > > This is becuase, no read

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Peter Xu
On Tue, Mar 12, 2024 at 01:09:42PM +0100, Cédric Le Goater wrote: > I was hoping to fix the test case instead. I can try to improve the hack > I sent this afternoon. Thanks, please go whatever way you think is the right approach. -- Peter Xu

Re: [PATCH for 9.0] migration: Skip only empty block devices

2024-03-12 Thread Peter Xu
On Tue, Mar 12, 2024 at 01:04:31PM +0100, Cédric Le Goater wrote: > The block .save_setup() handler calls a helper routine > init_blk_migration() which builds a list of block devices to take into > account for migration. When one device is found to be empty (sectors > == 0), the loop exits and all

Re: [PATCH v7 03/10] target/ppc: Add gen_exception_err_nip() function

2024-03-12 Thread Nicholas Piggin
On Wed Feb 28, 2024 at 1:08 AM AEST, BALATON Zoltan wrote: > Add gen_exception_err_nip() that does the same as gen_exception_err() > but takes the nip as a parameter to allow specifying it instead of > using the current instruction address then change gen_exception_err() > to use it. > > The gen_ex

Re: [PATCH v7 04/10] target/ppc: Fix gen_sc to use correct nip

2024-03-12 Thread Nicholas Piggin
On Wed Feb 28, 2024 at 1:08 AM AEST, BALATON Zoltan wrote: > Most exceptions are raised with nip pointing to the faulting > instruction but the sc instruction generating a syscall exception > leaves nip pointing to next instruction. Fix gen_sc to not use > gen_exception_err() which sets nip back bu

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Cédric Le Goater
On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the er

Re: [RISC-V][tech-server-soc] [RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-12 Thread Wu, Fei
On 3/8/2024 3:15 AM, Daniel Henrique Barboza wrote: > > > On 3/7/24 04:36, Wu, Fei wrote: >> On 3/6/2024 9:26 PM, Wu, Fei wrote: >>> On 3/5/2024 1:58 PM, Wu, Fei wrote: On 3/5/2024 3:43 AM, Daniel Henrique Barboza wrote: > > > On 3/4/24 07:25, Fei Wu wrote: >> The harts requi

Running x86 hypervisors inside QEMU x86 TCG outer guest?

2024-03-12 Thread Edgar E. Iglesias
Hi! I'm trying to figure out if QEMU supports running x86 hypervisors (KVM and Xen) inside emulated (TCG) x86_64 guests. I.e, using TCG emulated x86 hardware virtualization (Intel VMX/EPT or AMD SVM/NPT). So far, I've been able to run nested x86 KVM when the host is on KVM but no luck with TCG

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-03-12 Thread Jonathan Cameron via
On Fri, 8 Mar 2024 20:35:53 -0800 fan wrote: > On Thu, Mar 07, 2024 at 12:45:55PM +, Jonathan Cameron wrote: > > ... > > > > > > > +list = records; > > > > > +extents = g_new0(CXLDCExtentRaw, num_extents); > > > > > +while (list) { > > > > > +CXLDCExtent *ent; > > > > >

Re: [PATCH v4 06/24] chardev: set record/replay on the base device of a muxed device

2024-03-12 Thread Marc-André Lureau
Hi On Mon, Mar 11, 2024 at 9:44 PM Nicholas Piggin wrote: > > chardev events to a muxed device don't get recorded because e.g., > qemu_chr_be_write() checks whether the base device has the record flag > set. > > This can be seen when replaying a trace that has characters typed into > the console,

[PULL 00/55] Misc ERRP_GUARD() and cpu_env() patches

2024-03-12 Thread Thomas Huth
The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f: Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into staging (2024-03-09 20:12:21 +) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2024-03-12 for yo

[PULL 01/55] hw/cxl/cxl-host: Fix missing ERRP_GUARD() in cxl_fixed_memory_window_config()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, dereferencing @errp requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: * - It must not be dereferenced, because it may be null. ... * ERRP_GUARD() lifts these restrict

[PULL 03/55] hw/mem/cxl_type3: Fix missing ERRP_GUARD() in ct3_realize()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, dereferencing @errp requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: * - It must not be dereferenced, because it may be null. ... * ERRP_GUARD() lifts these restrict

[PULL 46/55] target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240129164514.73104-19-phi...@linaro.org> Signed-off-by: Thomas Huth --

[PULL 34/55] bulk: Access existing variables initialized to &S->F when available

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé When a variable is initialized to &struct->field, use it in place. Rationale: while this makes the code more concise, this also helps static analyzers. Mechanical change using the following Coccinelle spatch script: @@ type S, F; identifier s, m, v; @@ S *

[PULL 06/55] hw/intc: Check @errp to handle the error of IOAPICCommonClass.realize()

2024-03-12 Thread Thomas Huth
From: Zhao Liu IOAPICCommonClass implements its own private realize(), and this private realize() allows error. Since IOAPICCommonClass.realize() returns void, to check the error, dereference @errp with ERRP_GUARD(). Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Message-ID: <202

[PULL 05/55] hw/pci-bridge/cxl_upstream: Fix missing ERRP_GUARD() in cxl_usp_realize()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, dereferencing @errp requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: * - It must not be dereferenced, because it may be null. ... * ERRP_GUARD() lifts these restrict

[PULL 16/55] block/snapshot: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 33/55] error: Move ERRP_GUARD() to the beginning of the function

2024-03-12 Thread Thomas Huth
From: Zhao Liu Since the commit 05e385d2a9 ("error: Move ERRP_GUARD() to the beginning of the function"), there are new codes that don't put ERRP_GUARD() at the beginning of the functions. As stated in the commit 05e385d2a9: "include/qapi/error.h advises to put ERRP_GUARD() right at the beginnin

[PULL 25/55] hw/vfio/pci-quirks: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 11/55] block/nbd: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 26/55] hw/vfio/pci: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 08/55] backends/iommufd: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 15/55] block/qed: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 17/55] block/vdi: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 38/55] target/alpha: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-8-phi...@linaro.org> Signed-off-by: Thomas Huth ---

[PULL 27/55] hw/vfio/platform: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 35/55] hw/core: Declare CPUArchId::cpu as CPUState instead of Object

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Do not accept any Object for CPUArchId::cpu field, restrict it to CPUState type. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-3-phi...@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- include/hw/boards.h| 2 +-

[PULL 44/55] target/m68k: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-17-phi...@linaro.org> Sign

[PULL 48/55] target/openrisc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-21-phi...@linaro.org> Signed-off-by: Thomas Huth --

[PULL 19/55] block/virtio-blk: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 13/55] block/qcow2-bitmap: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

Re: [PATCH v5 14/14] spapr: nested: Introduce cap-nested-papr for Nested PAPR API

2024-03-12 Thread Nicholas Piggin
On Tue Mar 12, 2024 at 10:11 PM AEST, Harsh Prateek Bora wrote: > Hi Nick, > > On 3/12/24 17:21, Nicholas Piggin wrote: > > On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: > >> Introduce a SPAPR capability cap-nested-papr which enables nested PAPR > >> API for nested guests. This new

[PULL 14/55] block/qcow2: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 31/55] net/vhost-vdpa: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 21/55] hw/vfio/ap: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 32/55] target/s390x/cpu_models: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 29/55] hw/virtio/vhost: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 43/55] target/loongarch: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-16-phi...@linaro.org> Reviewed-by: Richard Henderson [thuth: Adjusted patch for hun

[PULL 22/55] hw/vfio/container: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 45/55] target/microblaze: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-18-phi...@linaro.org> Signed-off-by: Thomas Huth --

[PULL 52/55] target/sparc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson Reviewed-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-27-phi...@linaro.org>

[PULL 37/55] target: Replace CPU_GET_CLASS(cpu -> obj) in cpu_reset_hold() handler

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Since CPU() macro is a simple cast, the following are equivalent: Object *obj; CPUState *cs = CPU(obj) In order to ease static analysis when running scripts/coccinelle/cpu_env.cocci from the previous commit, replace: - CPU_GET_CLASS(cpu); + CPU_GET_CLASS(obj)

Re: [PATCH 2/2] migration: Fix error handling after dup in file migration

2024-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2024 at 08:22:18AM -0400, Peter Xu wrote: > On Tue, Mar 12, 2024 at 09:57:58AM +, Daniel P. Berrangé wrote: > > On Mon, Mar 11, 2024 at 08:33:35PM -0300, Fabiano Rosas wrote: > > > The file migration code was allowing a possible -1 from a failed call > > > to dup() to propagate

[PULL 51/55] target/sh4: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-26-phi...@linaro.org> Signed-off-by: Thomas Huth --

[PULL 42/55] target/i386/hvf: Use CPUState typedef

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu Message-ID: <20240129164514.73104-14-phi...@linaro.org> [thu

Re: [PATCH v5 14/14] spapr: nested: Introduce cap-nested-papr for Nested PAPR API

2024-03-12 Thread Harsh Prateek Bora
Hi Nick, On 3/12/24 17:41, Harsh Prateek Bora wrote: Hi Nick, On 3/12/24 17:21, Nicholas Piggin wrote: On Fri Mar 8, 2024 at 9:19 PM AEST, Harsh Prateek Bora wrote: Introduce a SPAPR capability cap-nested-papr which enables nested PAPR API for nested guests. This new API is to enable support

[PULL 55/55] user: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Message-ID: <20240129164514.73104-30-phi...@linaro.org> Sign

[PULL 24/55] hw/vfio/iommufd: Fix missing ERRP_GUARD() for error_prepend()

2024-03-12 Thread Thomas Huth
From: Zhao Liu As the comment in qapi/error, passing @errp to error_prepend() requires ERRP_GUARD(): * = Why, when and how to use ERRP_GUARD() = * * Without ERRP_GUARD(), use of the @errp parameter is restricted: ... * - It should not be passed to error_prepend(), error_vprepend() or * error_a

[PULL 50/55] target/rx: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240129164514.73104-24-phi...@linaro.org> Signed-off-by: Thomas Huth --

[PULL 54/55] target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-03-12 Thread Thomas Huth
From: Philippe Mathieu-Daudé Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240129164514.73104-29-phi...@linaro.org> Signed-off-by: Thomas Huth --

<    1   2   3   4   5   6   7   >