Re: [PULL 0/7] tcg + linux-user patch queue

2024-03-31 Thread Peter Maydell
On Fri, 29 Mar 2024 at 22:21, Richard Henderson wrote: > > The following changes since commit 5012e522aca161be5c141596c66e5cc6082538a9: > > Update version for v9.0.0-rc1 release (2024-03-26 19:46:55 +) > > are available in the Git repository at: > > https://gitlab.com/rth7680/qemu.git

Re: [PULL 0/5] Net patches

2024-03-31 Thread Peter Maydell
On Fri, 29 Mar 2024 at 07:11, Jason Wang wrote: > > The following changes since commit 5012e522aca161be5c141596c66e5cc6082538a9: > > Update version for v9.0.0-rc1 release (2024-03-26 19:46:55 +) > > are available in the Git repository at: > > https://github.com/jasowang/qemu.git

QEMU cirrus CI jobs failing to start

2024-03-31 Thread Peter Maydell
https://gitlab.com/qemu-project/qemu/-/issues/2256 The Cirrus CI jobs for macos and freebsd are failing to start: Unschedulable: "0/2 nodes are available: 1 node(s) didn't match Pod's node affinity/selector, 1 node(s) had untolerated taint {virtual-kubelet.io/provider: azure}. preemption: 0/2

[PATCH for-9.0] Fix some typos in documentation (found by codespell)

2024-03-31 Thread Stefan Weil via
Signed-off-by: Stefan Weil --- docs/devel/atomics.rst | 2 +- docs/devel/ci-jobs.rst.inc | 2 +- docs/devel/clocks.rst | 2 +- docs/system/i386/sgx.rst | 2 +- qapi/qom.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/devel/atomics.rst

[PULL 2/2] migration/postcopy: Ensure postcopy_start() sets errp if it fails

2024-03-31 Thread peterx
From: Avihai Horon There are several places where postcopy_start() fails without setting errp. This can cause a null pointer de-reference, as in case of error, the caller of postcopy_start() copies/prints the error set in errp. Fix it by setting errp in all of postcopy_start() error paths. Cc:

[PULL 1/2] migration: Set migration error in migration_completion()

2024-03-31 Thread peterx
From: Avihai Horon After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source() assumes that migration error is set if an error occurs during migration. This may not be true if migration errors in migration_completion(). For

[PULL 0/2] Migration 20240331 patches

2024-03-31 Thread peterx
-20240331-pull-request for you to fetch changes up to d0ad271a7613459bd0a3397c8071a4ad06f3f7eb: migration/postcopy: Ensure postcopy_start() sets errp if it fails (2024-03-31 14:30:03 -0400) Migration pull for 9.0-rc2 - Avihai's

[PULL 0/8] ppc-for-9.0-3 queue

2024-03-31 Thread Nicholas Piggin
The following changes since commit 5012e522aca161be5c141596c66e5cc6082538a9: Update version for v9.0.0-rc1 release (2024-03-26 19:46:55 +) are available in the Git repository at: https://gitlab.com/npiggin/qemu.git tags/pull-ppc-for-9.0-3-20240331 for you to fetch changes up

[PATCH 3/4] linux-user/syscall: do_setsockopt(): make ip_mreq_source local to the place where it is used

2024-03-31 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 733a2b91e9..988b6422fb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2049,7 +2049,6 @@ static

[PATCH 4/4] linux-user/syscall: do_setsockopt(): eliminate goto in switch for SO_SNDTIMEO

2024-03-31 Thread Michael Tokarev
There's identical code for SO_SNDTIMEO and SO_RCVTIMEO, currently implemented using an ugly goto into another switch case. Eliminate that using arithmetic if, making code flow more natural. Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 11 --- 1 file changed, 4

[PATCH 0/4] small linux-user/syscall:do_setsockopt() cleanups and fixes

2024-03-31 Thread Michael Tokarev
A few cleanups and fixes for linux-user/syscall:do_setsockopt(). Michael Tokarev (4): linux-user/syscall: do_setsockopt: fix SOL_ALG.ALG_SET_KEY linux-user/syscall: do_setsockopt(): make ip_mreq local to the place it is used and inline target_to_host_ip_mreq() linux-user/syscall:

Re: [PATCH net v3] virtio_net: Do not send RSS key if it is not supported

