Re: [RFC PATCH v2 03/13] hw/arm/smmu: Consolidate ASID and VMID types

2024-04-18 Thread Eric Auger
Hi Mostafa, On 4/8/24 16:08, Mostafa Saleh wrote: > ASID and VMID used to be uint16_t in the translation config, however, > in other contexts they can be int as -1 in case of TLB invalidation, > to represent all(don’t care). > When stage-2 was added asid was set to -1 in stage-2 and vmid to -1 > i

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

2024-04-18 Thread Anthony Harivel
Hi Daniel, Daniel P. Berrangé, Apr 17, 2024 at 19:23: > On Thu, Apr 11, 2024 at 02:14:31PM +0200, Anthony Harivel wrote: > > Dear maintainers, > > > > First of all, thank you very much for your review of my patch > > [1]. > > > > In this version (v5), I have attempted to address all the prob

Re: [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-18 Thread Jonathan Cameron via
On Wed, 17 Apr 2024 13:07:35 -0700 Richard Henderson wrote: > On 4/16/24 08:11, Jonathan Cameron wrote: > > On Fri, 1 Mar 2024 10:41:09 -1000 > > Richard Henderson wrote: > > > >> If translation is disabled, the default memory type is Device, which > >> requires alignment checking. This is

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

2024-04-18 Thread Anthony Harivel
Hi Zhao, Daniel, Zhao Liu, Apr 17, 2024 at 17:13: > Hi Daniel, > > On Wed, Apr 17, 2024 at 01:27:03PM +0100, Daniel P. Berrangé wrote: > > Date: Wed, 17 Apr 2024 13:27:03 +0100 > > From: "Daniel P. Berrangé" > > Subject: Re: [PATCH v5 3/3] Add support for RAPL MSRs in KVM/Qemu > > > > On Wed,

Re: [PATCH v2 2/4] hw/i2c: Fix checkpatch line over 80 chars warnings

2024-04-18 Thread Cédric Le Goater
On 4/17/24 16:20, Philippe Mathieu-Daudé wrote: On 17/4/24 08:24, Cédric Le Goater wrote: Hello, On 4/16/24 20:47, Philippe Mathieu-Daudé wrote: We are going to modify these lines, fix their style in order to avoid checkpatch.pl warnings:    WARNING: line over 80 characters Signed-off-by: Ph

RE: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap

2024-04-18 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v2 3/5] intel_iommu: Add a framework to do >compatibility check with host IOMMU cap/ecap > >Hello Zhenzhong > >On 4/17/24 11:24, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Cédric Le Goat

Re: [PATCH v3 2/2] cxl/core: add poison creation event handler

2024-04-18 Thread Shiyang Ruan via
在 2024/4/18 1:30, Dave Jiang 写道: On 4/17/24 12:50 AM, Shiyang Ruan wrote: Currently driver only traces cxl events, poison creation (for both vmem and pmem type) on cxl memdev is silent. OS needs to be notified then it could handle poison pages in time. Per CXL spec, the device error event

[PATCH] pythondeps.toml: warn about updates needed to docs/requirements.txt

2024-04-18 Thread Paolo Bonzini
docs/requirements.txt is expected by readthedocs and should be in sync with pythondeps.toml. Add a comment to both. Signed-off-by: Paolo Bonzini --- docs/requirements.txt | 3 +++ pythondeps.toml | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/requirements.txt b/docs/requiremen

Re: Hermetic virtio-vsock in QEMU

2024-04-18 Thread Daniel P . Berrangé
On Wed, Apr 17, 2024 at 12:31:41PM -0700, Roman Kiryanov wrote: > Hi Daniel, > > thank you for looking into this. I checked how VHOST_USER_VSOCK and it > refers to the vhost-user protocol. It is implemented in the > subprojects/libvhost-user library, but this library depends on poll.h > and linux/

Re: [PATCH] virtio-pci: Fix the failure process in kvm_virtio_pci_vector_use_one()

2024-04-18 Thread Cindy Lu
On Wed, Apr 17, 2024 at 2:38 AM Michael S. Tsirkin wrote: > > On Tue, Apr 16, 2024 at 02:14:57PM +0100, Peter Maydell wrote: > > On Tue, 16 Apr 2024 at 13:41, Cindy Lu wrote: > > > > > > On Tue, Apr 16, 2024 at 8:30 PM Peter Maydell > > > wrote: > > > > > > > > On Tue, 16 Apr 2024 at 13:29, Cin

Re: [RFC PATCH 1/4] target/riscv/kvm: add software breakpoints support

2024-04-18 Thread Chao Du
On 2024-04-16 17:23, Daniel Henrique Barboza wrote: > > On 12/21/23 06:49, Chao Du wrote: > > This patch implements insert/remove software breakpoint process: > > > > Add an input parameter for kvm_arch_insert_sw_breakpoint() and > > kvm_arch_remove_sw_breakpoint() to pass the length information

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

