Re: [PATCH v3 00/11] hw: Strengthen SysBus & QBus API

2024-10-11 Thread Paolo Bonzini
On 2/8/24 19:12, Philippe Mathieu-Daudé wrote: Hi, This series ensure following is called *before* a device is realized: - qbus_new() - sysbus_init_mmio() - qdev_init_gpio_in_named_with_opaque() and these are called *after* it is: - sysbus_mmio_map() - sysbus_connect_irq(), - qdev_connect_gpio_

[PATCH] accel/kvm: check for KVM_CAP_MEMORY_ATTRIBUTES on vm

2024-10-11 Thread Paolo Bonzini
The exact set of available memory attributes can vary by VM. In the future it might vary depending on enabled capabilities, too. Query the extension on the VM level instead of on the KVM level, and only after architecture-specific initialization. Inspired by an analogous patch by Tom Dohrmann.

[PATCH] accel/kvm: check for KVM_CAP_MULTI_ADDRESS_SPACE on vm

2024-10-11 Thread Paolo Bonzini
KVM_CAP_MULTI_ADDRESS_SPACE used to be a global capability, but with the introduction of AMD SEV-SNP confidential VMs, the number of address spaces can vary by VM type. Query the extension on the VM level instead of on the KVM level. Inspired by an analogous patch by Tom Dohrmann. Signed-off-by:

Better QAPI/QOM integration

2024-10-11 Thread Markus Armbruster
This memo is heavily indebted to Kevin Wolf. Its mistakes, however, are mine. = Critique of current state = 1. QOM properties serve several purposes: initial configuration (external interface), run time control and monitoring (external interface), and internal purposes like versioning. Which pu

Re: [PATCH] sched_attr: Do not define for glibc >= 2.41

2024-10-11 Thread Paolo Bonzini
On 10/11/24 07:48, Khem Raj wrote: glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions and struct sched_attr. Therefore, it needs to be checked for here as well before defining sched_attr Fixes builds with glibc/trunk [1] https://sourceware.org/git/?p=glibc.git

Re: [PATCH v2 5/8] target/riscv: Add Smdbltrp CSRs handling

2024-10-11 Thread Clément Léger
On 11/10/2024 05:30, Alistair Francis wrote: > On Wed, Sep 25, 2024 at 10:02 PM Clément Léger wrote: >> >> Add `ext_smdbltrp`in RISCVCPUConfig and implement MSTATUS.MDT behavior. >> >> Signed-off-by: Clément Léger >> --- >> target/riscv/cpu_bits.h | 1 + >> target/riscv/cpu_cfg.h | 1 + >>