2024-03-31 Thread Heng Qi
在 2024/3/30 上午1:16, Breno Leitao 写道: There is a bug when setting the RSS options in virtio_net that can break the whole machine, getting the kernel into an infinite loop. Running the following command in any QEMU virtual machine with virtionet will reproduce this problem: # ethtool -X

[PULL 3/8] target/ppc/mmu-radix64: Use correct string format in walk_tree()

2024-03-31 Thread Nicholas Piggin
From: Philippe Mathieu-Daudé 'mask', 'nlb' and 'base_addr' are all uin64_t types. Use the corresponding PRIx64 format. Fixes: d2066bc50d ("target/ppc: Check page dir/table base alignment") Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Nicholas Piggin --- target/ppc/mmu-radix64.c | 8

[PULL 8/8] tests/avocado: ppc_hv_tests.py set alpine time before setup-alpine

2024-03-31 Thread Nicholas Piggin
If the time is wrong, setup-alpine SSL certificate checks can fail. setup-alpine is used to bring up the network, but it doesn't seem to to set NTP time before the failing SSL checks. This test has recently started failing presumably because the default time has now fallen too far behind. Fix

[PULL 4/8] target/ppc: Restore [H]DEXCR to 64-bits

2024-03-31 Thread Nicholas Piggin
From: Benjamin Gray The DEXCR emulation was recently changed to a 32-bit register, possibly because it does have a 32-bit read-only view. It is a full 64-bit SPR though, so use the corresponding 64-bit write functions. Fixes: fbda88f7abdee ("target/ppc: Fix width of some 32-bit SPRs")

[PULL 7/8] tests/avocado: Fix ppc_hv_tests.py xorriso dependency guard

2024-03-31 Thread Nicholas Piggin
For some reason the skipIf missing_deps() check fails to skip the test if it comes after the skipUnless lines, causing an error running on systems without xorriso. Avocado implements skipUnless is just an inverted skipIf, so it's not clear what the bug is or why this fixes it. For now it's enough

[PULL 5/8] target/ppc: Fix GDB register indexing on secondary CPUs

2024-03-31 Thread Nicholas Piggin
From: Benjamin Gray The GDB server protocol assigns an arbitrary numbering of the SPRs. We track this correspondence on each SPR with gdb_id, using it to resolve any SPR requests GDB makes. Early on we generate an XML representation of the SPRs to give GDB, including this numbering. However the

[PULL 6/8] target/ppc: Do not clear MSR[ME] on MCE interrupts to supervisor

2024-03-31 Thread Nicholas Piggin
Hardware clears the MSR[ME] bit when delivering a machine check interrupt, so that is what QEMU does. The spapr environment runs in supervisor mode though, and receives machine check interrupts after they are processed by the hypervisor, and MSR[ME] must always be enabled in supervisor mode

[PULL 1/8] spapr: nested: use bitwise NOT operator for flags check

2024-03-31 Thread Nicholas Piggin
From: Harsh Prateek Bora Check for flag bit in H_GUEST_GETSET_STATE_FLAG_GUEST_WIDE need to use bitwise NOT operator to ensure no other flag bits are set. Resolves: Coverity CID 1540008 Resolves: Coverity CID 1540009 Reported-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off

[PULL 2/8] hw/ppc/spapr: Include missing 'sysemu/tcg.h' header

2024-03-31 Thread Nicholas Piggin
From: Philippe Mathieu-Daudé "sysemu/tcg.h" declares tcg_enabled(), and is implicitly included. Include it explicitly to avoid the following error when refactoring headers: hw/ppc/spapr.c:2612:9: error: call to undeclared function 'tcg_enabled'; ISO C99 and later do not support implicit

Re: Backdoor in xz, should we switch compression format for tarballs?

2024-03-31 Thread Michael Tokarev
30.03.2024 13:03, Stefan Hajnoczi : On Fri, 29 Mar 2024 at 14:00, Paolo Bonzini wrote: For more info, see https://lwn.net/ml/oss-security/20240329155126.kjjfduxw2yrlx...@awork3.anarazel.de/ but, essentially, xz was backdoored and it seems like upstream was directly responsible for this.

[PATCH] linux-user/syscall.c: fix setsockopt(SOL_ALG, ALG_SET_KEY)

2024-03-31 Thread Michael Tokarev
This setsockopt accepts zero-lengh optlen (current qemu implementation does not allow this). Also, there's no need to make a copy of the key, it is enough to use lock_user() (which accepts zero-length length already). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2197 Fixes: f312fc

[PATCH v2 1/4] linux-user/syscall: do_setsockopt: fix SOL_ALG.ALG_SET_KEY