2024-04-18 Thread Maciej S. Szmigiero
On 17.04.2024 18:35, Daniel P. Berrangé wrote: On Wed, Apr 17, 2024 at 02:11:37PM +0200, Maciej S. Szmigiero wrote: On 17.04.2024 10:36, Daniel P. Berrangé wrote: On Tue, Apr 16, 2024 at 04:42:39PM +0200, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" VFIO device state transfer is cu

[PATCH 2/3] hw/cxl/cxl-cdat: Make ct3_build_cdat() return boolean

2024-04-18 Thread Zhao Liu
From: Zhao Liu As error.h suggested, the best practice for callee is to return something to indicate success / failure. So make ct3_build_cdat() return boolean, and this is the preparation for cxl_doe_cdat_init() returning boolean. Suggested-by: Markus Armbruster Signed-off-by: Zhao Liu ---

[PATCH 0/3] hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean

2024-04-18 Thread Zhao Liu
From: Zhao Liu Hi list, This series is the followup of the previous fix [1] to improve the error handling. As error.h suggested, the best practice for callee is to return something to indicate success / failure instead of dereferencing @errp. Thus make cxl_doe_cdat_init() as well as ct3_load_c

[PATCH 1/3] hw/cxl/cxl-cdat: Make ct3_load_cdat() return boolean

2024-04-18 Thread Zhao Liu
From: Zhao Liu As error.h suggested, the best practice for callee is to return something to indicate success / failure. So make ct3_load_cdat() return boolean, and this is the preparation for cxl_doe_cdat_init() returning boolean. Suggested-by: Markus Armbruster Signed-off-by: Zhao Liu --- h

[PATCH 3/3] hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean

2024-04-18 Thread Zhao Liu
From: Zhao Liu As error.h suggested, the best practice for callee is to return something to indicate success / failure. With returned boolean, there's no need to dereference @errp to check failure case. Suggested-by: Markus Armbruster Signed-off-by: Zhao Liu --- hw/cxl/cxl-cdat.c

[PATCH] accel/tcg/icount-common: Consolidate the use of warn_report_once()

2024-04-18 Thread Zhao Liu
From: Zhao Liu Use warn_report_once() to get rid of the static local variable "notified". Signed-off-by: Zhao Liu --- Note: After cleaning up similar uses in x86, only icount-common.c and virtio-mem.c still have "only once" usage with static variables. However, virtio-mem.c uses warn_report_err

[PATCH v3 01/13] tests: Remove Ubuntu 20.04 container

2024-04-18 Thread Thomas Huth
Since Ubuntu 22.04 is now available since two years, we can stop actively supporting the previous LTS version of Ubuntu now. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/docker/dockerfiles/ubuntu2004.docker | 157 - tests/lcitool/refresh

[PATCH v3 07/13] Bump minimum glib version to v2.66

2024-04-18 Thread Thomas Huth
Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can look into bumping the glib version to a new minimum for further clean-ups. According to repology.org, available versions are: CentOS Stream 9: 2.66.7 Debian 11: 2.66.8 Fedora 38: 2.74.1 Freebsd:

[PATCH v3 00/13] Drop old distros, bump glib and switch to glib URI parsing code

2024-04-18 Thread Thomas Huth
In the QEMU 9.1 development cycle, we can drop the support for Ubuntu 20.04 and CentOS 8 since the following major versions of these distributions are available since 2 years already. This allows us to bump the minimum version of glib to 2.66 which comes with a nice set of URI parsing functions. B

[PATCH v3 10/13] block/nbd: Use URI parsing code from glib

2024-04-18 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. The g_uri_get_host() also takes care of removing the square brackets from IPv6 addresses, so we can drop that part of the QEMU code now, too. Rev

