Re: [PATCH 16/16] rust: allow older version of bindgen

2024-10-16 Thread Paolo Bonzini
Il mer 16 ott 2024, 08:29 Junjie Mao ha scritto: > > The bindgen 0.59.1 installed from Ubuntu 22.04 apt source does not > support the following args: > > '--formatter', 'rustfmt', > '--merge-extern-blocks', > '--allowlist-file', meson.project_source_root() + '/include/.*', > '--al

Re: [PATCH 12/16] rust: allow version 1.63.0 of rustc

2024-10-16 Thread Paolo Bonzini
Il mer 16 ott 2024, 08:10 Junjie Mao ha scritto: > In my Ubuntu 22.04 environment (rustc 1.76.0 and bindgen 0.59.1 from > apt) the feature `proc_macro_byte_character` is not yet stablized but > used in proc-macro2. Downgrading proc-macro2 to 1.0.79 [1] and syn to > 2.0.58 fixes that issue for me.

[PATCH v3 3/4] migration: Support periodic ramblock dirty sync

2024-10-16 Thread yong . huang
From: Hyman Huang When VM is configured with huge memory, the current throttle logic doesn't look like to scale, because migration_trigger_throttle() is only called for each iteration, so it won't be invoked for a long time if one iteration can take a long time. The periodic dirty sync aims to f

[PATCH v3 0/4] migration: auto-converge refinements for huge VM

2024-10-16 Thread yong . huang
From: Hyman Huang v3: 1. drop the responsive throttle patchset 2. rename background sync to periodic ramblock dirty sync 3. move the cpu-throttle.* from system to migration 4. remove "rs" parameter in migration_bitmap_sync_precopy 5. implement periodic ramblock dirty sync in cpu-throttle.c 6. mov

[PATCH v3 4/4] tests/migration: Add case for periodic ramblock dirty sync

2024-10-16 Thread yong . huang
From: Hyman Huang Signed-off-by: Hyman Huang --- tests/qtest/migration-test.c | 32 1 file changed, 32 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 95e45b5029..e6a2803e71 100644 --- a/tests/qtest/migration-test.c

[PATCH v3 2/4] migration: Remove "rs" parameter in migration_bitmap_sync_precopy

2024-10-16 Thread yong . huang
From: Hyman Huang The global static variable ram_state in fact is referred to by the "rs" parameter in migration_bitmap_sync_precopy. For ease of calling by the callees, use the global variable directly in migration_bitmap_sync_precopy and remove "rs" parameter. The migration_bitmap_sync_precopy

[PATCH v3 1/4] migration: Move cpu-throttole.c from system to migration

2024-10-16 Thread yong . huang
From: Hyman Huang Move cpu-throttle.c from system to migration since it's only used for migration; this makes us avoid exporting the util functions and variables in misc.h but export them in migration.h when implementing the background ramblock dirty sync feature in the upcoming commits. Additio

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

2024-10-16 Thread Marc-André Lureau
Hi On Wed, Oct 16, 2024 at 2:29 PM Roman Penyaev wrote: > This patch implements multiplexing capability of several backend > devices, which opens up an opportunity to use a single frontend > device on the guest, which can be manipulated from several > backend devices. > > The idea of the change

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

2024-10-16 Thread Marc-André Lureau
Hi On Fri, Oct 11, 2024 at 9:19 PM Paolo Bonzini wrote: > 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: > >

Re: [PATCH] linux-headers: loongarch: add kvm_para.h and unistd_64.h

2024-10-16 Thread gaosong
在 2024/10/16 下午4:13, maobibo 写道: ping. @Song Could you give some comments since it is LoongArch specific? Regards Bibo Mao On 2024/9/29 下午3:22, Bibo Mao wrote: KVM LBT supports on LoongArch requires the linux-header kvm_para.h, also unistd_64.h is required by unistd.h on LoongArch since 6.11

Re: [PATCH v9 08/12] hw/riscv/riscv-iommu: add Address Translation Cache (IOATC)

2024-10-16 Thread Jason Chien
Hi Daniel, On 2024/10/4 下午 11:57, Daniel Henrique Barboza wrote: From: Tomasz Jeznach The RISC-V IOMMU spec predicts that the IOMMU can use translation caches to hold entries from the DDT. This includes implementation for all cache commands that are marked as 'not implemented'. There are some

[PULL 0/5] loongarch-to-apply queue

2024-10-16 Thread Song Gao
u.git tags/pull-loongarch-20241016 for you to fetch changes up to e376c2d87cbbad3483adcd5e827bdd144edb7d2c: hw/loongarch/fw_cfg: Build in common_ss[] (2024-10-16 16:06:07 +0800) pull-loongarc

[PULL 4/5] hw/loongarch/virt: Remove unnecessary 'cpu.h' inclusion

