[PULL v2 04/20] target/hppa: Fix IIAOQ, IIASQ for pa2.0

2024-04-09 Thread Richard Henderson
The contents of IIAOQ depend on PSW_W. Follow the text in "Interruption Instruction Address Queues", pages 2-13 through 2-15. Tested-by: Sven Schnelle Tested-by: Helge Deller Reported-by: Sven Schnelle Fixes: b10700d826c ("target/hppa: Update IIAOQ, IIASQ for pa2.0") Signed-off-by: Richard Hend

[PULL v2 01/20] tcg/optimize: Do not attempt to constant fold neg_vec

2024-04-09 Thread Richard Henderson
Split out the tail of fold_neg to fold_neg_no_const so that we can avoid attempting to constant fold vector negate. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2150 Signed-off-by: Richard Henderson --- tcg/optimize.c| 17 - tests/tcg/aarch64/test-2

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-04-09 Thread Peter Xu
On Tue, Apr 09, 2024 at 09:32:46AM +0200, Jinpu Wang wrote: > Hi Peter, > > On Mon, Apr 8, 2024 at 6:18 PM Peter Xu wrote: > > > > On Mon, Apr 08, 2024 at 04:07:20PM +0200, Jinpu Wang wrote: > > > Hi Peter, > > > > Jinpu, > > > > Thanks for joining the discussion. > > > > > > > > On Tue, Apr 2, 2

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

2024-04-09 Thread fan
On Fri, Apr 05, 2024 at 01:18:56PM +0100, Jonathan Cameron wrote: > On Mon, 25 Mar 2024 12:02:27 -0700 > nifan@gmail.com wrote: > > > From: Fan Ni > > > > To simulate FM functionalities for initiating Dynamic Capacity Add > > (Opcode 5604h) and Dynamic Capacity Release (Opcode 5605h) as in C

Re: [PULL 0/4] Edk2 20240409 patches

2024-04-09 Thread Peter Maydell
raxel/qemu.git tags/edk2-20240409-pull-request > > for you to fetch changes up to e3404e01c7f74efdc3440ddfd339d67bf7a8410e: > > edk2: rebuild binaries with correct version information (2024-04-09 > 18:21:23 +0200) > > ---

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

2024-04-09 Thread Andrew Morton
On Tue, 9 Apr 2024 12:00:06 -0700 "Ho-Ren (Jack) Chuang" wrote: > Hi Jonathan, > > On Fri, Apr 5, 2024 at 6:56 AM Jonathan Cameron > wrote: > > > > On Fri, 5 Apr 2024 00:07:05 + > > "Ho-Ren (Jack) Chuang" wrote: > > > > > Since different memory devices require finding, allocating, and pu

[PATCH v1 2/3] hw/i386: Add 9.1 machine types for i440fx/q35

2024-04-09 Thread Michael Roth
Define the 9.1 machine types and make them identical to 9.0 for now. This will be needed to add PC compat options for 9.1+ features. Signed-off-by: Michael Roth --- hw/i386/pc_piix.c | 12 +++- hw/i386/pc_q35.c | 11 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --

[PATCH v1 1/3] i386/sev: Add 'legacy-vm-type' parameter for SEV guest objects

2024-04-09 Thread Michael Roth
QEMU will currently automatically make use of the KVM_SEV_INIT2 API for initializing SEV and SEV-ES guests verses the older KVM_SEV_INIT/KVM_SEV_ES_INIT interfaces. However, the older interfaces will silently avoid sync'ing FPU/XSAVE state to the VMSA prior to encryption, thus relying on behavior

Re: [PATCH 9/9] accel/tcg: Improve can_do_io management

2024-04-09 Thread Gregory Price
On Sat, Apr 06, 2024 at 12:32:48PM -1000, Richard Henderson wrote: > We already attempted to set and clear can_do_io before the first > and last insns, but only used the initial value of max_insns and > the call to translator_io_start to find those insns. > > Now that we track insn_start in DisasC

[PATCH v1 3/3] hw/i386/sev: Use legacy SEV VM types for older machine types

2024-04-09 Thread Michael Roth
Newer 9.1 machine types will default to using the KVM_SEV_INIT2 API for creating SEV/SEV-ES going forward. However, this API results in guest measurement changes which are generally not expected for users of these older guest types and can cause disruption if they switch to a newer QEMU/kernel vers

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