[PATCH v3 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-04-18 Thread Thomas Huth
RHEL 9 (and thus also the derivatives) are available since two years now, so according to QEMU's support policy, we can drop the active support for the previous major version 8 now. Another reason for doing this is that Centos Stream 8 will go EOL soon: https://blog.centos.org/2023/04/end-dates-a

[PATCH v3 13/13] util/uri: Remove the old URI parsing code

2024-04-18 Thread Thomas Huth
Now that we switched all consumers of the URI code to use the URI parsing functions from glib instead, we can remove our internal URI parsing code since it is not used anymore. Reviewed-by: Eric Blake Signed-off-by: Thomas Huth --- include/qemu/uri.h | 99 --- util/uri.c | 1466 --

[PATCH v3 02/13] tests/lcitool/libvirt-ci: Update to the latest master branch

2024-04-18 Thread Thomas Huth
We need the latest fixes for the lcitool to be able to properly update our CentOS docker file to CentOS Stream 9. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- tests/lcitool/libvirt-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lcitool/libvirt-ci

[PATCH v3 12/13] block/ssh: Use URI parsing code from glib

2024-04-18 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. While we're at it, also emit a warning when encountering unknown parameters in the URI, so that the users have a chance to detect their typos or

[PATCH v3 08/13] Remove glib compatibility code that is not required anymore

2024-04-18 Thread Thomas Huth
Now that we bumped the minumum glib version to 2.66, we can drop the old code. Suggested-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- qga/commands-posix-ssh.c | 8 util/error-report.c | 10 -- 2 files changed, 18 deletions(-) diff --g

[PATCH v3 11/13] block/nfs: Use URI parsing code from glib

2024-04-18 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. While we're at it, slightly rephrase one of the error messages: Use "Invalid value..." instead of "Illegal value..." since the latter rather soun

[PATCH v3 09/13] block/gluster: Use URI parsing code from glib

2024-04-18 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. Since g_uri_get_path() returns a const pointer, we also need to tweak the parameter of parse_volume_options() (where we use the result of g_uri_g

[PATCH v3 03/13] tests/docker/dockerfiles: Run lcitool-refresh after the lcitool update

2024-04-18 Thread Thomas Huth
This update adds the removing of the EXTERNALLY-MANAGED marker files that has been added to the lcitool recently. Quoting Daniel: "For those who don't know, python now commonly blocks the ability to run 'pip install' outside of a venv. This generally makes sense for a precious installation environ

[PATCH v3 05/13] .travis.yml: Update the jobs to Ubuntu 22.04

2024-04-18 Thread Thomas Huth
According to our support policy, we'll soon drop our official support for Ubuntu 20.04 ("Focal Fossa") in QEMU. Thus we should update the Travis jobs now to a newer release (Ubuntu 22.04 - "Jammy Jellyfish") for future testing. Since all jobs are using this release now, we can drop the entries from

[PATCH v3 06/13] ci: move external build environment setups to CentOS Stream 9

2024-04-18 Thread Thomas Huth
From: Paolo Bonzini RHEL 9 (and thus also the derivatives) are available since two years now, so according to QEMU's support policy, we can drop the active support for the previous major version 8 now. Thus upgrade our CentOS Stream build environment playbooks to major version 9 now. Signed-off

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

2024-04-18 Thread Daniel P . Berrangé
On Thu, Apr 18, 2024 at 11:50:12AM +0200, Maciej S. Szmigiero wrote: > On 17.04.2024 18:35, Daniel P. Berrangé wrote: > > On Wed, Apr 17, 2024 at 02:11:37PM +0200, Maciej S. Szmigiero wrote: > > > On 17.04.2024 10:36, Daniel P. Berrangé wrote: > > > > On Tue, Apr 16, 2024 at 04:42:39PM +0200, Macie

Re: [PATCH] vhost-user-test: no set non-blocking for cal fd less than 0.

2024-04-18 Thread Thomas Huth
On 11/04/2024 09.35, Yuxue Liu yuxue@jaguarmicro.com wrote: From: Yuxue Liu In the scenario where vhost-user sets eventfd to -1, qemu_chr_fe_get_msgfds retrieves fd as -1. When vhost_user_read receives, it does not perform blocking operations on the descriptor with fd=-1, so non-blocking op

Re: [PATCH 13/21] accel/tcg: Un-inline retaddr helpers to 'user-retaddr.h'

2024-04-18 Thread Philippe Mathieu-Daudé
On 17/4/24 21:30, Richard Henderson wrote: On 4/17/24 11:27, Philippe Mathieu-Daudé wrote: set_helper_retaddr() is only used in accel/tcg/user-exec.c. clear_helper_retaddr() is only used in accel/tcg/user-exec.c Here should be "accel/tcg/cpu-exec.c", fixed. and accel/tcg/user-exec.c. Typo

Re: [PATCH] accel/tcg/icount-common: Consolidate the use of warn_report_once()

2024-04-18 Thread Paolo Bonzini
Queued, thanks. Paolo

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

2024-04-18 Thread Anthony Harivel
Hi Zhao, Zhao Liu, Apr 17, 2024 at 12:07: > Hi Anthony, > > May I ask what your usage scenario is? Is it to measure Guest's energy > consumption and to charged per watt consumed? ;-) See previous email from Daniel. > On Thu, Apr 11, 2024 at 02:14:34PM +0200, Anthony Harivel wrote: > > Date: Th

Re: [PATCH 09/21] semihosting/uaccess: Avoid including 'cpu.h'

2024-04-18 Thread Philippe Mathieu-Daudé
On 17/4/24 21:14, Richard Henderson wrote: On 4/17/24 11:27, Philippe Mathieu-Daudé wrote: "semihosting/uaccess.h" only requires declarations from "exec/cpu-defs.h". Avoid including the huge "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231211212

Re: [PATCH-for-9.1 v2 2/3] target/nios2: Remove the deprecated Nios II target

2024-04-18 Thread Philippe Mathieu-Daudé
On 27/3/24 15:48, Philippe Mathieu-Daudé wrote: The Nios II target is deprecated since v8.2 in commit 9997771bc1 ("target/nios2: Deprecate the Nios II architecture"). Remove: - Buildsys / CI infra - User emulation - System emulation (10m50-ghrd & nios2-generic-nommu machines) - Tests Cc: Marek

Re: [PATCH RFC v3 00/49] Add AMD Secure Nested Paging (SEV-SNP) support

2024-04-18 Thread Ani Sinha
> On 20 Mar 2024, at 14:08, Michael Roth wrote: > > These patches implement SEV-SNP base support along with CPUID enforcement > support for QEMU, and are also available at: > > https://github.com/amdese/qemu/commits/snp-v3-rfc > > they are based on top of the following patchset from Paolo:

Re: [PATCH 3/3] hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean

2024-04-18 Thread Philippe Mathieu-Daudé
On 18/4/24 12:04, Zhao Liu wrote: From: Zhao Liu As error.h suggested, the best practice for callee is to return something to indicate success / failure. With returned boolean, there's no need to dereference @errp to check failure case. Suggested-by: Markus Armbruster Signed-off-by: Zhao Liu

Re: [PATCH 0/3] hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean

2024-04-18 Thread Philippe Mathieu-Daudé
On 18/4/24 12:04, Zhao Liu wrote: From: Zhao Liu --- Zhao Liu (3): hw/cxl/cxl-cdat: Make ct3_load_cdat() return boolean hw/cxl/cxl-cdat: Make ct3_build_cdat() return boolean hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean Series: Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 0/2] Fix pointer arithmetic in indirect read for libvhost-user and libvduse

2024-04-18 Thread Peter Maydell
Temir: yeah, this was our fault, apologies for not responding. Michael, David, Raphael -- looks like we unfortunately lost track of this patchset -- could one of you have a look and review it, please? thanks -- PMM On Sun, 4 Feb 2024 at 09:42, Тимур wrote: > > Hello, I am very sorry for botheri

Re: [RFC PATCH v2 04/13] hw/arm/smmuv3: Translate CD and TT using stage-2 table

2024-04-18 Thread Eric Auger
Hi Mostafa, On 4/8/24 16:08, Mostafa Saleh wrote: > According to the user manual (ARM IHI 0070 F.b), s/user manual/ARM SMMU architecture specification > In "5.2 Stream Table Entry": > [51:6] S1ContextPtr > If Config[1] == 1 (stage 2 enabled), this pointer is an IPA translated by > stage 2 and t

Re: [PATCH-for-9.1 v2 2/3] target/nios2: Remove the deprecated Nios II target

2024-04-18 Thread Marek Vasut
On 4/18/24 1:10 PM, Philippe Mathieu-Daudé wrote: On 27/3/24 15:48, Philippe Mathieu-Daudé wrote: The Nios II target is deprecated since v8.2 in commit 9997771bc1 ("target/nios2: Deprecate the Nios II architecture"). Remove: - Buildsys / CI infra - User emulation - System emulation (10m50-ghrd

Re: Deprecation/removal of nios2 target support

2024-04-18 Thread Marek Vasut
On 4/18/24 7:53 AM, Thomas Huth wrote: On 18/04/2024 05.27, Sandra Loosemore wrote: Tomorrow I plan to push patches to mark the nios2 target as obsolete in GCC 14. Background: Intel has EOL'ed the Nios II processor IP and is now directing their FPGA customers to a RISC-V platform instead. h

Re: [PATCH 0/3] hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean

2024-04-18 Thread Jonathan Cameron via
On Thu, 18 Apr 2024 14:06:39 +0200 Philippe Mathieu-Daudé wrote: > On 18/4/24 12:04, Zhao Liu wrote: > > From: Zhao Liu > > > > --- > > Zhao Liu (3): > >hw/cxl/cxl-cdat: Make ct3_load_cdat() return boolean > >hw/cxl/cxl-cdat: Make ct3_build_cdat() return boolean > >hw/cxl/cxl-cda

[PATCH] tcg: Fix the overflow in indexing tcg_ctx->temps

2024-04-18 Thread Zhiwei Jiang
Sometimes, when the address of the passed TCGTemp *ts variable is the same as tcg_ctx, the index calculated in the temp_idx function, i.e., ts - tcg_ctx->temps, can result in a particularly large value, causing overflow in the subsequent array access. 0 0x7f79590132ac in test_bit (addr=, nr

Re: [PATCH 3/3] hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean

2024-04-18 Thread Zhao Liu
Hi Philippe, On Thu, Apr 18, 2024 at 02:06:15PM +0200, Philippe Mathieu-Daudé wrote: [snip] > > diff --git a/include/hw/cxl/cxl_component.h b/include/hw/cxl/cxl_component.h > > index 5012fab6f763..945ee6ffd045 100644 > > --- a/include/hw/cxl/cxl_component.h > > +++ b/include/hw/cxl/cxl_component

[RFC PATCH 3/3] target/riscv: add Smdbltrp extension support

2024-04-18 Thread Clément Léger
The Smdbltrp extension allows to generate M-mode targeted double trap exceptions [1]. Such exceptions are generated if a trap is taken while mstatus.sdt is set to 1. The specification states that if the Smnrmi extension is implemented, then the hart enters a critical-error state and generate a crit

[RFC PATCH 1/3] target/riscv: change RISCV_EXCP_SEMIHOST exception number

2024-04-18 Thread Clément Léger
The double trap specification defines the double trap exception number to be 16 which is actually used by the internal semihosting one. Change it to some other value. Signed-off-by: Clément Léger --- target/riscv/cpu_bits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targ

[RFC PATCH 2/3] target/riscv: add Ssdbltrp extension support

2024-04-18 Thread Clément Léger
The Ssdbltrp extension allows handling trap when being in non-reentrant state (mainly during exception handling) for S-mode [1]. This patch add support for this extension as an experimental extension. Link: https://github.com/riscv/riscv-double-trap/releases/download/v0.56/riscv-double-trap.pdf

[RFC PATCH 0/3] target/riscv: Add support for Smdbltrp and Ssdbltrp extensions

2024-04-18 Thread Clément Léger
A double trap typically arises during a sensitive phase in trap handling operations — when an exception or interrupt occurs while the trap handler (the component responsible for managing these events) is in a non-reentrant state. This non-reentrancy usually occurs in the early phase of trap handlin

Re: [RFC PATCH v2 05/13] hw/arm/smmu-common: Support nested translation

2024-04-18 Thread Eric Auger
Hi Mostafa, On 4/8/24 16:08, Mostafa Saleh wrote: > When nested translation is requested, do the following: > > - Translate stage-1 IPA using stage-2 to a physical address. > - Translate stage-1 PTW walks using stage-2. > - Combine both to create a single TLB entry, for that we choose > the smal

Re: [PATCH 1/2] libvhost-user: Fix pointer arithmetic in indirect read

2024-04-18 Thread Daniel P . Berrangé
On Sat, Jan 13, 2024 at 04:27:40AM +0300, Temir Zharaspayev wrote: > When zero-copy usage of indirect descriptors buffer table isn't > possible, library gather scattered memory chunks in a local copy. > This commit fixes the issue with pointer arithmetic for the local copy > buffer. > > Signed-off

Re: [PATCH 0/2] Fix pointer arithmetic in indirect read for libvhost-user and libvduse

2024-04-18 Thread Daniel P . Berrangé
Adding Michael back to the CC, since he's the designated maintainer for libvhost-user/ Michael, could you give these patches a review since they've been pending for many months now. On Sun, Feb 04, 2024 at 12:41:31PM +0300, Тимур wrote: > Hello, I am very sorry for bothering community on a such m

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Fabiano Rosas
Vladimir Sementsov-Ogievskiy writes: > We do set MIGRATION_FAILED state, but don't give a chance to > orchestrator to query migration state and get the error. > > Let's report an error through QAPI like we do on outgoing migration. > > migration-test is updated correspondingly. > > Signed-off-by:

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Daniel P . Berrangé
On Thu, Apr 18, 2024 at 01:13:29AM +0300, Vladimir Sementsov-Ogievskiy wrote: > We do set MIGRATION_FAILED state, but don't give a chance to > orchestrator to query migration state and get the error. > > Let's report an error through QAPI like we do on outgoing migration. > > migration-test is up

Re: [RFC PATCH v2 06/13] hw/arm/smmu: Support nesting in smmuv3_range_inval()

2024-04-18 Thread Eric Auger
Hi Mostafa, On 4/8/24 16:08, Mostafa Saleh wrote: > With nesting, we would need to invalidate IPAs without > over-invalidating stage-1 IOVAs. This can be done by > distinguishing IPAs in the TLBs by having ASID=-1. > To achieve that, rework the invalidation for IPAs to have a > separate function,

Re: [RFC PATCH v2 07/13] hw/arm/smmu: Support nesting in the rest of commands

2024-04-18 Thread Eric Auger
Hi Mostafa, On 4/8/24 16:08, Mostafa Saleh wrote: > Some commands need rework for nesting, as they used to assume S1 > and S2 are mutually exclusive: > > - CMD_TLBI_NH_ASID: Consider VMID if stage-2 is supported > - CMD_TLBI_NH_ALL: Consider VMID if stage-2 is supported, otherwise > invalidate e

Re: [PATCH] tcg: Fix the overflow in indexing tcg_ctx->temps

2024-04-18 Thread Richard Henderson
On 4/18/24 03:27, Zhiwei Jiang wrote: Sometimes, when the address of the passed TCGTemp *ts variable is the same as tcg_ctx, Pardon? When would TCGTemp *ts == TCGContext *tcg_ctx? the index calculated in the temp_idx function, i.e., ts - tcg_ctx->temps, can result in a particularly large v

[PATCH 0/5] target/arm: Update emulation.rst, add some easy features

2024-04-18 Thread Peter Maydell
As of version DDI0487K.a of the Arm ARM, some architectural features which previously didn't have official names have been named. Mostly these are features which we thought of as part of baseline 8.0 support. For SVE and SVE2, the names have been brought into line with the FEAT_* naming convention

[PATCH 1/5] docs/system/arm/emulation.rst: Add missing implemented features

2024-04-18 Thread Peter Maydell
As of version DDI0487K.a of the Arm ARM, some architectural features which previously didn't have official names have been named. Add these to the list of features which QEMU's TCG emulation supports. Mostly these are features which we thought of as part of baseline 8.0 support. For SVE and SVE2,

[PATCH 4/5] target/arm: Implement ID_AA64MMFR3_EL1

2024-04-18 Thread Peter Maydell
Newer versions of the Arm ARM (e.g. rev K.a) now define fields for ID_AA64MMFR3_EL1. Implement this register, so that we can set the fields if we need to. There's no behaviour change here since we don't currently set the register value to non-zero. Signed-off-by: Peter Maydell --- target/arm/

[PATCH 3/5] target/arm: Enable FEAT_ETS2 for -cpu max

2024-04-18 Thread Peter Maydell
FEAT_ETS2 is a tighter set of guarantees about memory ordering involving translation table walks than the old FEAT_ETS; FEAT_ETS has been retired from the Arm ARM and the old ID_AA64MMFR1.ETS == 1 now gives no greater guarantees than ETS == 0. FEAT_ETS2 requires: * the virtual address of a load o

[PATCH 5/5] target/arm: Enable FEAT_Spec_FPACC for -cpu max

2024-04-18 Thread Peter Maydell
FEAT_Spec_FPACC is a feature describing speculative behaviour in the event of a PAC authontication failure when FEAT_FPACCOMBINE is implemented. FEAT_Spec_FPACC means that the speculative use of pointers processed by a PAC Authentication is not materially different in terms of the impact on cached

Re: [PATCH v7 07/10] virtio-gpu: Handle resource blob commands

2024-04-18 Thread Dmitry Osipenko
On 4/15/24 13:05, Akihiko Odaki wrote: ... >> Do you have example of a legit use-case where hostmem MR could outlive >> resource mapping? > > MR outliving after memory_region_del_subregion() is not a use-case, but > a situation that occurs due to the limitation of the memory subsystem. > It is not

[PATCH 2/5] target/arm: Enable FEAT_CSV2_3 for -cpu max

2024-04-18 Thread Peter Maydell
FEAT_CSV2_3 adds a mechanism to identify if hardware cannot disclose information about whether branch targets and branch history trained in one hardware described context can control speculative execution in a different hardware context. There is no branch prediction in TCG, so we don't need to do

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Vladimir Sementsov-Ogievskiy
On 18.04.24 17:27, Fabiano Rosas wrote: Vladimir Sementsov-Ogievskiy writes: We do set MIGRATION_FAILED state, but don't give a chance to orchestrator to query migration state and get the error. Let's report an error through QAPI like we do on outgoing migration. migration-test is updated co

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Vladimir Sementsov-Ogievskiy
On 18.04.24 17:37, Daniel P. Berrangé wrote: On Thu, Apr 18, 2024 at 01:13:29AM +0300, Vladimir Sementsov-Ogievskiy wrote: We do set MIGRATION_FAILED state, but don't give a chance to orchestrator to query migration state and get the error. Let's report an error through QAPI like we do on outgo

Re: [PATCH] vhost-user-test: no set non-blocking for cal fd less than 0.

2024-04-18 Thread Michael S. Tsirkin
On Thu, Apr 11, 2024 at 03:35:55PM +0800, Yuxue Liu yuxue@jaguarmicro.com wrote: > From: Yuxue Liu > > In the scenario where vhost-user sets eventfd to -1, > qemu_chr_fe_get_msgfds retrieves fd as -1. When vhost_user_read > receives, it does not perform blocking operations on the descriptor

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Daniel P . Berrangé
On Thu, Apr 18, 2024 at 06:40:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 18.04.24 17:37, Daniel P. Berrangé wrote: > > On Thu, Apr 18, 2024 at 01:13:29AM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > We do set MIGRATION_FAILED state, but don't give a chance to > > > orchestrator t

Re: hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT

2024-04-18 Thread Michael Tokarev
06.02.2024 10:13, Cord Amfmgm wrote: This changes the ohci validation to not assert if invalid data is fed to the ohci controller. The poc suggested in https://bugs.launchpad.net/qemu/+bug/1907042 and then migrated to bug #303 does the following to feed it a SETUP pid and EndPt of 1: ui

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Vladimir Sementsov-Ogievskiy
On 18.04.24 18:43, Daniel P. Berrangé wrote: On Thu, Apr 18, 2024 at 06:40:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 18.04.24 17:37, Daniel P. Berrangé wrote: On Thu, Apr 18, 2024 at 01:13:29AM +0300, Vladimir Sementsov-Ogievskiy wrote: We do set MIGRATION_FAILED state, but don't give

[PATCH 2/2] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix

2024-04-18 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented in the Coding Style: If you do use template header fil

[PATCH 1/2] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc

2024-04-18 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented in the Coding Style: If you do use template header fil

[PATCH 0/2] include: Rename some expanded headers using '.h.inc' suffix

2024-04-18 Thread Philippe Mathieu-Daudé
Per our Coding Style: If you do use template header files they should be named with the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are being included for expansion. Rename elf_ops.h and host/load-extract/store-insert headers. Philippe Mathieu-Daudé (2): hw/elf_ops: Rename elf_

Re: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-04-18 Thread Cédric Le Goater
Hello Jamin, On 4/16/24 11:18, Jamin Lin wrote: AST2700 support the maximum dram size is 8GiB and has a "DMA DRAM Side Address High Part(0x7C)" register to support 64 bits dma dram address. Add helper routines functions to compute the dma dram address, new features and update trace-event to supp

Re: [PATCH 2/5] target/arm: Enable FEAT_CSV2_3 for -cpu max

2024-04-18 Thread Philippe Mathieu-Daudé
On 18/4/24 17:20, Peter Maydell wrote: FEAT_CSV2_3 adds a mechanism to identify if hardware cannot disclose information about whether branch targets and branch history trained in one hardware described context can control speculative execution in a different hardware context. There is no branch

Re: [PATCH v3 09/16] aspeed/smc: Add AST2700 support

2024-04-18 Thread Cédric Le Goater
On 4/16/24 11:18, Jamin Lin wrote: AST2700 fmc/spi controller's address decoding unit is 64KB and only bits [31:16] are used for decoding. Introduce seg_to_reg and reg_to_seg handlers for ast2700 fmc/spi controller. In addition, adds ast2700 fmc, spi0, spi1, and spi2 class init handler. Signed-o

Re: [PATCH 5/5] target/arm: Enable FEAT_Spec_FPACC for -cpu max

2024-04-18 Thread Philippe Mathieu-Daudé
On 18/4/24 17:20, Peter Maydell wrote: FEAT_Spec_FPACC is a feature describing speculative behaviour in the event of a PAC authontication failure when FEAT_FPACCOMBINE is implemented. FEAT_Spec_FPACC means that the speculative use of pointers processed by a PAC Authentication is not materially d

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

2024-04-18 Thread Daniel P . Berrangé
On Thu, Apr 11, 2024 at 02:14:34PM +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.). > > T

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Peter Xu
On Thu, Apr 18, 2024 at 06:47:31PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 18.04.24 18:43, Daniel P. Berrangé wrote: > > On Thu, Apr 18, 2024 at 06:40:38PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > On 18.04.24 17:37, Daniel P. Berrangé wrote: > > > > On Thu, Apr 18, 2024 at 01:1

Re: [PATCH] migration: do not exit on incoming failure

2024-04-18 Thread Daniel P . Berrangé
On Thu, Apr 18, 2024 at 12:43:42PM -0400, Peter Xu wrote: > On Thu, Apr 18, 2024 at 06:47:31PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > On 18.04.24 18:43, Daniel P. Berrangé wrote: > > > On Thu, Apr 18, 2024 at 06:40:38PM +0300, Vladimir Sementsov-Ogievskiy > > > wrote: > > > > On 18.04.24 1

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

2024-04-18 Thread Anthony Harivel
Hi Daniel, Daniel P. Berrangé, Apr 18, 2024 at 18:42: > On Thu, Apr 11, 2024 at 02:14:34PM +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 o

Re: Deprecation/removal of nios2 target support

2024-04-18 Thread Sandra Loosemore
On 4/18/24 10:06, Jeff Law wrote: ACK.  Just one more note to the wider audience.  I looked at QEMU's user mode support for nios2 on/off over the last couple years.  It never seemed to work well enough be able to run the GCC testsuite reliably. I looked at the problems with the nios2 user-mo

Re: Deprecation/removal of nios2 target support

2024-04-18 Thread Joel Sherrill
On Thu, Apr 18, 2024 at 10:46 AM Joseph Myers wrote: > On Wed, 17 Apr 2024, Sandra Loosemore wrote: > > > Therefore I'd like to mark Nios II as obsolete in GCC 14 now, and remove > > support from all toolchain components after the release is made. I'm > not sure > > there is an established proce

Re: Deprecation/removal of nios2 target support

2024-04-18 Thread Jeff Law
On 4/18/24 9:57 AM, Joel Sherrill wrote: On Thu, Apr 18, 2024 at 10:46 AM Joseph Myers > wrote: On Wed, 17 Apr 2024, Sandra Loosemore wrote: > Therefore I'd like to mark Nios II as obsolete in GCC 14 now, and remove > support from all toolchai

Re: Deprecation/removal of nios2 target support

2024-04-18 Thread Joseph Myers
On Wed, 17 Apr 2024, Sandra Loosemore wrote: > Therefore I'd like to mark Nios II as obsolete in GCC 14 now, and remove > support from all toolchain components after the release is made. I'm not sure > there is an established process for obsoleting/removing support in other > components; besides

Re: [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-18 Thread Jonathan Cameron via
On Thu, 18 Apr 2024 09:15:55 +0100 Jonathan Cameron via wrote: > On Wed, 17 Apr 2024 13:07:35 -0700 > Richard Henderson wrote: > > > On 4/16/24 08:11, Jonathan Cameron wrote: > > > On Fri, 1 Mar 2024 10:41:09 -1000 > > > Richard Henderson wrote: > > > > > >> If translation is disabled,

[Stable-8.2.3 090/116] target/sh4: mac.w: memory accesses are 16-bit words

2024-04-18 Thread Michael Tokarev
From: Zack Buhman Before this change, executing a code sequence such as: mova tblm,r0 movr0,r1 mova tbln,r0 clrs clrmac mac.w @r0+,@r1+ mac.w @r0+,@r1+ .align 4 tblm:.word 0x1234

[Stable-8.2.3 092/116] target/sh4: Fix mac.l with saturation enabled

2024-04-18 Thread Michael Tokarev
From: Zack Buhman The saturation arithmetic logic in helper_macl is not correct. I tested and verified this behavior on a SH7091. Signed-off-by: Zack Buhman Message-Id: <20240404162641.27528-2-z...@buhman.org> [rth: Reformat helper_macl, add a test case.] Signed-off-by: Richard Henderson Revie

[Stable-8.2.3 091/116] target/sh4: Merge mach and macl into a union

2024-04-18 Thread Michael Tokarev
From: Richard Henderson Allow host access to the entire 64-bit accumulator. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit 7d95db5e78a24d3315e3112d26909a7262355cb7) Signed-off-by: Michael Tokarev diff --git a/target/sh4/cpu.h b/target/sh4/cpu.

[Stable-8.2.3 094/116] target/sh4: add missing CHECK_NOT_DELAY_SLOT

2024-04-18 Thread Michael Tokarev
From: Zack Buhman CHECK_NOT_DELAY_SLOT is correctly applied to the branch-related instructions, but not to the PC-relative mov* instructions. I verified the existence of an illegal slot exception on a SH7091 when any of these instructions are attempted inside a delay slot. This also matches the

[Stable-8.2.3 095/116] target/m68k: Map FPU exceptions to FPSR register

2024-04-18 Thread Michael Tokarev
From: Keith Packard Add helpers for reading/writing the 68881 FPSR register so that changes in floating point exception state can be seen by the application. Call these helpers in pre_load/post_load hooks to synchronize exception state. Signed-off-by: Keith Packard Reviewed-by: Richard Henders

[Stable-8.2.3 096/116] hw/virtio: Introduce virtio_bh_new_guarded() helper

2024-04-18 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Introduce virtio_bh_new_guarded(), similar to qemu_bh_new_guarded() but using the transport memory guard, instead of the device one (there can only be one virtio device per virtio bus). Inspired-by: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Acked-by: Michael S. Tsir

[Stable-8.2.3 102/116] hw/block/nand: Have blk_load() take unsigned offset and return boolean

2024-04-18 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Negative offset is meaningless, use unsigned type. Return a boolean value indicating success. Reviewed-by: Richard Henderson Reviewed-by: Kevin Wolf Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240409135944.24997-3-phi...@linaro.org> (cherry picked from co

[Stable-8.2.3 098/116] hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs

2024-04-18 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Replace qemu_bh_new_guarded() by virtio_bh_new_guarded() so the bus and device use the same guard. Otherwise the DMA-reentrancy protection can be bypassed. Fixes: CVE-2024-3446 Cc: qemu-sta...@nongnu.org Suggested-by: Alexander Bulekov Reviewed-by: Gerd Hoffmann Ac

[Stable-8.2.3 107/116] hw/net/lan9118: Fix overflow in MIL TX FIFO

2024-04-18 Thread Michael Tokarev
From: Philippe Mathieu-Daudé When the MAC Interface Layer (MIL) transmit FIFO is full, truncate the packet, and raise the Transmitter Error (TXE) flag. Broken since model introduction in commit 2a42499017 ("LAN9118 emulation"). When using the reproducer from https://gitlab.com/qemu-project/qemu

[Stable-8.2.3 105/116] backends/cryptodev: Do not abort for invalid session ID

2024-04-18 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Instead of aborting when a session ID is invalid, return VIRTIO_CRYPTO_INVSESS ("Invalid session id"). Reproduced using: $ cat << EOF | qemu-system-i386 -display none \ -machine q35,accel=qtest -m 512M -nodefaults \ -object cryptodev-backend-builtin,id=c

[Stable-8.2.3 103/116] hw/block/nand: Fix out-of-bound access in NAND block buffer

2024-04-18 Thread Michael Tokarev
From: Philippe Mathieu-Daudé nand_command() and nand_getio() don't check @offset points into the block, nor the available data length (s->iolen) is not negative. In order to fix: - check the offset is in range in nand_blk_load_NAND_PAGE_SIZE(), - do not set @iolen if blk_load() failed. Reprodu

  1   2   3   >