2024-10-16 Thread Song Gao
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Song Gao Reviewed-by: Thomas Huth Message-Id: <20240927213254.17552-2-phi...@linaro.org> Signed-off-by: Song Gao --- include/hw/loongarch/virt.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/loong

[PULL 5/5] hw/loongarch/fw_cfg: Build in common_ss[]

2024-10-16 Thread Song Gao
From: Philippe Mathieu-Daudé Nothing in LoongArch fw_cfg.c requires target specific definitions. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Song Gao Reviewed-by: Thomas Huth Message-Id: <20240927213254.17552-3-phi...@linaro.org> Signed-off-by: Song Gao --- hw/loongarch/meson.build |

[PULL 2/5] hw/loongarch/virt: Add FDT table support with acpi ged pm register

2024-10-16 Thread Song Gao
From: Bibo Mao ACPI ged is used for power management on LoongArch virt platform, in general it is parsed from acpi table. However if system boot directly from elf kernel, no UEFI bios is provided and acpi table cannot be used also. Here acpi ged pm register is exposed with FDT table, it is compa

[PULL 1/5] acpi: ged: Add macro for acpi sleep control register

2024-10-16 Thread Song Gao
From: Bibo Mao Macro definition is added for acpi sleep control register, ged emulation driver can use the macro , also it can be used in FDT table if ged is exposed with FDT table. Signed-off-by: Bibo Mao Reviewed-by: Igor Mammedov Message-Id: <20240918014206.2165821-2-maob...@loongson.cn> Si

[PULL 3/5] target/loongarch: Avoid bits shift exceeding width of bool type

2024-10-16 Thread Song Gao
From: Bibo Mao Variable env->cf[i] is defined as bool type, it is treated as int type with shift operation. However the max possible width is 56 for the shift operation, exceeding the width of int type. And there is existing api read_fcc() which is converted to u64 type with bitwise shift, it can

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

2024-10-16 Thread Marc-André Lureau
Hi On Wed, Oct 16, 2024 at 3:13 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Wed, Oct 16, 2024 at 2:29 PM Roman Penyaev wrote: > >> This patch implements multiplexing capability of several backend >> devices, which opens up an opportunity to use a single frontend >> devi

Re: [PATCH v4 8/8] qemu-options.hx: describe multiplexing of several backend devices

2024-10-16 Thread Marc-André Lureau
Hi On Wed, Oct 16, 2024 at 2:28 PM Roman Penyaev wrote: > > This adds a few lines describing `mux-be` multiplexer configuration > for multiplexing several backend devices with a single frontend > device. > > Signed-off-by: Roman Penyaev > Cc: "Marc-André Lureau" > Cc: qemu-devel@nongnu.org > --

Re: [PATCH 14/14] qtest/xive: Add test of pool interrupts

2024-10-16 Thread Thomas Huth
On 15/10/2024 23.13, Michael Kowal wrote: From: Glenn Miles Added new test for pool interrupts. Signed-off-by: Glenn Miles Signed-off-by: Michael Kowal --- tests/qtest/pnv-xive2-test.c | 77 1 file changed, 77 insertions(+) diff --git a/tests/qtest/pn

Re: [PATCH 12/16] rust: allow version 1.63.0 of rustc

2024-10-16 Thread Junjie Mao
Paolo Bonzini writes: > Il mer 16 ott 2024, 08:10 Junjie Mao ha scritto: > > In my Ubuntu 22.04 environment (rustc 1.76.0 and bindgen 0.59.1 from > apt) the feature `proc_macro_byte_character` is not yet stablized but > used in proc-macro2. Downgrading proc-macro2 to 1.0.79 [1] and syn to >

[PATCH v2 3/3] include/crypto: clarify @result/@result_len for hash/hmac APIs

2024-10-16 Thread Daniel P . Berrangé
The @result parameter passed to hash/hmac APIs may either contain a pre-allocated buffer, or a buffer can be allocated on the fly. Clarify these two different usage models in the API docs. Signed-off-by: Daniel P. Berrangé --- include/crypto/hash.h | 30 +++--- include/cr

[PATCH v2 0/3] crypto: fix regression in hash result buffer handling

2024-10-16 Thread Daniel P . Berrangé
Daniel P. Berrangé (3): crypto/hash: avoid overwriting user supplied result pointer tests: correctly validate result buffer in hash/hmac tests include/crypto: clarify @result/@result_len for hash/hmac APIs crypto/hash-gcrypt.c | 15 --- crypto/hash-glib.c

[PATCH v2 2/3] tests: correctly validate result buffer in hash/hmac tests

2024-10-16 Thread Daniel P . Berrangé
Validate that the pre-allocated buffer pointer was not overwritten by the hash/hmac APIs. Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-hash.c | 7 --- tests/unit/test-crypto-hmac.c | 6 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/unit/test-cryp

[PATCH v2 1/3] crypto/hash: avoid overwriting user supplied result pointer