2024-03-31 Thread Michael Tokarev
This setsockopt accepts zero-lengh optlen (current qemu implementation does not allow this). Also, there's no need to make a copy of the key, it is enough to use lock_user() (which accepts zero length already). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2197 Fixes: f312fc

[PATCH 2/4] linux-user/syscall: do_setsockopt(): make ip_mreq local to the place it is used and inline target_to_host_ip_mreq()

2024-03-31 Thread Michael Tokarev
ip_mreq is declared at the beginning of do_setsockopt(), while it is used in only one place. Move its declaration to that very place and replace pointer to alloca()-allocated memory with the structure itself. target_to_host_ip_mreq() is used only once, inline it. This change also properly

[PATCH v2 1/4] hw/nvme: add Identify Endurance Group List

2024-03-31 Thread Minwoo Im
From: Minwoo Im Commit 73064edfb864 ("hw/nvme: flexible data placement emulation") intorudced NVMe FDP feature to nvme-subsys and nvme-ctrl with a single endurance group #1 supported. This means that controller should return proper identify data to host with Identify Endurance Group List (CNS

[PATCH v2 3/4] hw/nvme: Support SR-IOV VFs more than 127

2024-03-31 Thread Minwoo Im
From: Minwoo Im The number of virtual functions(VFs) supported in SR-IOV is 64k as per spec. To test a large number of MSI-X vectors mapping to CPU matrix in the QEMU system, we need much more than 127 VFs. This patch made support for 256 VFs per a physical function(PF). Signed-off-by: Minwoo

[PATCH v2 4/4] hw/nvme: Expand VI/VQ resource to uint32

2024-03-31 Thread Minwoo Im
From: Minwoo Im VI and VQ resources cover queue resources in each VFs in SR-IOV. Current maximum I/O queue pair size is 0x, we can expand them to cover the full number of I/O queue pairs. This patch also fixed Identify Secondary Controller List overflow due to expand of number of secondary

[PATCH v2 2/4] hw/nvme: separate identify data for sec. ctrl list

2024-03-31 Thread Minwoo Im
From: Minwoo Im Secondary controller list for virtualization has been managed by Identify Secondary Controller List data structure with NvmeSecCtrlList where up to 127 secondary controller entries can be managed. The problem hasn't arisen so far because NVME_MAX_VFS has been 127. This patch

[PATCH v2 0/4] hw/nvme: FDP and SR-IOV enhancements

2024-03-31 Thread Minwoo Im
Hello, This patch set added support for Identify Endurance Group List only just for 'endgrpid=1' for FDP. Along with this, the following three patches are to support more than 127 secondary controllers for SR-IOV with VI/VQ resources. [2/4] separated Identify controller data structure for

Re: [PATCH v9 1/2] memory tier: dax/kmem: introduce an abstract layer for finding, allocating, and putting memory types

2024-03-31 Thread SeongJae Park
Hi Ho-Ren, On Fri, 29 Mar 2024 05:33:52 + "Ho-Ren (Jack) Chuang" wrote: > Since different memory devices require finding, allocating, and putting > memory types, these common steps are abstracted in this patch, > enhancing the scalability and conciseness of the code. > > Signed-off-by:

Re: [PATCH net v3] virtio_net: Do not send RSS key if it is not supported

2024-03-31 Thread Michael S. Tsirkin
On Fri, Mar 29, 2024 at 10:16:41AM -0700, Breno Leitao wrote: > There is a bug when setting the RSS options in virtio_net that can break > the whole machine, getting the kernel into an infinite loop. > > Running the following command in any QEMU virtual machine with virtionet > will reproduce

Re: [PULL 0/5] Net patches

2024-03-31 Thread Michael Tokarev
29.03.2024 10:10, Jason Wang: Akihiko Odaki (5): virtio-net: Fix vhost virtqueue notifiers for RSS ebpf: Fix indirections table setting hw/net/net_tx_pkt: Fix virtio header without checksum offloading tap-win32: Remove unnecessary stubs Revert "tap: setting

Re: [PATCH for-9.0] Fix some typos in documentation (found by codespell)

2024-03-31 Thread Michael Tokarev
31.03.2024 19:15, Stefan Weil via wrote: Signed-off-by: Stefan Weil Reviewed-by: Michael Tokarev Wonder if I should review qemu-trivial queue for 9.0, - I think there's nothing in there by now.. /mjt