Re: [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it

2024-10-11 Thread Thomas Huth
On 03/05/2024 23.34, Guenter Roeck wrote: Hi, On Thu, Feb 08, 2024 at 07:12:40PM +0100, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Yoshinori Sato qemu 9.0 fails to boot Linux fro

Re: [PATCH v2 1/1] virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR

2024-10-11 Thread David Hildenbrand
On 09.10.24 11:58, Gao Shiyuan wrote: As shown below, if a virtio PCI device is attached under a pci-bridge, the MR of VirtIOPCIRegion does not belong to any address space. So memory_region_find cannot be used to search for this MR. Introduce the virtio-pci and pci_bridge address spaces to solve

[PATCH v2] scripts/archive-source: find directory name for subprojects

2024-10-11 Thread Paolo Bonzini
Rust subprojects have the semantic version (followed by -rs) in the subproject name, but the full version (without -rs) is used by crates.io for the root directory of the tarball. Teach scripts/archive-source.sh to look for the root directory name in wrap files. Signed-off-by: Paolo Bonzini ---

[PATCH] accel/kvm: check for KVM_CAP_READONLY_MEM on VM

2024-10-11 Thread Paolo Bonzini
From: Tom Dohrmann KVM_CAP_READONLY_MEM used to be a global capability, but with the introduction of AMD SEV-SNP confidential VMs, this extension is not always available on all VM types [1,2]. Query the extension on the VM level instead of on the KVM level. [1] https://patchwork.kernel.org/pro

Re: [PATCH] accel/kvm: check for KVM_CAP_READONLY_MEM on VM

2024-10-11 Thread Paolo Bonzini
Queued, thanks. (Sorry about the message I have just sent with your patch, I used the wrong script!) Paolo

Re: [PATCH] sched_attr: Do not define for glibc >= 2.41

2024-10-11 Thread Laurent Vivier
Le 11/10/2024 à 11:08, Paolo Bonzini a écrit : On 10/11/24 07:48, Khem Raj wrote: glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions and struct sched_attr. Therefore, it needs to be checked for here as well before defining sched_attr Fixes builds with glibc/tru

Re: [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it

2024-10-11 Thread Philippe Mathieu-Daudé
On 11/10/24 05:23, Thomas Huth wrote: On 03/05/2024 23.34, Guenter Roeck wrote: Hi, On Thu, Feb 08, 2024 at 07:12:40PM +0100, Philippe Mathieu-Daudé wrote: We should not wire IRQs on unrealized device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Yoshinori S

Re: [PATCH 16/17] Revert "hw/sh4/r2d: Realize IDE controller before accessing it"

2024-10-11 Thread Philippe Mathieu-Daudé
On 11/10/24 10:19, Thomas Huth wrote: This reverts commit 3c5f86a22686ef475a8259c0d8ee714f61c770c9. Changing the order here caused a regression with the "tuxrun" kernels (from https://storage.tuxboot.com/20230331/) - ATA commands fail with a "ata1: lost interrupt (Status 0x58)" message. Apparent

Re: [PATCH v3 00/11] hw: Strengthen SysBus & QBus API

2024-10-11 Thread Philippe Mathieu-Daudé
On 11/10/24 05:56, Paolo Bonzini wrote: On 2/8/24 19:12, Philippe Mathieu-Daudé wrote: Hi, This series ensure following is called *before* a device is realized: - qbus_new() - sysbus_init_mmio() - qdev_init_gpio_in_named_with_opaque() and these are called *after* it is: - sysbus_mmio_map() - s

[PATCH 1/2] tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY

2024-10-11 Thread Stefan Berger
Use the new ptm_cap_n structure for getting the PTM_GET_CAPABILITY response from swtpm. Previously only 17 bits could possibly have been set in ptm_cap (=uint64_t) in big endian order and those bits are now found in the 2nd 32bit word in the response in the caps field. This data structure makes it

[PATCH 0/2] tpm: Resolve potential blocking forever issue

2024-10-11 Thread Stefan Berger
In case swtpm was to return a control channel message with an error code it would only return 4 bytes. However, some of the commands expect a response with more bytes and QEMU would get stuck in qemu_chr_fe_read_all() waiting for bytes following the error code. Therefore, read the response in 2 pas

[PATCH 2/2] tpm_emulator: Read control channel response in 2 passes

2024-10-11 Thread Stefan Berger
Error responses from swtpm are always only 4 bytes long. Therefore, read the entire response in 2 passes and stop if the first 4 bytes indicate an error response with no subsequent bytes readable. Read the rest in a 2nd pass, if needed. This avoids getting stuck while waiting for too many bytes if

[PATCH 1/3] docs: fix invalid footnote syntax

2024-10-11 Thread Paolo Bonzini
All footnotes must come after a separator in reStructuredText. Fix the two files in which this does not happen. This mistake is caught by Sphinx 8.1.0 as an unreferenced footnote. Signed-off-by: Paolo Bonzini --- docs/devel/atomics.rst | 2 +- docs/devel/build-system.rst | 4 ++-- 2 files

[PATCH 0/3] docs: fix and cleanup footnotes

2024-10-11 Thread Paolo Bonzini
Sphinx 8.1.0 got a lot better at detecting unreferenced footnotes, and we have three of them---which causes the build to fail when the latest version of sphinx is installed from Pip. Patches 1 and 2 fix them, while the third is a general improvement in the appearance of the rendered footnotes and

[PATCH 3/3] docs: use consistent markup for footnotes

2024-10-11 Thread Paolo Bonzini
Always use a named reference for clarity, and ensure the space is escaped if the footnote must attach to the preceding word. Signed-off-by: Paolo Bonzini --- docs/devel/atomics.rst | 6 +++--- docs/devel/build-system.rst | 2 +- docs/devel/loads-stores.rst | 2 +- do

Re: [PATCH v6 00/12] Use Intel DSA accelerator to offload zero page checking in multifd live migration.

2024-10-11 Thread Peter Xu
On Wed, Oct 09, 2024 at 04:45:58PM -0700, Yichen Wang wrote: > v6 > * Rebase on top of 838fc0a8769d7cc6edfe50451ba4e3368395f5c1; > * Refactor code to have clean history on all commits; > * Add comments on DSA specific defines about how the value is picked; > * Address all comments from v5 reviews a

[PULL v3 00/18] Rust initial PoC + meson changes for 2024-10-07

2024-10-11 Thread Paolo Bonzini
The following changes since commit b5ab62b3c0050612c7f9b0b4baeb44ebab42775a: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-10-04 19:28:37 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch c

Re: [PATCH] linux-user/vm86: Fix compilation with Clang

2024-10-11 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > Since commit 95b9c27c81 ("linux-user: Remove unused handle_vm86_fault") > a bunch of other "static inline" function are now unused, too. Clang > warns about such unused "static inline" functions in .c files, so the > build currently breaks when compiling wi

Re: [PULL 10/23] linux-user: Remove unused handle_vm86_fault

2024-10-11 Thread Thomas Huth
On 04/10/2024 18.03, Michael Tokarev wrote: From: "Dr. David Alan Gilbert" handle_vm86_fault has been unused since: 1ade5b2fed ("linux-user/i386: Split out maybe_handle_vm86_trap") Remove it, and it's local macros. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Reviewed-b

[PULL v3 11/18] meson: fix machine option for x86_version

2024-10-11 Thread Paolo Bonzini
From: Pierrick Bouvier s/mbmi1/mbmi/ When configuring with -Dx86_version >= 3, meson step works, but compilation fails because option -mbmi1 is unknown. Signed-off-by: Pierrick Bouvier Reviewed-by: Alex Bennée Tested-by: Alex Bennée Link: https://lore.kernel.org/r/20241004223715.1275428-1-p

Re: [PATCH v2 0/4] qemu-ga: Fix some potential issues find by coverity

2024-10-11 Thread Konstantin Kostiuk
On Fri, Oct 11, 2024 at 6:19 AM Dehan Meng wrote: > v2: > Split v1 up to separate commits for each logically independent change > > Dehan Meng (4): > sscanf return values are checked to ensure correct parsing. > Proper initialization of n to 0 for getline to function correctly. > Avoiding f

[PATCH] target/arm: Store FPSR cumulative exception bits in env->vfp.fpsr

2024-10-11 Thread Peter Maydell
Currently we store the FPSR cumulative exception bits in the float_status fields, and use env->vfp.fpsr only for the NZCV bits. (The QC bit is stored in env->vfp.qc[].) This works for TCG, but if QEMU was built without CONFIG_TCG (i.e. with KVM support only) then we use the stub versions of vfp_ge

[PATCH] migration: Put thread names together with macros

2024-10-11 Thread Peter Xu
Keep migration thread names together, so it's easier to see a list of all possible migration threads. Still two functional changes below besides the macro defintions: - There's one dirty rate thread that we overlooked before, now we add that too and name it as "mig/dirtyrate" following the ol

[PULL v3 05/18] .gitattributes: add Rust diff and merge attributes

2024-10-11 Thread Paolo Bonzini
From: Manos Pitsidianakis Set rust source code to diff=rust (built-in with new git versions) and merge=binary for Cargo.lock files (they should not be merged but auto-generated by cargo) Reviewed-by: Alex Bennée Reviewed-by: Zhao Liu Signed-off-by: Manos Pitsidianakis Link: https://lore.kern

[PULL v3 17/18] docs: avoid footnotes consisting of just URLs

2024-10-11 Thread Paolo Bonzini
Replace the footnotes with inline links whenever the footnote text consists of nothing but the URL. While at it, make the link texts consistent in the surrounding areas, for example avoiding usage of "here" for the link's text. In the case of acpi-bits.rst this fixes a build failure with Sphinx 8

Re: [PATCH v2 5/7] target/i386/cpu: Improve errors for out of bounds property values

2024-10-11 Thread Philippe Mathieu-Daudé
On 10/10/24 16:25, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 10/10/24 12:01, Markus Armbruster wrote: The error message for a "stepping" value that is out of bounds is a bit odd: $ qemu-system-x86_64 -cpu qemu64,stepping=16 qemu-system-x86_64: can't apply global q

Re: [PATCH] MAINTAINERS: A new maintainer for the qtests

2024-10-11 Thread Fabiano Rosas
Thomas Huth writes: > Since I blundered into becoming the maintainer of the new functional > test framework in QEMU (tests/functional/) recently, I need to drop > some other duties - it's getting too much for me otherwise. Laurent > is also quite busy with other projects nowadays, so I looked ar

[PULL v3 16/18] docs: fix invalid footnote syntax

2024-10-11 Thread Paolo Bonzini
All footnotes must come after a separator in reStructuredText. Fix the two files in which this does not happen. This mistake causes the link to be rendered literally: ...from the venv itself[#distlib]_. If no... and is caught by Sphinx 8.1.0 as an unreferenced footnote. Reviewed-by: Peter M

[PULL v3 13/18] meson: ensure -mcx16 is passed when detecting ATOMIC128

2024-10-11 Thread Paolo Bonzini
Moving -mcx16 out of CPU_CFLAGS caused the detection of ATOMIC128 to fail, because flags have to be specified by hand in cc.compiles and cc.links invocations (why oh why??). Ensure that these tests enable all the instruction set extensions that will be used to build the emulators. Fixes: c2bf2ccb

[PULL v3 09/18] rust: add utility procedural macro crate

2024-10-11 Thread Paolo Bonzini
From: Manos Pitsidianakis This commit adds a helper crate library, qemu-api-macros for derive (and other procedural) macros to be used along qemu-api. It needs to be a separate library because in Rust, procedural macros, or macros that can generate arbitrary code, need to be special separate com

[PULL v3 04/18] rust: add bindgen step as a meson dependency

2024-10-11 Thread Paolo Bonzini
From: Manos Pitsidianakis Add bindings_rs target for generating rust bindings to target-independent qemu C APIs. The bindings need be created before any rust crate that uses them is compiled. The bindings.rs file will end up in BUILDDIR/bindings.rs and have the same name as a target: ninja b

Re: [PATCH v2 0/3] docs: fix and cleanup footnotes

2024-10-11 Thread Paolo Bonzini
On Fri, Oct 11, 2024 at 2:27 PM Peter Maydell wrote: > > On Fri, 11 Oct 2024 at 12:12, Paolo Bonzini wrote: > > > > Sphinx 8.1.0 got a lot better at detecting unreferenced footnotes, and > > we have three of them---which causes the build to fail when the latest > > version of sphinx is installed

Re: [PATCH v3 06/20] accel/tcg: Use the alignment test in tlb_fill_align

2024-10-11 Thread Richard Henderson
On 10/10/24 03:44, Peter Maydell wrote: On Wed, 9 Oct 2024 at 01:05, Richard Henderson wrote: When we have a tlb miss, defer the alignment check to the new tlb_fill_align hook. Move the existing alignment check so that we only perform it with a tlb hit. Signed-off-by: Richard Henderson

[PATCH] linux-user/vm86: Fix compilation with Clang

2024-10-11 Thread Thomas Huth
Since commit 95b9c27c81 ("linux-user: Remove unused handle_vm86_fault") a bunch of other "static inline" function are now unused, too. Clang warns about such unused "static inline" functions in .c files, so the build currently breaks when compiling with "--enable-werror". Remove the unused function

[PULL v3 10/18] rust: add PL011 device model

2024-10-11 Thread Paolo Bonzini
This commit adds a re-implementation of hw/char/pl011.c in Rust. How to build: 1. Configure a QEMU build with: --enable-system --target-list=aarch64-softmmu --enable-rust 2. Launching a VM with qemu-system-aarch64 should use the Rust version of the pl011 device Co-authored-by: Junjie Mao

[PATCH] migration: Remove interface query-migrationthreads

2024-10-11 Thread Peter Xu
This reverts two commits: 671326201dac8fe91222ba0045709f04a8ec3af4 1b1f4ab69c41279a45ccd0d3178e83471e6e4ec1 Meanwhile it adds an entry to removed-features.rst for the query-migrationthreads QMP command. This patch originates from another patchset [1] that wanted to cleanup the interface and add

[PATCH 05/17] tests/functional: Convert the Avocado s390x tuxrun test

2024-10-11 Thread Thomas Huth
Move the test to a new file so that it can be run via qemu-system-s390x in the functional framework. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/avocado/tuxrun_baselines.py | 17 -- tests/functional/test_s390x_tuxrun.py | 34 +++

Re: [PATCH] MAINTAINERS: A new maintainer for the qtests

2024-10-11 Thread Laurent Vivier
On 11/10/2024 16:13, Thomas Huth wrote: Since I blundered into becoming the maintainer of the new functional test framework in QEMU (tests/functional/) recently, I need to drop some other duties - it's getting too much for me otherwise. Laurent is also quite busy with other projects nowadays, so

[PULL v3 02/18] build-sys: Add rust feature option

2024-10-11 Thread Paolo Bonzini
From: Manos Pitsidianakis Add rust feature in meson.build, configure, to prepare for adding Rust code in the followup commits. Signed-off-by: Manos Pitsidianakis Reviewed-by: Alex Bennée Link: https://lore.kernel.org/r/14642d80fbccbc60f7aa78b449a7deb5e2784ed9.1727961605.git.manos.pitsidiana..

[PATCH 17/17] tests/functional: Convert the Avocado sh4 tuxrun test

2024-10-11 Thread Thomas Huth
Move the test into a new file so that it can be run via qemu-system-sh4 in the functional framework. Since this was the last test in tests/avocado/tuxrun_baselines.py, we can now delete that file completely. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 228 --

[PULL v3 07/18] rust: add crate to expose bindings and interfaces

2024-10-11 Thread Paolo Bonzini
From: Manos Pitsidianakis Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and provides some declaration macros for symbols visible to the rest of QEMU. Co-authored-by: Junjie Mao Co-authored-by: Paolo Bonzini Signed-off-by: Junjie Mao Signed-off-by: Paolo Bonzini Signed-

[PULL v3 14/18] dockerfiles: add a Dockerfile using a nightly Rust toolchain

2024-10-11 Thread Paolo Bonzini
This will be useful in order to test QEMU's Rust code with nightly clippy. It can also be used to check that the code builds, until the minimum supported Rust version is lowered enough to allow enabling Rust in other Dockerfiles too. Use a separate container, instead of the Fedora one, to avoid t

Re: [PATCH v6 00/12] Use Intel DSA accelerator to offload zero page checking in multifd live migration.

2024-10-11 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The doc update is still missing under docs/, we may need that for a final > merge. > > Are you using this in production? How it performs in real life? What is > the major issue to solve for you? Is it "zero detect eats cpu too much", > or "migration too

[PATCH v14 07/10] hw/nvme: add helper functions for converting reservation types

2024-10-11 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the reservation types used in the NVME protocol and those used in the block layer. Reviewed-by: Klaus Jensen Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/nvme.h |

[PULL v3 18/18] docs: use consistent markup for footnotes

2024-10-11 Thread Paolo Bonzini
Unfortunately, the definition of the footnote syntax requires the author to use the awkward escaped space "\ " in the really common case of "footnote marker at end of word or sentence"; and in fact the rST documentation's examples of footnote syntax contain only artificial examples that do *not* us

[PATCH v14 04/10] scsi/util: add helper functions for persistent reservation types conversion

2024-10-11 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the persistent reservation types used in the SCSI protocol and those used in the block layer. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi Reviewed-by: Stefan Hajnoczi --- include/scsi/utils.h | 8 +

[PATCH v14 06/10] block/nvme: add reservation command protocol constants

2024-10-11 Thread Changqi Lu
Add constants for the NVMe persistent command protocol. The constants include the reservation command opcode and reservation type values defined in section 7 of the NVMe 2.0 specification. Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/block/nvme.h

[PATCH 11/17] tests/functional: Convert the Avocado mips tuxrun test

2024-10-11 Thread Thomas Huth
Move the test into a new file so that it can be run via qemu-system-mips in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py| 18 -- tests/functional/meson.build | 1 + tests/functional/test_mips_tuxrun.py | 36 ++

Re: [PATCH v16 03/13] hw/ppc/spapr_pci: Do not reject VFs created after a PF

2024-10-11 Thread Shivaprasad G Bhat
On 9/18/24 7:57 PM, Cédric Le Goater wrote: Adding :   Harsh for QEMU/PPC pseries machine,   Shivaprasad for KVM/PPC VFIO and IOMMU support. Thanks, C. On 9/13/24 05:44, Akihiko Odaki wrote: A PF may automatically create VFs and the PF may be function 0. Signed-off-by: Akihiko Odaki ---  

[PATCH v14 00/10] Support persistent reservation operations

2024-10-11 Thread Changqi Lu
Patch v14 has been modified, thanks to Stefan for the code review. v13->v14: - Fix some protocol and spelling related issues at hw/nvme/ctrl.c. v12->v13: - Fix byte swaps at hw/nvme/ctrl.c. v11->v12: - Fixed endian conversion during command parsing; - Add the maximum number of keys, currently li

Re: [PATCH 14/23] accel/tcg: Replace victim_tlb_hit with tlbtree_hit

2024-10-11 Thread Pierrick Bouvier
On 10/10/24 12:29, Richard Henderson wrote: On 10/9/24 17:10, Pierrick Bouvier wrote: +static bool tlbtree_hit(CPUState *cpu, int mmu_idx, +    MMUAccessType access_type, vaddr addr)   { -    size_t vidx; +    CPUTLBDesc *desc = &cpu->neg.tlb.d[mmu_idx]; +    CPUTLBDescFas

Re: [PULL 00/17] Crypto fixes patches

2024-10-11 Thread Peter Maydell
On Thu, 10 Oct 2024 at 17:24, Daniel P. Berrangé wrote: > > The following changes since commit 838fc0a8769d7cc6edfe50451ba4e3368395f5c1: > > Merge tag 'chr-pull-request' of https://gitlab.com/marcandre.lureau/qemu > into staging (2024-10-09 15:06:56 +0100) > > are available in the Git repositor

[PATCH v14 08/10] hw/nvme: enable ONCS and rescap function

2024-10-11 Thread Changqi Lu
This commit enables ONCS to support the reservation function at the controller level. Also enables rescap function in the namespace by detecting the supported reservation function in the backend driver. Reviewed-by: Klaus Jensen Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi Reviewed-by: S

[PATCH 14/17] tests/functional: Convert the Avocado mips64el tuxrun test

2024-10-11 Thread Thomas Huth
Move the test into a new file so that it can be run via qemu-system-mips64el in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py| 16 --- tests/functional/meson.build | 1 + tests/functional/test_mips64el_tuxrun.py | 35 +

Re: [PATCH] qapi, machine-qmp-cmds.c: query-accelerator support

2024-10-11 Thread Daniel Henrique Barboza
On 10/7/24 6:53 AM, Markus Armbruster wrote: Daniel P. Berrangé writes: Markus: QAPI design Qs for you at the bottom On Wed, Sep 25, 2024 at 10:19:33AM -0300, Daniel Henrique Barboza wrote: On 9/19/24 9:22 AM, Daniel P. Berrangé wrote: On Thu, Sep 19, 2024 at 08:20:56AM -0300, Daniel H

[PATCH v14 10/10] block/iscsi: add persistent reservation in/out driver

2024-10-11 Thread Changqi Lu
Add persistent reservation in/out operations for iscsi driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by: z

Re: [PATCH v2 5/7] target/i386/cpu: Improve errors for out of bounds property values

2024-10-11 Thread Igor Mammedov
On Thu, 10 Oct 2024 17:01:42 +0200 Markus Armbruster wrote: > The error message for a "stepping" value that is out of bounds is a > bit odd: > > $ qemu-system-x86_64 -cpu qemu64,stepping=16 > qemu-system-x86_64: can't apply global qemu64-x86_64-cpu.stepping=16: > Property .stepping does

[PULL v3 06/18] meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag

2024-10-11 Thread Paolo Bonzini
From: Manos Pitsidianakis Rust crates, introduced from the next commit onwards, can optionally use the glib allocator API and need to know whether g_aligned_alloc etc are available. This commit adds a define in config_host_data that depends on glib version >= 2.72. Reviewed-by: Alex Bennée Sig

[PATCH 00/17] Convert the Avocado tuxrun tests into new functional tests

2024-10-11 Thread Thomas Huth
This patch series converts the tests/avocado/tuxrun_baselines.py to the new functional test framework. While converting the sh4 test, I noticed that the Avocado test was completely broken, so I included a fix (revert) for that problem in this series, too. Thomas Huth (17): tests/functional: Add

Re: [PATCH v2 2/3] docs: avoid footnotes consisting of just URLs

2024-10-11 Thread Peter Maydell
On Fri, 11 Oct 2024 at 12:13, Paolo Bonzini wrote: > > Replace the footnotes with inline links whenever the footnote text > consists of nothing but the URL. While at it, make the link texts > consistent in the surrounding areas, for example avoiding usage of > "here" for the link's text. > > In t

Re: [PATCH v17 00/13] Support blob memory and venus on qemu

2024-10-11 Thread Dmitry Osipenko
On 10/10/24 03:59, Akihiro Suda wrote: >> And I think this series is ready to merge once the tree re-opens. > > Hi, is there any remaining blocker toward merging the patch set? There is no blocker. Patches will be merged once Michael will do it. Michael, please feel free to apply the patches to

Re: [PATCH 1/3] scsi: fetch unit attention when creating the request

2024-10-11 Thread Michael Tokarev
On 09.10.2024 21:00, Michael Galaxy wrote: Thanks for your help. - Michael On 10/9/24 11:28, Paolo Bonzini wrote: Yes, it looks like an easy backport. Adding Michael Tokarev and qemu-stable. Paolo On Wed, Oct 9, 2024 at 6:03 PM Michael Galaxy wrote: Hi All, We have stumbled upon this bu

[PATCH v2] sched_attr: Do not define for glibc >= 2.41

2024-10-11 Thread Khem Raj
glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr functions and struct sched_attr. Therefore, it needs to be checked for here as well before defining sched_attr Define sched_attr conditionally on SCHED_ATTR_SIZE_VER0 Fixes builds with glibc/trunk [1] https://sourceware.

Re: [PATCH RFC 05/10] target/riscv: Rename the PMU events

2024-10-11 Thread Atish Kumar Patra
On Thu, Oct 10, 2024 at 5:10 AM Alexei Filippov wrote: > > > > On 10.10.2024 02:09, Atish Patra wrote: > > The current PMU events are defined by SBI PMU > > specification. As there is no standard event encoding > > scheme, Virt machine chooses to use the SBI PMU encoding. > > A platform may choos

Re: [PATCH RFC 06/10] target/riscv: Define PMU event related structures

2024-10-11 Thread Atish Kumar Patra
On Thu, Oct 10, 2024 at 5:44 AM Alexei Filippov wrote: > > > > On 10.10.2024 02:09, Atish Patra wrote: > > Signed-off-by: Atish Patra > > --- > > target/riscv/cpu.h | 25 + > > 1 file changed, 25 insertions(+) > > > > diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h

Re: [PULL 10/23] linux-user: Remove unused handle_vm86_fault

2024-10-11 Thread Michael Tokarev
On 11.10.2024 19:02, Thomas Huth wrote: On 04/10/2024 18.03, Michael Tokarev wrote: From: "Dr. David Alan Gilbert" handle_vm86_fault has been unused since:    1ade5b2fed ("linux-user/i386: Split out maybe_handle_vm86_trap") Remove it, and it's local macros. FYI, looks like this broke compi

[QEMU RFC] hw/mem/cxl_type3: add guard to avoid event log overflow during a DC extent add/release request

2024-10-11 Thread nifan . cxl
From: Fan Ni One DC extent add/release request can take multiple DC extents. For each extent in the request, one DC event record will be generated and isnerted into the event log. All the event records for the request will be grouped with the More flag (see CXL spec r3.1, Table 8-168 and 8-170).

Re: [RFC 1/1] vfio: support CXL device in VFIO stub

2024-10-11 Thread Alex Williamson
On Sat, 21 Sep 2024 00:14:40 -0700 Zhi Wang wrote: > To support CXL device passthrough, vfio-cxl-core is introduced. This > is the QEMU part. > > Get the CXL caps from the vfio-cxl-core. Trap and emulate the HDM > decoder registers. Map the HDM decdoers when the guest commits a HDM > decoder. I

Re: [PATCH] MAINTAINERS: A new maintainer for the qtests

2024-10-11 Thread Philippe Mathieu-Daudé
On 11/10/24 11:13, Thomas Huth wrote: Since I blundered into becoming the maintainer of the new functional test framework in QEMU (tests/functional/) recently, I need to drop some other duties - it's getting too much for me otherwise. Laurent is also quite busy with other projects nowadays, so I

Re: [PATCH 2/3] docs: avoid unreferenced footnote

2024-10-11 Thread Peter Maydell
On Fri, 11 Oct 2024 at 10:50, Paolo Bonzini wrote: > > The link to fosdem.org is inlined but also included in the footnote [#c]. > Replace the inline link with a reference to the footnote, because Sphinx > 8.1.0 is a lot stricter about unreferenced footnotes. > > Signed-off-by: Paolo Bonzini > --

[PATCH V4] virtio/vhost-user: fix qemu abort when hotunplug vhost-user-net device

2024-10-11 Thread yaozhenguo
During the hot-unplugging of vhost-user-net type network cards, the vhost_user_cleanup function may add the same rcu node to the rcu linked list. The function call in this case is as follows: vhost_user_cleanup ->vhost_user_host_notifier_remove ->call_rcu(n, vhost_user_host_notifier_fr

Re: [PATCH 6/7] include: Move QemuLockCnt APIs to their own header

2024-10-11 Thread Paolo Bonzini
On 8/16/24 15:22, Peter Maydell wrote: Currently the QemuLockCnt data structure and associated functions are in the include/qemu/thread.h header. Move them to their own qemu/lockcnt.h. The main reason for doing this is that it means we can autogenerate the documentation comments into the docs/d

RE: [PATCH RFC V4 02/33] cpu-common: Add common CPU utility for possible vCPUs

2024-10-11 Thread Salil Mehta via
HI Miguel, > From: Miguel Luis > Sent: Thursday, October 10, 2024 3:47 PM > To: Salil Mehta > > Hi Salil, > > > On 9 Oct 2024, at 03:17, Salil Mehta wrote: > > > > This patch adds various utility functions that may be required to > > fetch or check the state of possible vCPUs. It al

Re: [PATCH 1/3] docs: fix invalid footnote syntax

2024-10-11 Thread Peter Maydell
On Fri, 11 Oct 2024 at 10:50, Paolo Bonzini wrote: > > All footnotes must come after a separator in reStructuredText. Fix the > two files in which this does not happen. This mistake is caught by > Sphinx 8.1.0 as an unreferenced footnote. Worth noting in the commit message that this isn't just

Re: [PATCH 3/3] docs: use consistent markup for footnotes

2024-10-11 Thread Peter Maydell
On Fri, 11 Oct 2024 at 10:50, Paolo Bonzini wrote: > > Always use a named reference for clarity, and ensure the space is escaped if > the > footnote must attach to the preceding word. > > Signed-off-by: Paolo Bonzini > --- > docs/devel/atomics.rst | 6 +++--- > docs/devel/build-sys

[PULL v3 03/18] configure, meson: detect Rust toolchain

2024-10-11 Thread Paolo Bonzini
Include the correct path and arguments to rustc in the native and cross files (native compilation is needed for procedural macros). Based on the host architecture and OS, the compiler and optionally the argument to --cpu, the Rust target triple can be detected automatically for either a native or

[PULL v3 08/18] scripts/archive-source: find directory name for subprojects

2024-10-11 Thread Paolo Bonzini
Rust subprojects have the semantic version (followed by -rs) in the subproject name, but the full version (without -rs) is used by crates.io for the root directory of the tarball. Teach scripts/archive-source.sh to look for the root directory name in wrap files. Signed-off-by: Paolo Bonzini ---

Re: [PATCH 19/23] accel/tcg: Always use IntervalTree for code lookups

2024-10-11 Thread Richard Henderson
On 10/9/24 17:35, Pierrick Bouvier wrote: @@ -1061,15 +1061,13 @@ static inline void tlb_set_compare(CPUTLBEntryFull *full, CPUTLBEntry *ent, vaddr address, int flags, MMUAccessType access_type, bool enable)   { -    if (e

[PATCH 06/17] tests/functional: Convert the Avocado arm tuxrun tests

2024-10-11 Thread Thomas Huth
Move the tests to a new file so that they can be run via qemu-system-arm in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 56 --- tests/functional/meson.build| 2 + tests/functional/test_arm_tuxrun.py | 70

Re: [PATCH v3 06/20] accel/tcg: Use the alignment test in tlb_fill_align

2024-10-11 Thread Peter Maydell
On Fri, 11 Oct 2024 at 16:22, Richard Henderson wrote: > > On 10/10/24 03:44, Peter Maydell wrote: > > On Wed, 9 Oct 2024 at 01:05, Richard Henderson > > wrote: > >> > >> When we have a tlb miss, defer the alignment check to > >> the new tlb_fill_align hook. Move the existing alignment > >> chec

[PULL v3 15/18] gitlab-ci: add Rust-enabled CI job

2024-10-11 Thread Paolo Bonzini
Add a job using --enable-rust, to ensure that the toolchain is installed correctly by the Dockerfile and that QEMU builds with Rust enabled on at least one platform. Suggested-by: Daniel P. Berrangé Reviewed-by: Daniel P. Berrangé Acked-by: Alex Bennée Signed-off-by: Paolo Bonzini --- .gitlab

Re: [PATCH v2 00/17] Multifd 🔀 device state transfer support with VFIO consumer

2024-10-11 Thread Cédric Le Goater
Hello Maciej, On 8/27/24 19:54, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This is an updated v2 patch series of the v1 series located here: https://lore.kernel.org/qemu-devel/cover.1718717584.git.maciej.szmigi...@oracle.com/ Changes from v1: * Extended the QEMU thread-pool with n

Re: [PATCH v6 00/12] Use Intel DSA accelerator to offload zero page checking in multifd live migration.

2024-10-11 Thread Fabiano Rosas
Yichen Wang writes: > v6 > * Rebase on top of 838fc0a8769d7cc6edfe50451ba4e3368395f5c1; > * Refactor code to have clean history on all commits; > * Add comments on DSA specific defines about how the value is picked; > * Address all comments from v5 reviews about api defines, questions, etc.; > >

[PATCH 13/17] tests/functional: Convert the Avocado mips64 tuxrun test

2024-10-11 Thread Thomas Huth
Move the test into a new file so that it can be run via qemu-system-mips64 in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 17 - tests/functional/meson.build | 4 +++ tests/functional/test_mips64_tuxrun.py | 35 +

[PATCH 04/17] tests/functional: Convert the Avocado sparc64 tuxrun test

2024-10-11 Thread Thomas Huth
Move the test to a new file so that it can be run via qemu-system-sparc64 in the functional framework. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/tuxrun_baselines.py | 16 tests/functional/meson.build| 1 + tests/f

Re: [RFC V2 PATCH 02/11] acpi: Implement control method sleep button

2024-10-11 Thread Igor Mammedov
On Tue, 8 Oct 2024 11:22:33 -0400 Annie Li wrote: > On 10/7/2024 8:59 AM, Igor Mammedov wrote: > > On Fri, 27 Sep 2024 14:38:57 -0400 > > Annie Li wrote: > > > >> The control method sleep button is added, as well as its GPE event > >> handler. > >> > >> Co-developed-by: Miguel Luis > >> Signed-

Re: [PATCH 3/4] target/riscv/kvm: add kvm-aia bools props

2024-10-11 Thread Daniel Henrique Barboza
On 10/10/24 10:57 PM, Alistair Francis wrote: On Tue, Sep 24, 2024 at 10:46 PM Daniel Henrique Barboza wrote: Boolean properties are preferrable in comparision to string properties since they don't require a string parsing. Add three bools that represents the available kvm-aia mode: riscv-

[PATCH 16/17] Revert "hw/sh4/r2d: Realize IDE controller before accessing it"

2024-10-11 Thread Thomas Huth
This reverts commit 3c5f86a22686ef475a8259c0d8ee714f61c770c9. Changing the order here caused a regression with the "tuxrun" kernels (from https://storage.tuxboot.com/20230331/) - ATA commands fail with a "ata1: lost interrupt (Status 0x58)" message. Apparently we need to wire the interrupt here fi

Re: [PATCH] sched_attr: Do not define for glibc >= 2.41

2024-10-11 Thread Paolo Bonzini
On Fri, Oct 11, 2024 at 11:15 AM Laurent Vivier wrote: > > Le 11/10/2024 à 11:08, Paolo Bonzini a écrit : > > On 10/11/24 07:48, Khem Raj wrote: > >> glibc 2.41+ has added [1] definitions for sched_setattr and sched_getattr > >> functions > >> and struct sched_attr. Therefore, it needs to be chec

Re: [PATCH 19/23] accel/tcg: Always use IntervalTree for code lookups

2024-10-11 Thread Pierrick Bouvier
On 10/11/24 07:47, Richard Henderson wrote: On 10/9/24 17:35, Pierrick Bouvier wrote: @@ -1061,15 +1061,13 @@ static inline void tlb_set_compare(CPUTLBEntryFull *full, CPUTLBEntry *ent, vaddr address, int flags, MMUAcce

[PATCH v14 05/10] hw/scsi: add persistent reservation in/out api for scsi device

2024-10-11 Thread Changqi Lu
Add persistent reservation in/out operations in the SCSI device layer. By introducing the persistent reservation in/out api, this enables the SCSI device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservation keys, initiating and releasin

[PATCH v14 03/10] scsi/constant: add persistent reservation in/out protocol constants

2024-10-11 Thread Changqi Lu
Add constants for the persistent reservation in/out protocol in the scsi/constant module. The constants include the persistent reservation command, type, and scope values defined in sections 6.13 and 6.14 of the SCSI Primary Commands-4 (SPC-4) specification. Signed-off-by: Changqi Lu Signed-off-b

[PATCH] MAINTAINERS: A new maintainer for the qtests

2024-10-11 Thread Thomas Huth
Since I blundered into becoming the maintainer of the new functional test framework in QEMU (tests/functional/) recently, I need to drop some other duties - it's getting too much for me otherwise. Laurent is also quite busy with other projects nowadays, so I looked around for help. Fabiano did qui

[PULL v3 12/18] meson: define qemu_isa_flags

2024-10-11 Thread Paolo Bonzini
Create a separate variable for compiler flags that enable specific instruction set extensions, so that they can be used with cc.compiles/cc.links. Note that -mfpmath=sse is a code generation option but it does not enable new instructions, therefore I did not make it part of qemu_isa_flags. Sugges

  1   2   >