2024-10-16 Thread Daniel P . Berrangé
If the user provides a pre-allocated buffer for the hash result, we must use that rather than re-allocating a new buffer. Reported-by: Dorjoy Chowdhury Signed-off-by: Daniel P. Berrangé --- crypto/hash-gcrypt.c | 15 --- crypto/hash-glib.c | 11 +-- crypto/hash-gnutls.c |

[PATCH v4 7/8] tests/unit/test-char: add unit test for the `mux-be` multiplexer

2024-10-16 Thread Roman Penyaev
The test is trivial: several backends, 1 `mux-be`, 1 frontend do the buffer write and read. Pipe is used for EAGAIN verification. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org --- tests/unit/test-char.c | 306 - 1 file cha

[PATCH v4 1/8] chardev/char: rename `MuxChardev` struct to `MuxFeChardev`

2024-10-16 Thread Roman Penyaev
In the following patches backend multiplexer will be introduced. This patch renames the structure and a few mux macros to reflect that this mux is responsible only for multiplexing of frontend devices. This patch does the following: s/MuxChardev/MuxFeChardev/g s/CHARDEV_IS_MUX/CHARDEV_IS_MUX_

[PATCH v4 0/8] chardev: implement backend chardev multiplexing

2024-10-16 Thread Roman Penyaev
Mux is a character backend (host side) device, which multiplexes multiple frontends with one backend device. The following is a few lines from the QEMU manpage [1]: A multiplexer is a "1:N" device, and here the "1" end is your specified chardev backend, and the "N" end is the various parts o

[PATCH v4 5/8] chardev/char: introduce `mux-be-id=ID` option

2024-10-16 Thread Roman Penyaev
Patch introduces `mux-be-id=ID` option for all chardev devices. This is necessary to attach chardev to `mux-be` for backend multiplexing. Actual implementation wimplementation will follow. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org --- chardev/char.c | 3 +++

[PATCH v4 2/8] chardev/char: rename `char-mux.c` to `char-mux-fe.c`

2024-10-16 Thread Roman Penyaev
In the following patches backend multiplexer will be introduced and the implementation will be named as follows: `char-mux-be.c`. This patch renames the frontend multiplexer from `char-mux.c` to `char-mux-fe.c`. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org ---

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

2024-10-16 Thread Roman Penyaev
This patch implements multiplexing capability of several backend devices, which opens up an opportunity to use a single frontend device on the guest, which can be manipulated from several backend devices. The idea of the change is trivial: keep list of backend devices (up to 4), init them on deman

[PATCH v4 8/8] qemu-options.hx: describe multiplexing of several backend devices

2024-10-16 Thread Roman Penyaev
This adds a few lines describing `mux-be` multiplexer configuration for multiplexing several backend devices with a single frontend device. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org --- qemu-options.hx | 78 -

[PATCH v4 4/8] chardev/char: rename frontend mux calls

2024-10-16 Thread Roman Penyaev
This patch renames calls in the frontend mux implementation to reflect its frontend nature. Patch does the following: s/mux_chr/mux_fe_chr/g No functional changes are made. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org --- chardev/char-fe.c | 6 ++-

[PATCH v4 3/8] chardev/char: move away mux suspend/resume calls

2024-10-16 Thread Roman Penyaev
The suspend/resume open multiplexer calls are generic and will be used for frontend (current mux) and backend (will follow) implementations. Move them away from the `char-mux-fe.c` to more generic `char.c` file. Also for the sake of clarity these renames were made: s/suspend_mux_open/mux_suspend

Fwd: Re: [PATCH] hw/char/riscv_htif: Fix htif_mm_write that causes infinite loop in ACT.

2024-10-16 Thread Trd thg
Sorry about the email style, I'm not familiar with it yet > It's probably worth including this in the commit message. Agree, I'll do it. > It would be good to reference the sail implementation and the justification for the change there Sail implementation is probably here: https://github.com/ris

Re: [PATCH] tests/functional: Convert most Aspeed machine tests

2024-10-16 Thread Daniel P . Berrangé
On Wed, Oct 16, 2024 at 11:07:41AM +0200, Cédric Le Goater wrote: > This is a simple conversion of the tests with some cleanups and > adjustments to match the new test framework. Replace the zephyr image > MD5 hashes with SHA256 hashes while at it. > > The SDK tests depend on a ssh class from avoc

Re: [PATCH v3 1/8] target/riscv: Add Ssdbltrp CSRs handling

2024-10-16 Thread LIU Zhiwei
On 2024/10/14 19:22, Clément Léger wrote: Add ext_ssdbltrp in RISCVCPUConfig and implement MSTATUS.SDT, {H|M}ENVCFG.DTE and modify the availability of MTVAL2 based on the presence of the Ssdbltrp ISA extension. Signed-off-by: Clément Léger Reviewed-by: Alistair Francis --- target/riscv/cpu

Re: [PATCH] linux-headers: loongarch: add kvm_para.h and unistd_64.h