2024-04-09 Thread Ho-Ren (Jack) Chuang
On Tue, Apr 9, 2024 at 2:50 PM Andrew Morton wrote: > > On Tue, 9 Apr 2024 12:00:06 -0700 "Ho-Ren (Jack) Chuang" > wrote: > > > Hi Jonathan, > > > > On Fri, Apr 5, 2024 at 6:56 AM Jonathan Cameron > > wrote: > > > > > > On Fri, 5 Apr 2024 00:07:05 + > > > "Ho-Ren (Jack) Chuang" wrote: > >

[PATCH for-9.1 v1 0/3] Add SEV/SEV-ES machine compat options for KVM_SEV_INIT2

2024-04-09 Thread Michael Roth
These patches are also available at: https://github.com/amdese/qemu/commits/sev-init-legacy-v1 and are based on top Paolo's qemu-coco-queue branch containing the following patches: [PATCH for-9.1 00/26] x86, kvm: common confidential computing subset https://lore.kernel.org/all/202403221811

[PATCH for-9.0] ppc440_pcix: Do not expose a bridge device on PCI bus

2024-04-09 Thread BALATON Zoltan
Real 460EX SoC apparently does not expose a bridge device and having it appear on PCI bus confuses an AmigaOS file system driver that uses this to detect which machine it is running on. Since values written here by firmware are never read, just ignore these writes and drop the bridge device. Signe

Re: [PATCH v2 23/28] target/i386: Honor xfeatures in xrstor_sigcontext