Re: [PATCH] linux-user/syscall.c: fix setsockopt(SOL_ALG, ALG_SET_KEY)

2024-03-31 Thread Richard Henderson
On 3/30/24 22:48, Michael Tokarev wrote: This setsockopt accepts zero-lengh optlen (current qemu implementation does not allow this). Also, there's no need to make a copy of the key, it is enough to use lock_user() (which accepts zero-length length already).

[PATCH] lsi53c895a: avoid out of bounds access to s->msg[]

2024-03-31 Thread Paolo Bonzini
If no bytes are there to process in the message in phase, the input data latch (s->sidl) is set to s->msg[-1]. Just do nothing since no DMA is performed. Reported-by: Chuhong Yuan Signed-off-by: Paolo Bonzini --- hw/scsi/lsi53c895a.c | 19 --- 1 file changed, 12 insertions(+),

[PATCH] lsi53c895a: detect invalid Block Move instruction

2024-03-31 Thread Paolo Bonzini
The spec for the lsi53c895a says: "If the instruction is a Block Move and a value of 0x00 is loaded into the DBC register, an illegal instruction interrupt occurs if the LSI53C895A is not in target mode, Command phase". Because QEMU only operates in initiator mode, generate the interrupt

Re: qemu process consumes 100% host CPU after reverting snapshot

2024-03-31 Thread Dongli Zhang
To share my test result, I do NOT reproduce the issue with the below command line and QEMU-8.2. However, I can reproduce with QEMU-6.2. The mainloop consumes 100% CPU usage. qemu-system-x86_64 \ --enable-kvm -cpu host -smp 2 -m 8G \ -object

[PATCH] gitlab-ci/cirrus: switch from 'master' to 'latest'

2024-03-31 Thread Michael Tokarev
Commit ab72522797 "gitlab: switch from 'stable' to 'latest' docker container tags" switched most tags to 'latest' but missed cirrus image. Fix this now. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2256 Signed-off-by: Michael Tokarev --- .gitlab-ci.d/cirrus.yml | 2 +- 1 file

[PATCH 2/2] ppc: powernv11: add base support for P11 PowerNV

2024-03-31 Thread Aditya Gupta
Most of the base support is based on P10 PowerNV Signed-off-by: Aditya Gupta --- hw/ppc/pnv.c | 409 + hw/ppc/pnv_core.c | 94 + hw/ppc/pnv_homer.c | 64 ++ hw/ppc/pnv_lpc.c | 14 ++ hw/ppc/pnv_occ.c

[PATCH 1/2] ppc: pseries: add P11 cpu type

2024-03-31 Thread Aditya Gupta
Base support for "--cpu power11" in QEMU Signed-off-by: Aditya Gupta --- docs/system/ppc/pseries.rst | 6 +- hw/ppc/spapr_cpu_core.c | 1 + target/ppc/compat.c | 7 ++ target/ppc/cpu-models.c | 2 + target/ppc/cpu-models.h | 2 + target/ppc/cpu_init.c | 162

[PATCH 0/2] P11 support for QEMU

2024-03-31 Thread Aditya Gupta
This patch series adds support for Power11 pseries and powernv machine targets to emulate VMs running on Power11. Most of the P11 support code has been taken from P10 code in QEMU. And has been tested in pseries, powernv, with and without compat mode. Git Tree for Testing:

RE: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-31 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v1 01/11] Introduce a common abstract struct >HostIOMMUDevice > >Hello Zhenzhong, > >On 3/28/24 04:06, Duan, Zhenzhong wrote: >> Hi Cédric, >> >>> -Original Message- >>> From: Cédric Le Goater >>> Subject: Re:

[PATCH] migration, docs: mark RDMA migration as deprecated

2024-03-31 Thread Li Zhijian via
Except for RDMA migration, other parts of the RDMA subsystem have been removed since 9.1. Due to the lack of unit tests and CI tests for RDMA migration, int the past developing cycles, a few fatal errors were introduced and broke the RDMA migration, and these issues[1][2] were not fixed until

Re: vhost-user-blk reconnect issue

2024-03-31 Thread Yajun Wu
On 3/27/2024 6:47 PM, Stefano Garzarella wrote: External email: Use caution opening links or attachments Hi Yajun, On Mon, Mar 25, 2024 at 10:54:13AM +, Yajun Wu wrote: Hi experts, With latest QEMU (8.2.90), we find two vhost-user-blk backend reconnect failure scenarios: Do you know