2024-10-16 Thread maobibo
ping. @Song Could you give some comments since it is LoongArch specific? Regards Bibo Mao On 2024/9/29 下午3:22, Bibo Mao wrote: KVM LBT supports on LoongArch requires the linux-header kvm_para.h, also unistd_64.h is required by unistd.h on LoongArch since 6.11 Signed-off-by: Bibo Mao --- s

[PATCH] vhost-user: fix shared object return values

2024-10-16 Thread Albert Esteve
VHOST_USER_BACKEND_SHARED_OBJECT_ADD and VHOST_USER_BACKEND_SHARED_OBJECT_REMOVE state in the spec that they return 0 for successful operations, non-zero otherwise. However, implementation relies on the return types of the virtio-dmabuf library, with opposite semantics (true if everything is correc

[PATCH] tests/functional: Convert most Aspeed machine tests

2024-10-16 Thread Cédric Le Goater
This is a simple conversion of the tests with some cleanups and adjustments to match the new test framework. Replace the zephyr image MD5 hashes with SHA256 hashes while at it. The SDK tests depend on a ssh class from avocado.utils which is difficult to replace. To be addressed separately. Signed

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

2024-10-16 Thread Stefan Berger
Error responses from swtpm are typically only 4 bytes long with the exception of a few commands that return more bytes. Therefore, read the entire response in 2 passes and stop if the first few bytes indicate an error response with no subsequent bytes readable. Read the rest in a 2nd pass, if neede

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

2024-10-16 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 v3 0/2] tpm: Resolve potential blocking-forever issue

2024-10-16 Thread Stefan Berger
In case swtpm was to return a control channel message with an error code it would often return less bytes than the full response. In some cases the current reading of the returned bytes would get stuck since more bytes are expected. Therefore, pass a separate parameter indicating how many bytes to

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

2024-10-16 Thread Daniel P . Berrangé
On Wed, Oct 16, 2024 at 10:57:07AM -0400, Stefan Berger wrote: > 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 > 32bi

Re: [PATCH 14/14] qtest/xive: Add test of pool interrupts

2024-10-16 Thread Mike Kowal
On 10/16/2024 3:33 AM, Thomas Huth wrote: On 15/10/2024 23.13, Michael Kowal wrote: From: Glenn Miles Added new test for pool interrupts. Signed-off-by: Glenn Miles Signed-off-by: Michael Kowal ---   tests/qtest/pnv-xive2-test.c | 77   1 file changed, 77

Re: [PATCH v3 1/4] migration: Move cpu-throttole.c from system to migration

2024-10-16 Thread Peter Xu
On Wed, Oct 16, 2024 at 03:56:42PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > Move cpu-throttle.c from system to migration since it's > only used for migration; this makes us avoid exporting the > util functions and variables in misc.h but export them in > migration.h when implem

Re: [PATCH v3 2/4] migration: Remove "rs" parameter in migration_bitmap_sync_precopy

2024-10-16 Thread Peter Xu
On Wed, Oct 16, 2024 at 03:56:43PM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > The global static variable ram_state in fact is referred to by the > "rs" parameter in migration_bitmap_sync_precopy. For ease of calling > by the callees, use the global variable directly in > migratio

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

2024-10-16 Thread Daniel P . Berrangé
On Wed, Oct 16, 2024 at 10:57:08AM -0400, Stefan Berger wrote: > Error responses from swtpm are typically only 4 bytes long with the > exception of a few commands that return more bytes. Therefore, read the > entire response in 2 passes and stop if the first few bytes indicate an > error response w

[PATCH] tests: Wait for migration completion on destination QEMU to avoid failures

2024-10-16 Thread Stefan Berger
Rather than waiting for the completion of migration on the source side, wait for it on the destination QEMU side to avoid accessing the TPM TIS memory mapped registers before QEMU could restore their state. This error condition could be triggered on busy systems where the destination QEMU did not h

Re: [PATCH] tests: Wait for migration completion on destination QEMU to avoid failures

2024-10-16 Thread Daniel P . Berrangé
On Wed, Oct 16, 2024 at 11:21:59AM -0400, Stefan Berger wrote: > Rather than waiting for the completion of migration on the source side, > wait for it on the destination QEMU side to avoid accessing the TPM TIS > memory mapped registers before QEMU could restore their state. This > error condition

Re: [PATCH] migration/dirtyrate: Silence warning about strcpy() on OpenBSD

2024-10-16 Thread Daniel P . Berrangé
On Wed, Oct 16, 2024 at 06:07:12PM +0200, Thomas Huth wrote: > The linker on OpenBSD complains: > > ld: warning: dirtyrate.c:447 (../src/migration/dirtyrate.c:447)(...): > warning: strcpy() is almost always misused, please use strlcpy() Is that the only place it complains ? We use 'strcpy' in