2024-04-09 Thread Richard Henderson
On 4/9/24 08:09, Richard Henderson wrote: On 4/8/24 21:44, Paolo Bonzini wrote: +    /* + * Restore the features indicated in the frame, masked by + * those currently enabled.  Re-check the frame size. + * ??? It is not clear where the kernel does this, but it +  

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-04-09 Thread Zhijian Li (Fujitsu)
on 4/10/2024 3:46 AM, Peter Xu wrote: >> Is there document/link about the unittest/CI for migration tests, Why >> are those tests missing? >> Is it hard or very special to set up an environment for that? maybe we >> can help in this regards. > See tests/qtest/migration-test.c. We put most of ou

Re: [PATCH v11 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-04-09 Thread Huang, Ying
"Ho-Ren (Jack) Chuang" writes: > On Fri, Apr 5, 2024 at 7:03 AM Jonathan Cameron > wrote: >> >> On Fri, 5 Apr 2024 00:07:06 + >> "Ho-Ren (Jack) Chuang" wrote: >> >> > The current implementation treats emulated memory devices, such as >> > CXL1.1 type3 memory, as normal DRAM when they are e

Re: [PATCH v2] vhost: don't set vring call if guest notifiers is not enabled

2024-04-09 Thread Gavin Liu
Hi Michael, ― ✀ ― stderr: ** ERROR:../tests/qtest/vhost-user-test.c:468:chr_read: assertion failed (err == NULL): Bad file descriptor (g-unix-error-quark, 0) ** ERROR:../tests/qtest/qos-test.c:191:subprocess_run_one_test:

Re: [PATCH RFC v3 0/6] virtio-net: add support for SR-IOV emulation

2024-04-09 Thread Yui Washizu
On 2024/03/05 17:58, Akihiko Odaki wrote: Based-on: <20240228-reuse-v8-0-282660281...@daynix.com> ("[PATCH v8 00/15] hw/pci: SR-IOV related fixes and improvements") Introduction This series is based on the RFC series submitted by Yui Washizu[1]. See also [2] for the context. Thi

Re: [PATCH for-9.0] ppc440_pcix: Do not expose a bridge device on PCI bus

2024-04-09 Thread Nicholas Piggin
On Wed Apr 10, 2024 at 9:55 AM AEST, BALATON Zoltan wrote: > Real 460EX SoC apparently does not expose a bridge device and having > it appear on PCI bus confuses an AmigaOS file system driver that uses > this to detect which machine it is running on. Since values written > here by firmware are neve

[PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Cindy Lu
When the guest triggers vhost_stop and then virtio_reset, the vector will the IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. After that, the guest called vhost_net_start, (at this time, the configure vector is still VIRTIO_NO_VECTOR), vector 0 still was not "init". The gue

[PATCH v2 0/1] virtio-pci: Fix the crash that the vector was used after released

2024-04-09 Thread Cindy Lu
During the booting process of the Vyatta image, the behavior of the called function in qemu is as follows: 1. vhost_net_stop() was triggered by guest image . This will call the function virtio_pci_set_guest_notifiers() with assgin= false, and virtio_pci_set_guest_notifiers(??? will release the irq

Re: [PULL 4/7] hw/virtio: Fix packed virtqueue flush used_idx

2024-04-09 Thread Eugenio Perez Martin
On Tue, Apr 9, 2024 at 7:40 PM Michael Tokarev wrote: > > 09.04.2024 10:32, Michael S. Tsirkin wrote: > > From: Wafer > > > > In the event of writing many chains of descriptors, the device must > > write just the id of the last buffer in the descriptor chain, skip > > forward the number of descri

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Jason Wang
On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > When the guest triggers vhost_stop and then virtio_reset, the vector will the > IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. > After that, the guest called vhost_net_start, (at this time, the configure > vector is still

[PATCH] hw/audio/virtio-snd: Remove unused assignment

2024-04-09 Thread Philippe Mathieu-Daudé
Coverity reported: >>> CID 1542933: Code maintainability issues (UNUSED_VALUE) >>> CID 1542934: Code maintainability issues (UNUSED_VALUE) >>> Assigning value "NULL" to "stream" here, but that stored value is overwritten before it can be used. Simply remove the unu

[Stable-7.2.11 10/41] hw/scsi/lsi53c895a: add timer to scripts processing

2024-04-09 Thread Michael Tokarev
From: Sven Schnelle HP-UX 10.20 seems to make the lsi53c895a spinning on a memory location under certain circumstances. As the SCSI controller and CPU are not running at the same time this loop will never finish. After some time, the check loop interrupts with a unexpected device disconnect. This

[Stable-7.2.11 03/41] target/arm: align exposed ID registers with Linux

2024-04-09 Thread Michael Tokarev
From: Zhuojia Shen In CPUID registers exposed to userspace, some registers were missing and some fields were not exposed. This patch aligns exposed ID registers and their fields with what the upstream kernel currently exposes. Specifically, the following new ID registers/fields are exposed to u

[Stable-7.2.11 15/41] hw/nvme: cleanup error reporting in nvme_init_pci()

2024-04-09 Thread Michael Tokarev
From: Klaus Jensen Replace the local Error variable with errp and ERRP_GUARD() and change the return value to bool. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen (cherry picked from commit 973f76cf7743545a5d8a0a8bfdfe2cd02aa3e238) Signed-off-by: Michael Tokarev (Mjt: needed

[Stable-7.2.11 00/41] Patch Round-up for stable 7.2.11, freeze on 2024-04-20

2024-04-09 Thread Michael Tokarev
The following patches are queued for QEMU stable v7.2.11: https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 Patch freeze is 2024-04-20, and the release is planned for 2024-04-22: https://wiki.qemu.org/Planning/7.2 Please respond here or CC qemu-sta...@nongnu.org on any additional p

[Stable-7.2.11 08/41] hw/scsi/lsi53c895a: stop script on phase mismatch

2024-04-09 Thread Michael Tokarev
From: Sven Schnelle Netbsd isn't happy with qemu lsi53c895a emulation: cd0(esiop0:0:2:0): command with tag id 0 reset esiop0: autoconfiguration error: phase mismatch without command esiop0: autoconfiguration error: unhandled scsi interrupt, sist=0x80 sstat1=0x0 DSA=0x23a64b1 DSP=0x50 This is b

[Stable-7.2.11 02/41] ui/cocoa: Fix window clipping on macOS 14

2024-04-09 Thread Michael Tokarev
From: David Parsons macOS Sonoma changes the NSView.clipsToBounds to false by default where it was true in earlier version of macOS. This causes the window contents to be occluded by the frame at the top of the window. This fixes the issue by conditionally compiling the clipping on Sonoma to true

[Stable-7.2.11 13/41] Avoid unaligned fetch in ladr_match()

2024-04-09 Thread Michael Tokarev
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:

[Stable-7.2.11 04/41] tests/tcg/aarch64/sysregs.c: Use S syntax for id_aa64zfr0_el1 and id_aa64smfr0_el1

2024-04-09 Thread Michael Tokarev
From: Peter Maydell Some assemblers will complain about attempts to access id_aa64zfr0_el1 and id_aa64smfr0_el1 by name if the test binary isn't built for the right processor type: /tmp/ccASXpLo.s:782: Error: selected processor does not support system register name 'id_aa64zfr0_el1' /tmp/ccAS

[Stable-7.2.11 19/41] pcie: Introduce pcie_sriov_num_vfs

2024-04-09 Thread Michael Tokarev
From: Akihiko Odaki igb can use this function to change its behavior depending on the number of virtual functions currently enabled. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang (cherry p

[Stable-7.2.11 01/41] gitlab: update FreeBSD Cirrus CI image to 13.3

2024-04-09 Thread Michael Tokarev
From: Daniel P. Berrangé The 13.2 images have been deleted from gcloud Cc: qemu-sta...@nongnu.org Signed-off-by: Daniel P. Berrangé Reviewed-by: Peter Maydell Message-id: 20240304144456.3825935-3-berra...@redhat.com Signed-off-by: Peter Maydell (cherry picked from commit 9ea920dc28254cd9a363a

[Stable-7.2.11 12/41] e1000e: fix link state on resume

2024-04-09 Thread Michael Tokarev
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

[Stable-7.2.11 22/41] hmat acpi: Fix out of bounds access due to missing use of indirection

2024-04-09 Thread Michael Tokarev
From: Jonathan Cameron With a numa set up such as -numa nodeid=0,cpus=0 \ -numa nodeid=1,memdev=mem \ -numa nodeid=2,cpus=1 and appropriate hmat_lb entries the initiator list is correctly computed and writen to HMAT as 0,2 but then the LB data is accessed using the node id (here 2), landing out

[Stable-7.2.11 18/41] hw/nvme: add machine compatibility parameter to enable msix exclusive bar

2024-04-09 Thread Michael Tokarev
From: Klaus Jensen Commit 1901b4967c3f ("hw/block/nvme: move msix table and pba to BAR 0") moved the MSI-X table and PBA to BAR 0 to make room for enabling CMR and PMR at the same time. As reported by Julien Grall in #2184, this breaks migration through system hibernation. Add a machine compatib

[Stable-7.2.11 06/41] hw/rtc/sun4v-rtc: Relicense to GPLv2-or-later

2024-04-09 Thread Michael Tokarev
From: Peter Maydell The sun4v RTC device model added under commit a0e893039cf2ce0 in 2016 was unfortunately added with a license of GPL-v3-or-later, which is not compatible with other QEMU code which has a GPL-v2-only license. Relicense the code in the .c and the .h file to GPL-v2-or-later, to m

[Stable-7.2.11 30/41] target/i386: fix direction of "32-bit MMU" test

2024-04-09 Thread Michael Tokarev
From: Paolo Bonzini The low bit of MMU indices for x86 TCG indicates whether the processor is in 32-bit mode and therefore linear addresses have to be masked to 32 bits. However, the index was computed incorrectly, leading to possible conflicts in the TLB for any address above 4G. Analyzed-by: M

[Stable-7.2.11 26/41] tests/unit: Bump test-replication timeout to 60 seconds

2024-04-09 Thread Michael Tokarev
From: Kevin Wolf We're seeing timeouts for this test on CI runs (specifically for ubuntu-20.04-s390x-all). It doesn't fail consistently, but even the successful runs take about 27 or 28 seconds, which is not very far from the 30 seconds timeout. Bump the timeout a bit to make failure less likely

[Stable-7.2.11 23/41] migration: Skip only empty block devices

2024-04-09 Thread Michael Tokarev
From: 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 regr

[Stable-7.2.11 33/41] hw/scsi/scsi-generic: Fix io_timeout property not applying

2024-04-09 Thread Michael Tokarev
From: Lorenz Brun The io_timeout property, introduced in c9b6609 (part of 6.0) is silently overwritten by the hardcoded default value of 30 seconds (DEFAULT_IO_TIMEOUT) in scsi_generic_realize because that function is being called after the properties have already been applied. The property defi

[Stable-7.2.11 07/41] system/qdev-monitor: move drain_call_rcu call under if (!dev) in qmp_device_add()

2024-04-09 Thread Michael Tokarev
From: Dmitrii Gavrilov Original goal of addition of drain_call_rcu to qmp_device_add was to cover the failure case of qdev_device_add. It seems call of drain_call_rcu was misplaced in 7bed89958bfbf40df what led to waiting for pending RCU callbacks under happy path too. What led to overall perform

[Stable-7.2.11 36/41] tcg/optimize: Fix sign_mask for logical right-shift

2024-04-09 Thread Michael Tokarev
From: Richard Henderson The 'sign' computation is attempting to locate the sign bit that has been repeated, so that we can test if that bit is known zero. That computation can be zero if there are no known sign repetitions. Cc: qemu-sta...@nongnu.org Fixes: 93a967fbb57 ("tcg/optimize: Propagate

[Stable-7.2.11 21/41] pcie_sriov: Validate NumVFs

2024-04-09 Thread Michael Tokarev
From: Akihiko Odaki The guest may write NumVFs greater than TotalVFs and that can lead to buffer overflow in VF implementations. Cc: qemu-sta...@nongnu.org Fixes: CVE-2024-26327 Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization (SR/IOV)") Signed-off-by: Akihiko Odaki M

[Stable-7.2.11 28/41] target/i386: introduce function to query MMU indices

2024-04-09 Thread Michael Tokarev
From: Paolo Bonzini Remove knowledge of specific MMU indexes (other than MMU_NESTED_IDX and MMU_PHYS_IDX) from mmu_translate(). This will make it possible to split 32-bit and 64-bit MMU indexes. Signed-off-by: Paolo Bonzini (cherry picked from commit 5f97afe2543f09160a8d123ab6e2e8c6d98fa9ce) S

[Stable-7.2.11 40/41] hw/net/virtio-net: fix qemu set used ring flag even vhost started

2024-04-09 Thread Michael Tokarev
From: Yajun Wu When vhost-user or vhost-kernel is handling virtio net datapath, QEMU should not touch used ring. But with vhost-user socket reconnect scenario, in a very rare case (has pending kick event). VRING_USED_F_NO_NOTIFY is set by QEMU in following code path: #0 virtio_queue_sp

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Jason Wang
On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > When the guest triggers vhost_stop and then virtio_reset, the vector will the > IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. > After that, the guest called vhost_net_start, (at this time, the configure > vector is still

[Stable-7.2.11 35/41] virtio-net: Fix vhost virtqueue notifiers for RSS

2024-04-09 Thread Michael Tokarev
From: Akihiko Odaki virtio_net_guest_notifier_pending() and virtio_net_guest_notifier_mask() checked VIRTIO_NET_F_MQ to know there are multiple queues, but VIRTIO_NET_F_RSS also enables multiple queues. Refer to n->multiqueue, which is set to true either of VIRTIO_NET_F_MQ or VIRTIO_NET_F_RSS is

[Stable-7.2.11 05/41] target/arm: Fix SME full tile indexing

2024-04-09 Thread Michael Tokarev
From: Richard Henderson For the outer product set of insns, which take an entire matrix tile as output, the argument is not a combined tile+column. Therefore using get_tile_rowcol was incorrect, as we extracted the tile number from itself. The test case relies only on assembler support for SME,

[Stable-7.2.11 27/41] tests: Raise timeouts for bufferiszero and crypto-tlscredsx509

2024-04-09 Thread Michael Tokarev
From: Peter Maydell On our gcov CI job, the bufferiszero and crypto-tlscredsx509 tests time out occasionally, making the job flaky. Double the timeout on these two tests. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2221 Signed-off-by: Peter Maydell Reviewe

[Stable-7.2.11 34/41] monitor/hmp-cmds-target: Append a space in error message in gpa2hva()

2024-04-09 Thread Michael Tokarev
From: Yao Xingtao In qemu monitor mode, when we use gpa2hva command to print the host virtual address corresponding to a guest physical address, if the gpa is not in RAM, the error message is below: (qemu) gpa2hva 0x75000 Memory at address 0x75000is not RAM A space is missed between

[Stable-7.2.11 32/41] target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int'

2024-04-09 Thread Michael Tokarev
From: Song Gao qemu-system-loongarch64 assert failed with the option '-d int', the helper_idle() raise an exception EXCP_HLT, but the exception name is undefined. Signed-off-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240321123606.1704900-1-gaos...@loongson.cn> (cherry pic

[Stable-7.2.11 31/41] target/i386: Revert monitor_puts() in do_inject_x86_mce()

2024-04-09 Thread Michael Tokarev
From: Tao Su monitor_puts() doesn't check the monitor pointer, but do_inject_x86_mce() may have a parameter with NULL monitor pointer. Revert monitor_puts() in do_inject_x86_mce() to fix, then the fact that we send the same message to monitor and log is again more obvious. Fixes: bf0c50d4aa85 (m

[Stable-7.2.11 38/41] gitlab-ci/cirrus: switch from 'master' to 'latest'

2024-04-09 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 Message-id: 20240401051633.2780456-1-...@tls.msk.ru

[Stable-7.2.11 14/41] hw/nvme: clean up confusing use of errp/local_err

2024-04-09 Thread Michael Tokarev
From: Klaus Jensen Remove an unnecessary local Error value in nvme_realize(). In the process, change nvme_check_constraints() to return a bool. Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen (cherry picked from commit 784fd35387e9e6b42e3f365ddf4

[Stable-7.2.11 09/41] hw/scsi/lsi53c895a: add missing decrement of reentrancy counter

2024-04-09 Thread Michael Tokarev
From: Sven Schnelle When the maximum count of SCRIPTS instructions is reached, the code stops execution and returns, but fails to decrement the reentrancy counter. This effectively renders the SCSI controller unusable because on next entry the reentrancy counter is still above the limit. This bu

[Stable-7.2.11 24/41] tests/unit: Bump test-aio-multithread test timeout to 2 minutes

2024-04-09 Thread Michael Tokarev
From: Thomas Huth When running the tests in slow mode on a very loaded system and with --enable-debug, the test-aio-multithread can take longer than 1 minute. Bump the timeout to two minutes to make sure that it also passes in such situations. Signed-off-by: Thomas Huth Message-Id: <20231215070

[Stable-7.2.11 20/41] hw/nvme: Use pcie_sriov_num_vfs()

2024-04-09 Thread Michael Tokarev
From: Akihiko Odaki nvme_sriov_pre_write_ctrl() used to directly inspect SR-IOV configurations to know the number of VFs being disabled due to SR-IOV configuration writes, but the logic was flawed and resulted in out-of-bound memory access. It assumed PCI_SRIOV_NUM_VF always has the number of cu

[Stable-7.2.11 25/41] tests/unit: Bump test-crypto-block test timeout to 5 minutes

2024-04-09 Thread Michael Tokarev
From: Thomas Huth When running the tests in slow mode on a very loaded system and with --enable-debug, the test-crypto-block can take longer than 4 minutes. Bump the timeout to 5 minutes to make sure that it also passes in such situations. Signed-off-by: Thomas Huth Message-Id: <20231215070357.

[Stable-7.2.11 41/41] hw/virtio: Fix packed virtqueue flush used_idx

2024-04-09 Thread Michael Tokarev
From: Wafer In the event of writing many chains of descriptors, the device must write just the id of the last buffer in the descriptor chain, skip forward the number of descriptors in the chain, and then repeat the operations for the rest of chains. Current QEMU code writes all the buffer ids co

[Stable-7.2.11 29/41] target/i386: use separate MMU indexes for 32-bit accesses

2024-04-09 Thread Michael Tokarev
From: Paolo Bonzini Accesses from a 32-bit environment (32-bit code segment for instruction accesses, EFER.LMA==0 for processor accesses) have to mask away the upper 32 bits of the address. While a bit wasteful, the easiest way to do so is to use separate MMU indexes. These days, QEMU anyway is

[Stable-7.2.11 16/41] hw/nvme: separate 'serial' property for VFs

2024-04-09 Thread Michael Tokarev
From: Minwoo Im Currently, when a VF is created, it uses the 'params' object of the PF as it is. In other words, the 'params.serial' string memory area is also shared. In this situation, if the VF is removed from the system, the PF's 'params.serial' object is released with object_finalize() follo

[Stable-7.2.11 17/41] hw/nvme: generalize the mbar size helper

2024-04-09 Thread Michael Tokarev
From: Klaus Jensen Generalize the mbar size helper such that it can handle cases where the MSI-X table and PBA are expected to be in an exclusive bar. Cc: qemu-sta...@nongnu.org Reviewed-by: Jesper Wendel Devantier Signed-off-by: Klaus Jensen (cherry picked from commit ee7bda4d38cda3eaf114c850

[Stable-7.2.11 11/41] make-release: switch to .xz format by default

2024-04-09 Thread Michael Tokarev
For a long time, we provide two compression formats in the download area, .bz2 and .xz. There's absolutely no reason to provide two in parallel, .xz compresses better, and all the links we use points to .xz. Downstream distributions mostly use .xz too. For the release maintenance providing two f

[Stable-7.2.11 37/41] target/hppa: Clear psw_n for BE on use_nullify_skip path

2024-04-09 Thread Michael Tokarev
From: Richard Henderson Along this path we have already skipped the insn to be nullified, so the subsequent insn should be executed. Cc: qemu-sta...@nongnu.org Reported-by: Sven Schnelle Tested-by: Sven Schnelle Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry pic

[Stable-7.2.11 39/41] hw/intc/arm_gicv3: ICC_HPPIR* return SPURIOUS if int group is disabled

2024-04-09 Thread Michael Tokarev
From: Peter Maydell If the group of the highest priority pending interrupt is disabled via ICC_IGRPEN*, the ICC_HPPIR* registers should return INTID_SPURIOUS, not the interrupt ID. (See the GIC architecture specification pseudocode functions ICC_HPPIR1_EL1[] and HighestPriorityPendingInterrupt()

Re: [External] Re: [PATCH v11 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-04-09 Thread Ho-Ren (Jack) Chuang
On Tue, Apr 9, 2024 at 7:33 PM Huang, Ying wrote: > > "Ho-Ren (Jack) Chuang" writes: > > > On Fri, Apr 5, 2024 at 7:03 AM Jonathan Cameron > > wrote: > >> > >> On Fri, 5 Apr 2024 00:07:06 + > >> "Ho-Ren (Jack) Chuang" wrote: > >> > >> > The current implementation treats emulated memory dev

Re: [PATCH v9] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-04-09 Thread Thomas Huth
On 09/04/2024 09.47, Shaoqin Huang wrote: Hi Thmoas, On 4/9/24 13:33, Thomas Huth wrote: +    assert_has_feature(qts, "host", "kvm-pmu-filter"); So you assert here that the feature is available ...   assert_has_feature(qts, "host", "kvm-steal-time");   assert_has_feature

Re: [PATCH v13 00/24] target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI

2024-04-09 Thread Jinjie Ruan via
Ping. On 2024/4/7 16:17, Jinjie Ruan wrote: > This patch set implements FEAT_NMI and FEAT_GICv3_NMI for ARMv8. These > introduce support for a new category of interrupts in the architecture > which we can use to provide NMI like functionality. > > There are two modes for using this FEAT_NMI. When

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Cindy Lu
On Wed, Apr 10, 2024 at 1:36 PM Jason Wang wrote: > > On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > > > When the guest triggers vhost_stop and then virtio_reset, the vector will > > the > > IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. > > After that, the guest cal

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Cindy Lu
On Wed, Apr 10, 2024 at 1:48 PM Jason Wang wrote: > > On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > > > When the guest triggers vhost_stop and then virtio_reset, the vector will > > the > > IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. > > After that, the guest cal

Re: [PATCH for-9.1 04/19] target/i386: do not use s->tmp0 and s->tmp4 to compute flags

2024-04-09 Thread Richard Henderson
On 4/9/24 06:43, Paolo Bonzini wrote: Create a new temporary whenever flags have to use one, instead of using s->tmp0 or s->tmp4. NULL can now be passed as the scratch register to gen_prepare_*. Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 54 +--

Re: [RFC PATCH-for-9.0?] hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()

2024-04-09 Thread Akihiko Odaki
On 2024/04/10 3:04, Philippe Mathieu-Daudé wrote: If a fragmented packet size is too short, do not try to calculate its checksum. Reproduced using: $ cat << EOF | qemu-system-i386 -display none -nodefaults \ -machine q35,accel=qtest -m 32M \

<    1   2   3