[PATCH 0/1] Insert LibSPDM in QEMU enabling in-tree compilation

2024-10-16 Thread htafr
(I) Summary === This patch is the beginning of the support of the Security Protocol and Data Model (SPDM). There are some known issues (see II), but it's usable and not many users are going to use this functionality for now,

[PATCH 1/1] libspdm: insert LibSPDM as subproject

2024-10-16 Thread htafr
Signed-off-by: htafr --- .gitmodules | 3 ++ Kconfig.host | 3 ++ meson.build | 84 +++ meson_options.txt | 8 scripts/make-config-poison.sh | 19 scripts/meson-buildoptions.sh | 9 +

Re: [PULL 13/25] target/i386: convert CMPXCHG8B/CMPXCHG16B to new decoder

2024-10-16 Thread Philippe Mathieu-Daudé
Hi, On 15/10/24 11:16, Paolo Bonzini wrote: The gen_cmpxchg8b and gen_cmpxchg16b functions even have the correct prototype already; the only thing that needs to be done is removing the gen_lea_modrm() call. This moves the last LOCK-enabled instructions to the new decoder. It is now possible to

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

2024-10-16 Thread Igor Mammedov
On Wed, 22 May 2024 17:34:52 +0200 Anthony Harivel wrote: > Starting with the "Sandy Bridge" generation, Intel CPUs provide a RAPL > interface (Running Average Power Limit) for advertising the accumulated > energy consumption of various power domains (e.g. CPU packages, DRAM, > etc.). > > The co

Re: [PATCH v6 0/3] Add support for the RAPL MSRs series

2024-10-16 Thread Igor Mammedov
On Wed, 22 May 2024 17:34:49 +0200 Anthony Harivel wrote: > Dear maintainers, > > First of all, thank you very much for your review of my patch > [1]. I've tried to play with this feature and have a few questions about it 1. trying to start with non accessible or not existent socket

Re: [PATCH] tests/functional: Convert most Aspeed machine tests

2024-10-16 Thread Philippe Mathieu-Daudé
On 16/10/24 06:30, Daniel P. Berrangé wrote: On Wed, Oct 16, 2024 at 11:07:41AM +0200, Cédric Le Goater wrote: This is a simple conversion of the tests with some cleanups and adjustments to match the new test framework. Replace the zephyr image MD5 hashes with SHA256 hashes while at it. The SDK

Re: [QEMU PATCH] cxl/cxl-mailbox-utils: Fix size check for cmd_firmware_update_get_info

2024-10-16 Thread Fan Ni
On Wed, Oct 16, 2024 at 05:01:38PM +0100, Jonathan Cameron wrote: > On Tue, 8 Oct 2024 20:01:07 -0700 > Davidlohr Bueso wrote: > > > On Tue, 08 Oct 2024, nifan@gmail.com wrote:\n > > >From: Fan Ni > > > > > >In the function cmd_firmware_update_get_info for handling Get FW info > > >command (

Re: [PATCH v6 0/3] Add support for the RAPL MSRs series

2024-10-16 Thread Anthony Harivel
Hi Igor, Igor Mammedov, Oct 16, 2024 at 13:52: > On Wed, 22 May 2024 17:34:49 +0200 > Anthony Harivel wrote: > >> Dear maintainers, >> >> First of all, thank you very much for your review of my patch >> [1]. > > I've tried to play with this feature and have a few questions about it > Thanks f

Re: [QEMU PATCH] cxl/cxl-mailbox-utils: Fix size check for cmd_firmware_update_get_info

2024-10-16 Thread Jonathan Cameron via
On Tue, 8 Oct 2024 20:01:07 -0700 Davidlohr Bueso wrote: > On Tue, 08 Oct 2024, nifan@gmail.com wrote:\n > >From: Fan Ni > > > >In the function cmd_firmware_update_get_info for handling Get FW info > >command (0x0200h), the vmem, pmem and DC capacity size check were > >incorrect. The size sh

[PATCH] migration/dirtyrate: Silence warning about strcpy() on OpenBSD

2024-10-16 Thread Thomas Huth
The linker on OpenBSD complains: ld: warning: dirtyrate.c:447 (../src/migration/dirtyrate.c:447)(...): warning: strcpy() is almost always misused, please use strlcpy() It's currently not a real problem in this case since both arrays have the same size (256 bytes). But just in case somebody chan

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

2024-10-16 Thread Stefan Berger
On 10/16/24 9:34 AM, Stefan Berger wrote: 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 er

Re: tpm-tis-device-swtpm-test timeout

2024-10-16 Thread Fabiano Rosas
Stefan Berger writes: > On 10/15/24 6:02 PM, Fabiano Rosas wrote: >> Stefan Berger writes: >> >>> On 10/15/24 3:57 PM, Fabiano Rosas wrote: Stefan Berger writes: >>> > > So this here is failing for you every time? > > QTEST_QEMU_BINARY=build/qemu-system-aarch64 >

Re: [PATCH RFC V5 00/30] Support of Virtual CPU Hotplug for ARMv8 Arch

2024-10-16 Thread Miguel Luis
Hi Salil, > On 15 Oct 2024, at 09:59, Salil Mehta wrote: > > PROLOGUE > > > To assist in review and set the right expectations from this RFC, please first > read the sections *APPENDED AT THE END* of this cover letter: > > 1. Important *DISCLAIMER* [Section (X)] > 2. Work presented at

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

2024-10-16 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 v2 0/2] tpm: Resolve potential blocking-forever issue

2024-10-16 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

Re: [PATCH v2 0/3] crypto: fix regression in hash result buffer handling

2024-10-16 Thread Dorjoy Chowdhury
On Wed, Oct 16, 2024 at 4:20 PM Daniel P. Berrangé wrote: > > > > Daniel P. Berrangé (3): > crypto/hash: avoid overwriting user supplied result pointer > tests: correctly validate result buffer in hash/hmac tests > include/crypto: clarify @result/@result_len for hash/hmac APIs > > crypto/ha

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

2024-10-16 Thread Stefan Berger
Error responses from swtpm are always only 4 bytes long with the exception of CMD_GET_STATEBLOB that returns more bytes. 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

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

2024-10-16 Thread Roman Penyaev
Hi, On Wed, Oct 16, 2024 at 1:14 PM Marc-André Lureau wrote: > > Hi > > On Wed, Oct 16, 2024 at 2:29 PM Roman Penyaev wrote: >> >> This patch implements multiplexing capability of several backend >> devices, which opens up an opportunity to use a single frontend >> device on the guest, which can

Re: [PATCH v4 7/8] tests/unit/test-char: add unit test for the `mux-be` multiplexer

2024-10-16 Thread Marc-André Lureau
Hi On Wed, Oct 16, 2024 at 2:28 PM Roman Penyaev wrote: > > The test is trivial: several backends, 1 `mux-be`, 1 frontend > do the buffer write and read. Pipe is used for EAGAIN verification. > > Signed-off-by: Roman Penyaev > Cc: "Marc-André Lureau" > Cc: qemu-devel@nongnu.org > --- > tests/u

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

2024-10-16 Thread Anthony Harivel
Hi Igor, I will let Paolo or Daniel answering those architecture questions, they are more qualified than me. Thanks Anthony Igor Mammedov, Oct 16, 2024 at 14:17: > On Wed, 22 May 2024 17:34:52 +0200 > Anthony Harivel wrote: > >> Starting with the "Sandy Bridge" generation, Intel CPUs provide

Re: [PATCH v8 0/6] AWS Nitro Enclave emulation support

2024-10-16 Thread Dorjoy Chowdhury
Ping This patch series has been reviewed by Alex. I am not sure if it needs more review. If not, maybe this can be picked up for merging. Thanks! Regards, Dorjoy

Re: [PATCH 1/2] gdbstub: Fix wrong CPUState pointer in breakpoint functions

2024-10-16 Thread Roque Arcudia Hernandez
Hello Philippe, The Google-Bug-Id is an internal ID and should have been removed. The information in the bug was mostly transcribed in the cover letter of this patch series. Thanks Roque On Mon, Oct 7, 2024 at 1:06 PM Philippe Mathieu-Daudé wrote: > > Hi Roque, > > On 6/9/24 19:54, Roque Arcud

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

2024-10-16 Thread Stefan Berger
On 10/16/24 11:03 AM, Daniel P. Berrangé wrote: On Wed, Oct 16, 2024 at 10:57:07AM -0400, Stefan Berger wrote: 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 orde

Re: [PATCH 10/16] rust: introduce alternative implementation of offset_of!

2024-10-16 Thread Junjie Mao
Paolo Bonzini writes: > offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation > that was found on the Rust forums, and whose author agreed to license as > MIT for use in QEMU. > > The alternative allows only one level of field access, but apart > from this can be used just

Re: [PATCH v2 6/7] hw/intc/openpic: Improve errors for out of bounds property values

2024-10-16 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 10/10/24 12:01, Markus Armbruster wrote: >> The error message doesn't matter much, as the "openpic" device isn't >> user-creatable. But it's the last use of >> QERR_PROPERTY_VALUE_OUT_OF_RANGE, which has to go. Change the message >> just like the previous com

Re: [PATCH 0/7] virtio-net fixes

2024-10-16 Thread Jason Wang
Hi Michael: On Wed, Oct 16, 2024 at 1:58 AM Michael Tokarev wrote: > > On 15.09.2024 04:06, Akihiko Odaki wrote: > > Most of this series are fixes for software RSS and hash reporting, which > > should have no production user. > > > > However there is one exception; patch "virtio-net: Fix size che

Re: [PATCH] crypto/hash-afalg: Fix broken build

2024-10-16 Thread Cédric Le Goater
On 10/17/24 08:47, Markus Armbruster wrote: Fux build broken by semantic conflict with commit 8f525028bc6 (qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo). Fixes: 90c3dc60735a (crypto/hash-afalg: Implement new hash API) Signed-off-by: Markus Armbruster My bad :/ Obviously, I didn't catch t

Re: [PATCH] migration/dirtyrate: Silence warning about strcpy() on OpenBSD

2024-10-16 Thread Thomas Huth
On 16/10/2024 18.22, Daniel P. Berrangé wrote: On Wed, Oct 16, 2024 at 06:07:12PM +0200, Thomas Huth wrote: The linker on OpenBSD complains: ld: warning: dirtyrate.c:447 (../src/migration/dirtyrate.c:447)(...): warning: strcpy() is almost always misused, please use strlcpy() Is that the o

Re: Host riscv disas is broken

2024-10-16 Thread LIU Zhiwei
On 2024/10/17 11:52, Richard Henderson wrote: On 10/16/24 19:57, LIU Zhiwei wrote: Hi Richard, On 2024/10/17 02:38, Richard Henderson wrote: 2595: if (dec->cfg->ext_zcmop) { 2690:    if (dec->cfg->ext_zcmp && ((inst >> 12) & 0b01)) { 2716:    if (!dec->cfg->ex

[PATCH] crypto/hash-afalg: Fix broken build

2024-10-16 Thread Markus Armbruster
Fux build broken by semantic conflict with commit 8f525028bc6 (qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo). Fixes: 90c3dc60735a (crypto/hash-afalg: Implement new hash API) Signed-off-by: Markus Armbruster --- crypto/hash-afalg.c | 10 +- 1 file changed, 5 insertions(+), 5 deletion

Re: [PATCH v2] tests/functional: Convert most Aspeed machine tests

2024-10-16 Thread Thomas Huth
On 16/10/2024 22.38, Cédric Le Goater wrote: This is a simple conversion of the tests with some cleanups and adjustments to match the new test framework. Replace the zephyr image MD5 hashes with SHA256 hashes while at it. The SDK tests depend on a ssh class from avocado.utils which is difficult

RE: [PATCH] hw/riscv: Add Microblaze V 32bit virt board

2024-10-16 Thread Boddu, Sai Pavan
Hi Daniel, Thanks for the review, I will send a V2 addressing the comments. Regards, Sai Pavan >-Original Message- >From: Daniel Henrique Barboza >Sent: Wednesday, October 16, 2024 1:28 AM >To: Boddu, Sai Pavan ; qemu-devel@nongnu.org; >qemu-ri...@nongnu.org >Cc: Paolo Bonzini ; Palmer

[PATCH v4 3/6] migration: Move cpu-throttole.c from system to migration

2024-10-16 Thread yong . huang
From: Hyman Huang Move cpu-throttle.c from system to migration since it's only used for migration; this makes us avoid exporting the util functions and variables in misc.h but export them in migration.h when implementing the periodic ramblock dirty sync feature in the upcoming commits. Since CPU

[PATCH v4 2/6] migration: Stop CPU throttling conditionally

2024-10-16 Thread yong . huang
From: Hyman Huang Since CPU throttling only occurs when auto-converge is on, stop it conditionally. Signed-off-by: Hyman Huang --- migration/migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 021faee2f3..37a200

[PATCH v4 5/6] migration: Support periodic RAMBlock dirty bitmap sync

2024-10-16 Thread yong . huang
From: Hyman Huang When VM is configured with huge memory, the current throttle logic doesn't look like to scale, because migration_trigger_throttle() is only called for each iteration, so it won't be invoked for a long time if one iteration can take a long time. The periodic dirty sync aims to f

[PATCH v4 1/6] accel/tcg/icount-common: Remove the reference to the unused header file

2024-10-16 Thread yong . huang
From: Hyman Huang Signed-off-by: Hyman Huang --- accel/tcg/icount-common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c index 8d3d3a7e9d..30bf8500dc 100644 --- a/accel/tcg/icount-common.c +++ b/accel/tcg/icount-common.c @@ -36,7 +36,6

[PATCH v4 4/6] migration: Remove "rs" parameter in migration_bitmap_sync_precopy

2024-10-16 Thread yong . huang
From: Hyman Huang The global static variable ram_state in fact is referred to by the "rs" parameter in migration_bitmap_sync_precopy. For ease of calling by the callees, use the global variable directly in migration_bitmap_sync_precopy and remove "rs" parameter. The migration_bitmap_sync_precopy

[PATCH v4 0/6] migration: auto-converge refinements for huge VM

2024-10-16 Thread yong . huang
From: Hyman Huang v4: 1. split the [PATCH v3 1/6] into smaller patches. 2. refine some comment and commit message 3. fix race issue for the throttle_dirty_sync_timer 4. refine the util function cpu_throttle_dirty_sync_timer Thanks Peter for the suggestions. Please review. Yong v3: 1. drop the

[PATCH v4 6/6] tests/migration: Add case for periodic ramblock dirty sync

2024-10-16 Thread yong . huang
From: Hyman Huang Signed-off-by: Hyman Huang Reviewed-by: Peter Xu --- tests/qtest/migration-test.c | 32 1 file changed, 32 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 95e45b5029..e6a2803e71 100644 --- a/tests/

Re: [PULL 07/17] crypto/hash-afalg: Implement new hash API

2024-10-16 Thread Markus Armbruster
Daniel P. Berrangé writes: > From: Alejandro Zeise > > Updates the afalg hash driver to support the new accumulative > hashing changes as part of the patch series. > > Implements opening/closing of contexts, updating hash data > and finalizing the hash digest. > > In order to support the update

Re: [PATCH v3 1/4] migration: Move cpu-throttole.c from system to migration

2024-10-16 Thread Yong Huang
On Wed, Oct 16, 2024 at 11:50 PM Peter Xu wrote: > On Wed, Oct 16, 2024 at 03:56:42PM +0800, yong.hu...@smartx.com wrote: > > From: Hyman Huang > > > > Move cpu-throttle.c from system to migration since it's > > only used for migration; this makes us avoid exporting the > > util functions and va

Re: Host riscv disas is broken

2024-10-16 Thread Richard Henderson
On 10/16/24 19:57, LIU Zhiwei wrote: Hi Richard, On 2024/10/17 02:38, Richard Henderson wrote: 2595: if (dec->cfg->ext_zcmop) { 2690:    if (dec->cfg->ext_zcmp && ((inst >> 12) & 0b01)) { 2716:    if (!dec->cfg->ext_zcmt) { 2726:    if (!dec->

Re: [PATCH v3 3/4] migration: Support periodic ramblock dirty sync

2024-10-16 Thread Yong Huang
On Thu, Oct 17, 2024 at 2:49 AM Peter Xu wrote: > On Wed, Oct 16, 2024 at 03:56:44PM +0800, yong.hu...@smartx.com wrote: > > From: Hyman Huang > > > > When VM is configured with huge memory, the current throttle logic > > doesn't look like to scale, because migration_trigger_throttle() > > is on

Re: [PATCH v6 00/14] tcg/riscv: Add support for vector

2024-10-16 Thread TangTianCheng
Signed-off-by: Huang Shiyuan Co-authored-by: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Signed-off-by: Swung0x48 Hi, We should remove the tag "Signed-off-by: swung0x48swung0...@outlook.com" since the author's real name, Huang Shiyuan, is

Re: Re: [PATCH] hw/char/riscv_htif: Fix htif_mm_write that causes infinite loop in ACT.

2024-10-16 Thread Alistair Francis
On Wed, Oct 16, 2024 at 8:32 PM Trd thg wrote: > > Sorry about the email style, I'm not familiar with it yet No worries! It takes some getting used to. Mostly just plain text emails and reply inline :) Alistair > > > It's probably worth including this in the commit message. > Agree, I'll do it.

Re: [PATCH 0/1] Insert LibSPDM in QEMU enabling in-tree compilation

2024-10-16 Thread Alistair Francis
On Thu, Oct 17, 2024 at 2:35 AM htafr wrote: > > (I) Summary > === > > This patch is the beginning of the support of the Security Protocol and > Data Model (SPDM). There are some known issues (see II), but it's > usable and no

Re: [PATCH v2 3/8] target/riscv: Implement Ssdbltrp exception handling

2024-10-16 Thread Alistair Francis
On Mon, Oct 14, 2024 at 5:43 PM Clément Léger wrote: > > > > On 11/10/2024 05:22, Alistair Francis wrote: > > On Wed, Sep 25, 2024 at 9:59 PM Clément Léger wrote: > >> > >> When the Ssdbltrp ISA extension is enabled, if a trap happens in S-mode > >> while SSTATUS.SDT isn't cleared, generate a dou

Re: [PATCH v2 2/8] target/riscv: Implement Ssdbltrp sret, mret and mnret behavior

2024-10-16 Thread Alistair Francis
On Sat, Oct 12, 2024 at 4:52 AM Ved Shanbhogue wrote: > > Alistair Francis wrote: > >> When the Ssdbltrp extension is enabled, SSTATUS.SDT field is cleared > >> when executing sret. When executing mret/mnret, SSTATUS.SDT is cleared > >> when returning to U, VS or VU and VSSTATUS.SDT is cleared whe

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

2024-10-16 Thread Stefan Berger
Error responses from swtpm are typically only 4 bytes long with the exception of a few commands that return more bytes. Therefore, read the entire response in 2 steps and stop if the first few bytes indicate an error response with no subsequent bytes readable. Read the rest in a 2nd step, if needed

  1   2   >