Re: [PATCH 4/4] i386/cpu: Add support for EPYC-Turin model

2024-06-13 Thread Zhao Liu
On Wed, Jun 12, 2024 at 02:12:20PM -0500, Babu Moger wrote: > Date: Wed, 12 Jun 2024 14:12:20 -0500 > From: Babu Moger > Subject: [PATCH 4/4] i386/cpu: Add support for EPYC-Turin model > X-Mailer: git-send-email 2.34.1 > > Adds the support for AMD EPYC zen 5 processors(EPYC-Turin). nit s/Adds/Ad

[PATCH v6 09/10] hw/nvme: add reservation protocal command

2024-06-13 Thread Changqi Lu
Add reservation acquire, reservation register, reservation release and reservation report commands in the nvme device layer. By introducing these commands, this enables the nvme device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservati

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

2024-06-13 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. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/ctrl.c | 3 ++- hw/nvme/ns.c

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

2024-06-13 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: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/nvme.h | 80 +++

[PATCH v6 01/10] block: add persistent reservation in/out api

2024-06-13 Thread Changqi Lu
Add persistent reservation in/out operations at the block level. The following operations are included: - read_keys:retrieves the list of registered keys. - read_reservation: retrieves the current reservation status. - register: registers a new reservation key. - reserve:

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

2024-06-13 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 v6 05/10] hw/scsi: add persistent reservation in/out api for scsi device

2024-06-13 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 v6 00/10] Support persistent reservation operations

2024-06-13 Thread Changqi Lu
Hi, patch v6 has been modified. v5->v6: - Add relevant comments in the io layer. v4->v5: - Fixed a memory leak bug at hw/nvme/ctrl.c. v3->v4: - At the nvme layer, the two patches of enabling the ONCS function and enabling rescap are combined into one. - At the nvme layer, add helper functions

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

2024-06-13 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: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 11:27:04PM +0200, Paolo Bonzini wrote: > Il mer 12 giu 2024, 22:58 Manos Pitsidianakis < > manos.pitsidiana...@linaro.org> ha scritto: > > > In any case, it is out of scope for this RFC. Introducing wrappers would > > be a gradual process. > > > > Sure, how would you feel

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

2024-06-13 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 --- include/scsi/utils.h | 8 + scsi/utils.c | 81 +++

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

2024-06-13 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. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/block/nvme.h | 61

[PATCH v6 02/10] block/raw: add persistent reservation in/out driver

2024-06-13 Thread Changqi Lu
Add persistent reservation in/out operations for raw 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: zhe

Re: [PATCH 21/32] hw/sd: Add mmc switch function support

2024-06-13 Thread Cédric Le Goater
On 6/13/24 12:49 AM, Philippe Mathieu-Daudé wrote: On 3/7/23 15:24, Cédric Le Goater wrote: From: Sai Pavan Boddu switch operation in mmc cards, updated the ext_csd register to request changes in card operations. Here we implement similar sequence but requests are mostly dummy and make no chan

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Paolo Bonzini
Il gio 13 giu 2024, 09:13 Daniel P. Berrangé ha scritto: > On Wed, Jun 12, 2024 at 11:27:04PM +0200, Paolo Bonzini wrote: > > Il mer 12 giu 2024, 22:58 Manos Pitsidianakis < > > manos.pitsidiana...@linaro.org> ha scritto: > > > > > In any case, it is out of scope for this RFC. Introducing wrapper

Re: [RFC PATCH v2 0/5] Implement ARM PL011 in Rust

2024-06-13 Thread Daniel P . Berrangé
On Thu, Jun 13, 2024 at 08:13:01AM +0300, Manos Pitsidianakis wrote: > Good morning Daniel, > > On Wed, 12 Jun 2024 11:37, "Daniel P. Berrangé" wrote: > > On Tue, Jun 11, 2024 at 01:33:29PM +0300, Manos Pitsidianakis wrote: > > > > > > > > .gitignore | 2 + > > > .gitlab-

Re: [PATCH v4 5/5] iotests: add backup-discard-source

2024-06-13 Thread Kevin Wolf
Am 12.06.2024 um 21:21 hat Vladimir Sementsov-Ogievskiy geschrieben: > On 11.06.24 20:49, Kevin Wolf wrote: > > Am 13.03.2024 um 16:28 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Add test for a new backup option: discard-source. > > > > > > Signed-off-by: Vladimir Sementsov-Ogievskiy > >

[PATCH v1 3/3] util/readline.c: add C-u shortcut

2024-06-13 Thread Manos Pitsidianakis
Add support for the unix-line-discard readline action, which erases from the cursor position up to the beginning of the line. The default binding, C-u, was chosen. This is useful to quickly erase command input while working on the monitor interface. Signed-off-by: Manos Pitsidianakis --- util/r

[PATCH v1 1/3] util/readline.c:fix lints for readline_handle_byte

2024-06-13 Thread Manos Pitsidianakis
While they do not give warnings under our current buildsystem configuration, my clang's language server daemon was complaining about missing default: labels in switch statements. While at it, add /* fallthrough */ annotations where appropriate. This is a purely style and not functional change. S

[PATCH v1 0/3] util/readline.c: Add common but missing shortcuts

2024-06-13 Thread Manos Pitsidianakis
Some commonly used readline shortcuts are missing from our implementation. This series adds: - Control-n next line, same as Down arrow key - Control-p previous line, same as Up arrow key - Control-u erase line starting from cursor Manos Pitsidianakis (3): util/readline.c:fix lints for readline

[PATCH v1 2/3] util/readline.c: add C-n, C-p shortcuts

2024-06-13 Thread Manos Pitsidianakis
C-n and C-p are the default bindings for readline's next-history and previous-history respectively. They have the same functionality as the Down and Up arrow keys. Signed-off-by: Manos Pitsidianakis --- util/readline.c | 8 1 file changed, 8 insertions(+) diff --git a/util/readline.c b

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Zhao Liu
On Tue, Jun 11, 2024 at 01:33:32PM +0300, Manos Pitsidianakis wrote: > Date: Tue, 11 Jun 2024 13:33:32 +0300 > From: Manos Pitsidianakis > Subject: [RFC PATCH v2 3/5] rust: add PL011 device model > X-Mailer: git-send-email 2.44.0 > > This commit adds a re-implementation of hw/char/pl011.c in Rust

Re: [RFC v2 2/7] virtio-iommu: Implement set|unset]_iommu_device() callbacks

2024-06-13 Thread Eric Auger
Hi Zhenzhong, On 6/11/24 04:38, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Subject: [RFC v2 2/7] virtio-iommu: Implement set|unset]_iommu_device() >> callbacks >> >> Implement PCIIOMMUOPs [set|unset]_iommu_device() callbacks. >> In set(), a VirtioHost

Re: [RFC v2 3/7] HostIOMMUDevice: Introduce get_iova_ranges callback

2024-06-13 Thread Eric Auger
Hi, On 6/11/24 05:24, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: [RFC v2 3/7] HostIOMMUDevice: Introduce get_iova_ranges >> callback >> >> Introduce a new HostIOMMUDevice callback that allows to >> retrieve the usable IOVA ranges. >> >> Implement this c

Re: [PATCH v3 2/4] usb/hub: mark as deprecated

2024-06-13 Thread Markus Armbruster
Alex Bennée writes: > Daniel P. Berrangé writes: > >> On Thu, Jun 06, 2024 at 04:30:08PM +0200, Gerd Hoffmann wrote: >>> The hub supports only USB 1.1. When running out of usb ports it is in >>> almost all cases the much better choice to add another usb host adapter >>> (or increase the number

Re: [PATCH 21/32] hw/sd: Add mmc switch function support

2024-06-13 Thread Philippe Mathieu-Daudé
On 13/6/24 09:44, Cédric Le Goater wrote: On 6/13/24 12:49 AM, Philippe Mathieu-Daudé wrote: On 3/7/23 15:24, Cédric Le Goater wrote: From: Sai Pavan Boddu switch operation in mmc cards, updated the ext_csd register to request changes in card operations. Here we implement similar sequence but

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Manos Pitsidianakis
Hello Zhao :) On Thu, 13 Jun 2024 11:30, Zhao Liu wrote: On Tue, Jun 11, 2024 at 01:33:32PM +0300, Manos Pitsidianakis wrote: Date: Tue, 11 Jun 2024 13:33:32 +0300 From: Manos Pitsidianakis Subject: [RFC PATCH v2 3/5] rust: add PL011 device model X-Mailer: git-send-email 2.44.0 This commit a

Re: Sample 'qapi-schema-diff' output for v9.0.0 vs origin/master

2024-06-13 Thread Philippe Mathieu-Daudé
Hi John, On 12/6/24 20:40, John Snow wrote: Hiya, here's some draft output of a script I'm working on to summarize QMP wire format differences between QEMU versions. This script works in terms of the QMP *wire format*, not the QAPI *specification*. As a consequence, *almost* all type names ar

Re: [PATCH 9/9] contrib/plugins: add ips plugin example for cost modeling

2024-06-13 Thread Philippe Mathieu-Daudé
On 12/6/24 17:35, Alex Bennée wrote: From: Pierrick Bouvier This plugin uses the new time control interface to make decisions about the state of time during the emulation. The algorithm is currently very simple. The user specifies an ips rate which applies ... IPS rate (Instructions Per Secon

RE: [PATCH v5 17/65] i386/tdx: Adjust the supported CPUID based on TDX restrictions

2024-06-13 Thread Duan, Zhenzhong
>-Original Message- >From: Li, Xiaoyao >Subject: Re: [PATCH v5 17/65] i386/tdx: Adjust the supported CPUID based >on TDX restrictions > >On 5/31/2024 4:47 PM, Duan, Zhenzhong wrote: >> >> On 2/29/2024 2:36 PM, Xiaoyao Li wrote: >>> According to Chapter "CPUID Virtualization" in TDX modul

Re: [RFC v2 4/7] virtio-iommu: Compute host reserved regions

2024-06-13 Thread Eric Auger
Hi Zhenzhong, On 6/11/24 05:25, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: [RFC v2 4/7] virtio-iommu: Compute host reserved regions >> >> Compute the host reserved regions in virtio_iommu_set_iommu_device(). >> The usable IOVA regions are retrieved from

Re: Qemu License question

2024-06-13 Thread Thomas Huth
On 13/06/2024 07.22, Markus Armbruster wrote: Manos Pitsidianakis writes: On Thu, 13 Jun 2024 06:26, Peng Fan wrote: Hi All, The following files are marked as GPL-3.0-or-later. Will these Conflict with Qemu LICENSE? Should we update the files to GPL-2.0? ./tests/tcg/aarch64/semicall.h:7:

Re: [PATCH v3 2/4] usb/hub: mark as deprecated

2024-06-13 Thread Daniel P . Berrangé
On Thu, Jun 13, 2024 at 10:31:56AM +0200, Markus Armbruster wrote: > Alex Bennée writes: > > > Daniel P. Berrangé writes: > > > >> On Thu, Jun 06, 2024 at 04:30:08PM +0200, Gerd Hoffmann wrote: > >>> The hub supports only USB 1.1. When running out of usb ports it is in > >>> almost all cases th

RE: [PATCH v5 25/65] i386/tdx: Add property sept-ve-disable for tdx-guest object

2024-06-13 Thread Duan, Zhenzhong
>-Original Message- >From: Li, Xiaoyao >Subject: Re: [PATCH v5 25/65] i386/tdx: Add property sept-ve-disable for >tdx-guest object > >On 6/6/2024 6:45 PM, Daniel P. Berrangé wrote: >> Copying Zhenzhong Duan as my point relates to the proposed libvirt >> TDX patches. >> >> On Thu, Feb 29

Re: [PATCH v3 2/4] usb/hub: mark as deprecated

2024-06-13 Thread Daniel P . Berrangé
On Wed, Jun 12, 2024 at 04:52:50PM +0100, Alex Bennée wrote: > Daniel P. Berrangé writes: > > > On Thu, Jun 06, 2024 at 04:30:08PM +0200, Gerd Hoffmann wrote: > >> The hub supports only USB 1.1. When running out of usb ports it is in > >> almost all cases the much better choice to add another us

Re: Qemu License question

2024-06-13 Thread Daniel P . Berrangé
On Thu, Jun 13, 2024 at 10:31:50AM +0200, Thomas Huth wrote: > On 13/06/2024 07.22, Markus Armbruster wrote: > > Manos Pitsidianakis writes: > > > > > On Thu, 13 Jun 2024 06:26, Peng Fan wrote: > > > > Hi All, > > > > > > > > The following files are marked as GPL-3.0-or-later. Will these > > >

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Daniel P . Berrangé
On Thu, Jun 13, 2024 at 11:41:38AM +0300, Manos Pitsidianakis wrote: > > > diff --git a/rust/rustfmt.toml b/rust/rustfmt.toml > > > new file mode 100644 > > > index 00..ebecb99fe0 > > > --- /dev/null > > > +++ b/rust/rustfmt.toml > > > @@ -0,0 +1,7 @@ > > > +edition = "2021" > > > +format_g

Re: [PATCH 8/9] plugins: add time control API

2024-06-13 Thread Philippe Mathieu-Daudé
On 12/6/24 17:35, Alex Bennée wrote: Expose the ability to control time through the plugin API. Only one plugin can control time so it has to request control when loaded. There are probably more corner cases to catch here. From: Alex Bennée Some of your patches include this dubious From: head

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Manos Pitsidianakis
On Thu, 13 Jun 2024 10:56, Paolo Bonzini wrote: Il gio 13 giu 2024, 09:13 Daniel P. Berrangé ha scritto: On Wed, Jun 12, 2024 at 11:27:04PM +0200, Paolo Bonzini wrote: > Il mer 12 giu 2024, 22:58 Manos Pitsidianakis < > manos.pitsidiana...@linaro.org> ha scritto: > > > In any case, it is out

Re: [PATCH v3 0/2] meson: Remove libibumad dependence

2024-06-13 Thread Philippe Mathieu-Daudé
On 11/6/24 12:54, zhenwei pi wrote: v2 -> v3: - refresh lcitool after removing libibumad v1 -> v2: - remove libibumad from tests/lcitool/projects/qemu.yml v1: - remove libibumad dependence Zhenwei Pi (2): meson: Remove libibumad dependence test: Remove libibumad dependence Series queue

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Manos Pitsidianakis
On Thu, 13 Jun 2024 11:53, "Daniel P. Berrangé" wrote: On Thu, Jun 13, 2024 at 11:41:38AM +0300, Manos Pitsidianakis wrote: > > diff --git a/rust/rustfmt.toml b/rust/rustfmt.toml > > new file mode 100644 > > index 00..ebecb99fe0 > > --- /dev/null > > +++ b/rust/rustfmt.toml > > @@ -0,0

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Daniel P . Berrangé
On Thu, Jun 13, 2024 at 09:56:39AM +0200, Paolo Bonzini wrote: > Il gio 13 giu 2024, 09:13 Daniel P. Berrangé ha > scritto: > > > On Wed, Jun 12, 2024 at 11:27:04PM +0200, Paolo Bonzini wrote: > > > Il mer 12 giu 2024, 22:58 Manos Pitsidianakis < > > > manos.pitsidiana...@linaro.org> ha scritto:

RE: [PATCH v1 11/16] vfio/container: Change VFIOContainerBase to use QOM

2024-06-13 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Subject: [PATCH v1 11/16] vfio/container: Change VFIOContainerBase to use >QOM > >VFIOContainerBase was made a QOM interface because we believed that a >QOM object would expose all the IOMMU backends to the QEMU machine >and >human i

Re: [RFC PATCH v2 3/5] rust: add PL011 device model

2024-06-13 Thread Daniel P . Berrangé
On Thu, Jun 13, 2024 at 11:59:12AM +0300, Manos Pitsidianakis wrote: > On Thu, 13 Jun 2024 11:53, "Daniel P. Berrangé" wrote: > > On Thu, Jun 13, 2024 at 11:41:38AM +0300, Manos Pitsidianakis wrote: > > > > > diff --git a/rust/rustfmt.toml b/rust/rustfmt.toml > > > > > new file mode 100644 > > > >

[PATCH v3 0/7] VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling for hotplugged devices

2024-06-13 Thread Eric Auger
This series is based on Zhenzhong HostIOMMUDevice: [PATCH v7 00/17] Add a host IOMMU device abstraction to check with vIOMMU https://lore.kernel.org/all/20240605083043.317831-1-zhenzhong.d...@intel.com/ It allows to convey host IOVA reserved regions to the virtio-iommu and uses the HostIOMMUDevic

[PATCH v3 4/7] virtio-iommu: Compute host reserved regions

2024-06-13 Thread Eric Auger
Compute the host reserved regions in virtio_iommu_set_iommu_device(). The usable IOVA regions are retrieved from the HOSTIOMMUDevice. The virtio_iommu_set_host_iova_ranges() helper turns usable regions into complementary reserved regions while testing the inclusion into existing ones. virtio_iommu_

[PATCH v6 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-06-13 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 135 +++ qga/commands-win32.c | 6 ++ qga/qapi-schema.json | 71

[PATCH v3 1/7] HostIOMMUDevice: Store the VFIO/VDPA agent

2024-06-13 Thread Eric Auger
Store the agent device (VFIO or VDPA) in the host IOMMU device. This will allow easy access to some of its resources. Signed-off-by: Eric Auger Reviewed-by: Zhenzhong Duan --- include/sysemu/host_iommu_device.h | 1 + hw/vfio/container.c| 1 + hw/vfio/iommufd.c

[PATCH v3 7/7] memory: Remove IOMMU MR iommu_set_iova_range API

2024-06-13 Thread Eric Auger
Since the host IOVA ranges are now passed through the PCIIOMMUOps set_host_resv_regions and we have removed the only implementation of iommu_set_iova_range() in the virtio-iommu and the only call site in vfio/common, let's retire the IOMMU MR API and its memory wrapper. Signed-off-by: Eric Auger

[PATCH v3 6/7] hw/vfio: Remove memory_region_iommu_set_iova_ranges() call

2024-06-13 Thread Eric Auger
As we have just removed the only implementation of iommu_set_iova_ranges IOMMU MR callback in the virtio-iommu, let's remove the call to the memory wrapper. Usable IOVA ranges are now conveyed through the PCIIOMMUOps in VFIO-PCI. Signed-off-by: Eric Auger Reviewed-by: Zhenzhong Duan --- hw/vfio

[PATCH v3 5/7] virtio-iommu: Remove the implementation of iommu_set_iova_range

2024-06-13 Thread Eric Auger
Now that we use PCIIOMMUOps to convey information about usable IOVA ranges we do not to implement the iommu_set_iova_ranges IOMMU MR callback. Signed-off-by: Eric Auger Reviewed-by: Zhenzhong Duan --- hw/virtio/virtio-iommu.c | 67 1 file changed, 67 del

[PATCH v3 3/7] HostIOMMUDevice: Introduce get_iova_ranges callback

2024-06-13 Thread Eric Auger
Introduce a new HostIOMMUDevice callback that allows to retrieve the usable IOVA ranges. Implement this callback in the legacy VFIO and IOMMUFD VFIO host iommu devices. This relies on the VFIODevice agent's base container iova_ranges resource. Signed-off-by: Eric Auger --- v2 -> v3: - add g_as

[PATCH v3 2/7] virtio-iommu: Implement set|unset]_iommu_device() callbacks

2024-06-13 Thread Eric Auger
Implement PCIIOMMUOPs [set|unset]_iommu_device() callbacks. In set(), a VirtioHostIOMMUDevice is allocated which holds a reference to the HostIOMMUDevice. This object is stored in a hash table indexed by PCI BDF. The handle to the Host IOMMU device will allow to retrieve information related to the

Re: [PATCH v7 1/2] hw/misc/riscv_iopmp: Add RISC-V IOPMP device

2024-06-13 Thread LIU Zhiwei
Hi Ethan, On 2024/6/12 11:17, Ethan Chen wrote: Support basic functions of IOPMP specification v0.9.1 rapid-k model. The specification url: https://github.com/riscv-non-isa/iopmp-spec/releases/tag/v0.9.1 IOPMP check memory access from device is valid or not. This implementation uses IOMMU to ch

[PATCH v6 0/1] Support IPv6 route info

2024-06-13 Thread Dehan Meng
v5 -> v6 - Support IPv6 route info v4 -> v5 - Remove useless struct - Rename 'GuestNetworkRouteStat' to 'GuestNetworkRoute'. v3 -> v4 - Fix some indentation issues - Update 'Since 8.2' to 'Since 9.1' - Remove useless enum and adjust this change. v2 -> v3 - Remove this declaration and make the fu

[PATCH v2 2/4] target/ppc: Move VSX vector with length storage access insns to decodetree.

2024-06-13 Thread Chinmay Rath
Moving the following instructions to decodetree specification : {l, st}xvl(l) : X-form The changes were verified by validating that the tcg-ops generated by those instructions remain the same, which were captured using the '-d in_asm,op' flag. Also added a new function to calcu

[PATCH v2 3/4] target/ppc: Move VSX vector storage access insns to decodetree.

2024-06-13 Thread Chinmay Rath
Moving the following instructions to decodetree specification: lxv{b16, d2, h8, w4, ds, ws}x : X-form stxv{b16, d2, h8, w4}x : X-form The changes were verified by validating that the tcg-ops generated for those instructions remain the same, which were captured using the '-d in_asm,

[PATCH v2 1/4] target/ppc: Moving VSX scalar storage access insns to decodetree.

2024-06-13 Thread Chinmay Rath
Moving the following instructions to decodetree specification : lxs{d, iwa, ibz, ihz, iwz, sp}x : X-form stxs{d, ib, ih, iw, sp}x: X-form The changes were verified by validating that the tcg-ops generated by those instructions remain the same, which were ca

Re: [PATCH] cpu: fix memleak of 'halt_cond' and 'thread'

2024-06-13 Thread Philippe Mathieu-Daudé
On 12/6/24 19:04, Matheus Tavares Bernardino wrote: Since a4c2735f35 (cpu: move Qemu[Thread|Cond] setup into common code, 2024-05-30) these fields are now allocated at cpu_common_initfn(). So let's make sure we also free them at cpu_common_finalize(). Furthermore, the code also frees these on ro

[PATCH v2 0/4] Move VSX storage access and compare insns to

2024-06-13 Thread Chinmay Rath
Moving all remaining VSX storage access instructions and all VSX compare instructions of XX3 form with RC field, to decodetree specification. Change log : v2: - Addressed comments by Richard in v1 - Patch 2/4 : Handled proper ea calculation in narrow mode. Also created a new function fo

Re: [RFC PATCH 02/16] accel/tcg: memory access from CPU will pass access_type to IOMMU

2024-06-13 Thread Jim Shu
Hi Ethan, Yes, this mechanism could handle such situations. The important part is that the translate() function of IOMMUMemoryRegion only returns the correct permission of the section related to CPU access type. For example, if wgChecker only permits RO permission, it will return "downstream_as"

[RFC PATCH 0/2] Support RISC-V CSR read/write in Qtest environment

2024-06-13 Thread Ivan Klokov
These patches add functionality for unit testing RISC-V-specific registers. The first patch adds a Qtest backend, and the second implements a simple test. Ivan Klokov (2): Add RISC-V CSR qtest support QTest example for RISC-V CSR register target/riscv/cpu.c | 13 +++ target/r

[PATCH 2/2] QTest example for RISC-V CSR register

2024-06-13 Thread Ivan Klokov
Added demo for reading CSR register from qtest environment. Signed-off-by: Ivan Klokov --- tests/qtest/meson.build | 2 ++ tests/qtest/riscv-csr-test.c | 68 2 files changed, 70 insertions(+) create mode 100644 tests/qtest/riscv-csr-test.c diff --git

Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor

2024-06-13 Thread Philippe Mathieu-Daudé
On 10/6/24 10:19, Cédric Le Goater wrote: On 6/10/24 8:20 AM, Philippe Mathieu-Daudé wrote: Hi, This series remove uses of Monitor in hw/ppc/, replacing by the more generic HumanReadableText. Care is taken to keep the commit bisectables by updating functions one by one, also easing review. Di

Re: [RFC PATCH 27/34] accel/tcg: Make translate-all.c target independent

2024-06-13 Thread Anton Johansson via
On 24/01/24, Richard Henderson wrote: > On 1/20/24 00:40, Anton Johansson wrote: > > Makes translate-all.c independent of softmmu target by switching > > > > TARGET_LONG_BITS-> target_long_bits() > > > > TARGET_INSN_START_WORDS -> tcg_ctx->insn_start_words, > >

Re: [PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c

2024-06-13 Thread Thomas Huth
On 21/05/2024 12.31, Dmitry Frolov wrote: Found with fuzzing for qemu-8.2, but also relevant for master Signed-off-by: Dmitry Frolov --- tests/qtest/fuzz/qos_fuzz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index b71e945c5f.

Re: [PULL 39/42] i386: Add support for SUCCOR feature

2024-06-13 Thread Xiaoyao Li
On 6/8/2024 4:34 PM, Paolo Bonzini wrote: From: John Allen Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. v2: - Add "succor" feature word. - Add case to kvm_arch_get_s

Re: [PATCH 2/2] QTest example for RISC-V CSR register

2024-06-13 Thread Thomas Huth
On 13/06/2024 11.56, Ivan Klokov wrote: Added demo for reading CSR register from qtest environment. Signed-off-by: Ivan Klokov --- tests/qtest/meson.build | 2 ++ tests/qtest/riscv-csr-test.c | 68 2 files changed, 70 insertions(+) create mode 10

Re: [PATCH v3 2/4] usb/hub: mark as deprecated

2024-06-13 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Jun 13, 2024 at 10:31:56AM +0200, Markus Armbruster wrote: >> Alex Bennée writes: >> >> > Daniel P. Berrangé writes: >> > >> >> On Thu, Jun 06, 2024 at 04:30:08PM +0200, Gerd Hoffmann wrote: >> >>> The hub supports only USB 1.1. When running out of usb por

[PATCH] adding corss namespace copy support (tp-4130)

2024-06-13 Thread Arun Kumar
Signed-off-by: Arun Kumar --- hw/nvme/ctrl.c | 355 --- include/block/nvme.h | 37 +++-- 2 files changed, 289 insertions(+), 103 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 127c3d2383..c181caae38 100644 --- a/hw/nvme/ctrl.c +++ b

[PATCH v2 1/2] hw/s390x: Introduce s390_skeys_get|set() helpers

2024-06-13 Thread Philippe Mathieu-Daudé
s390_skeys_set() dispatch to S390SKeysClass::set_skeys(), and s390_skeys_get() to S390SKeysClass::get_skeys(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/s390x/storage-keys.h | 10 ++ hw/s390x/s390-skeys.c | 27 +++ hw/s390x/trace-events

[PATCH v2 2/2] target/s390x: Use s390_skeys_get|set() helper

2024-06-13 Thread Philippe Mathieu-Daudé
Commit c9274b6bf0 ("target/s390x: start moving TCG-only code to tcg/") moved mem_helper.c, but the trace-events file is still in the parent directory, so is the generated trace.h. Call the s390_skeys_get|set() helper, removing the need for the trace event shared with the tcg/ sub-directory Signed

[PATCH v2 0/2] target/s390x: Fix tracing header path in TCG mem_helper.c

2024-06-13 Thread Philippe Mathieu-Daudé
In order to keep trace event headers local to their directory, introduce s390_skeys_get/s390_skeys_set helpers, fixing: In file included from ../../target/s390x/tcg/mem_helper.c:33: ../../target/s390x/tcg/trace.h:1:10: fatal error: 'trace/trace-target_s390x_tcg.h' file not found #include "t

Re: [PATCH v3 2/4] usb/hub: mark as deprecated

2024-06-13 Thread Daniel P . Berrangé
On Thu, Jun 13, 2024 at 12:38:31PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Thu, Jun 13, 2024 at 10:31:56AM +0200, Markus Armbruster wrote: > >> Alex Bennée writes: > >> > >> > Daniel P. Berrangé writes: > >> > > >> >> On Thu, Jun 06, 2024 at 04:30:08PM +0200, Gerd

Re: [PATCH 0/3] plugins: Few debugging cleanups

2024-06-13 Thread Philippe Mathieu-Daudé
Ping? (series reviewed) On 6/6/24 14:40, Philippe Mathieu-Daudé wrote: - Assert cpu_index is assigned in INIT/EXIT hooks - Free cpu->plugin_state - Restrict qemu_plugin_vcpu_init__async() to plugins/ Philippe Mathieu-Daudé (3): plugins: Ensure vCPU index is assigned in init/exit hooks plu

Re: [PATCH v6 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-06-13 Thread Konstantin Kostiuk
CC: Daniel, Philippe On Thu, Jun 13, 2024 at 12:28 PM Dehan Meng wrote: > The Route information of the Linux VM needs to be used > by administrators and users when debugging network problems > and troubleshooting. > > Signed-off-by: Dehan Meng > --- > qga/commands-posix.c | 135 +++

RE: [PATCH v1 15/16] vfio/container: Remove vfio_container_init()

2024-06-13 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH v1 15/16] vfio/container: Remove vfio_container_init() > >It's now empty. > >Signed-off-by: Cédric Le Goater >--- > include/hw/vfio/vfio-container-base.h | 2 -- > hw/vfio/container-base.c | 5 - > hw/vfio/conta

RE: Qemu License question

2024-06-13 Thread Peng Fan
All, > Subject: Re: Qemu License question > > > IMHO this is largely a non-issue from a licensing compatibility POV, and thus > not neccessary for stable. > > This is self-contained test code that, IIUC, is not linking to the bits of > QEMU > that are GPLv-2-only, so is valid to have any license.

Re: [PATCH 08/20] qga: conditionalize schema for commands unsupported on Windows

2024-06-13 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 11:13:00AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > Rather than creating stubs for every command that just return > > QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to > > fully exclude generation of the commands on Windows. > > > > The

Re: [PATCH RESEND v7 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-13 Thread Stefano Garzarella
On Wed, Jun 12, 2024 at 03:20:48PM GMT, Markus Armbruster wrote: Stefano Garzarella writes: shm_open() creates and opens a new POSIX shared memory object. A POSIX shared memory object allows creating memory backend with an associated file descriptor that can be shared with external processes (

RE: [RFC v2 4/7] virtio-iommu: Compute host reserved regions

2024-06-13 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [RFC v2 4/7] virtio-iommu: Compute host reserved regions > >Hi Zhenzhong, > >On 6/11/24 05:25, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Eric Auger >>> Subject: [RFC v2 4/7] virtio-iommu: Compute host reserved

Re: [PATCH 08/20] qga: conditionalize schema for commands unsupported on Windows

2024-06-13 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 03:55:37PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > Rather than creating stubs for every command that just return > > QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to > > fully exclude generation of the commands on Windows. > > > > The

Re: [PATCH 18/20] qga: add note about where to disable commands for a platform

2024-06-13 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 09:49:46AM +0100, Daniel P. Berrangé wrote: > On Tue, Jun 11, 2024 at 10:08:20AM +0200, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > Any command that is known to be unimplemented on a given build target > > > must be disabled using a QAPI schema condit

Re: [PATCH 08/20] qga: conditionalize schema for commands unsupported on Windows

2024-06-13 Thread Konstantin Kostiuk
On Thu, Jun 13, 2024 at 2:43 PM Daniel P. Berrangé wrote: > On Tue, Jun 11, 2024 at 03:55:37PM +0200, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > Rather than creating stubs for every command that just return > > > QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to

Re: [PATCH] tests/qtest/fuzz/virtio_net_fuzz.c: fix virtio_net_fuzz_multi

2024-06-13 Thread Дмитрий Фролов
On 13.06.2024 13:08, Thomas Huth wrote: On 23/05/2024 12.28, Dmitry Frolov wrote: If QTestState was already CLOSED due to error, calling qtest_clock_step() afterwards makes no sense and only raises false-crash with message: "assertion timer != NULL failed". Signed-off-by: Dmitry Frolov ---

[PATCH v2 4/4] target/ppc: Move VSX fp compare insns to decodetree.

2024-06-13 Thread Chinmay Rath
Moving the following instructions to decodetree specification: xvcmp{eq, gt, ge, ne}{s, d}p: XX3-form The changes were verified by validating that the tcg-ops generated for those instructions remain the same which were captured using the '-d in_asm,op' flag. Signed-off-by: Chinmay Ra

[PATCH 1/2] Add RISC-V CSR qtest support

2024-06-13 Thread Ivan Klokov
The RISC-V architecture supports the creation of custom CSR-mapped devices. It would be convenient to test them in the same way as MMIO-mapped devices. To do this, a new call has been added to read/write CSR registers. Signed-off-by: Ivan Klokov --- target/riscv/cpu.c | 13 +

RE: [PATCH v3 2/7] virtio-iommu: Implement set|unset]_iommu_device() callbacks

2024-06-13 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH v3 2/7] virtio-iommu: Implement >set|unset]_iommu_device() callbacks > >Implement PCIIOMMUOPs [set|unset]_iommu_device() callbacks. >In set(), a VirtioHostIOMMUDevice is allocated which holds >a reference to the HostIOMMUDevice. Thi

Re: [PATCH v3 4/7] virtio-iommu: Compute host reserved regions

2024-06-13 Thread Eric Auger
On 6/13/24 12:00, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Subject: [PATCH v3 4/7] virtio-iommu: Compute host reserved regions >> >> Compute the host reserved regions in virtio_iommu_set_iommu_device(). >> The usable IOVA regions are retrieved fro

Re: [PATCH v1 11/16] vfio/container: Change VFIOContainerBase to use QOM

2024-06-13 Thread Cédric Le Goater
On 6/13/24 11:17 AM, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Subject: [PATCH v1 11/16] vfio/container: Change VFIOContainerBase to use QOM VFIOContainerBase was made a QOM interface because we believed that a QOM object would expose all the IOMMU ba

RE: [PATCH v3 4/7] virtio-iommu: Compute host reserved regions

2024-06-13 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: [PATCH v3 4/7] virtio-iommu: Compute host reserved regions > >Compute the host reserved regions in virtio_iommu_set_iommu_device(). >The usable IOVA regions are retrieved from the HOSTIOMMUDevice. >The virtio_iommu_set_host_iova_ran

RE: [PATCH v3 3/7] HostIOMMUDevice: Introduce get_iova_ranges callback

2024-06-13 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH v3 3/7] HostIOMMUDevice: Introduce get_iova_ranges >callback > >Introduce a new HostIOMMUDevice callback that allows to >retrieve the usable IOVA ranges. > >Implement this callback in the legacy VFIO and IOMMUFD VFIO >host iommu dev

Re: [PATCH] tests/qtest/fuzz/virtio_net_fuzz.c: fix virtio_net_fuzz_multi

2024-06-13 Thread Thomas Huth
On 23/05/2024 12.28, Dmitry Frolov wrote: If QTestState was already CLOSED due to error, calling qtest_clock_step() afterwards makes no sense and only raises false-crash with message: "assertion timer != NULL failed". Signed-off-by: Dmitry Frolov --- tests/qtest/fuzz/virtio_net_fuzz.c | 3 +++

Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor

2024-06-13 Thread Philippe Mathieu-Daudé
On 13/6/24 12:29, Cédric Le Goater wrote: On 6/13/24 11:48 AM, Philippe Mathieu-Daudé wrote: On 10/6/24 10:19, Cédric Le Goater wrote: On 6/10/24 8:20 AM, Philippe Mathieu-Daudé wrote: Hi, This series remove uses of Monitor in hw/ppc/, replacing by the more generic HumanReadableText. Care is

Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor

2024-06-13 Thread Cédric Le Goater
On 6/13/24 11:48 AM, Philippe Mathieu-Daudé wrote: On 10/6/24 10:19, Cédric Le Goater wrote: On 6/10/24 8:20 AM, Philippe Mathieu-Daudé wrote: Hi, This series remove uses of Monitor in hw/ppc/, replacing by the more generic HumanReadableText. Care is taken to keep the commit bisectables by upd

Re: [RFC PATCH 01/16] accel/tcg: Store section pointer in CPUTLBEntryFull

2024-06-13 Thread Jim Shu
Hi Zhiwei, Common IOMMU devices will not have IOMMUMemoryRegion in the path of CPU access since It only affects DMA access. In QEMU, it usually places this IOMMU MR as the parent of "system_memory", and changes the target_mr of DMA from "system_memory" to IOMMU MR. For the wgChecker, it is in fro

Re: [PATCH v2 8/9] target/arm: Add aarch64_tcg_ops

2024-06-13 Thread Alex Bennée
Richard Henderson writes: > On 6/12/24 07:36, Alex Bennée wrote: >> What happens when the CPU is running mixed mode code and jumping between >> 64 and 32 bit? Wouldn't it be easier to have a helper that routes to the >> correct unwinder, c.f. gen_intermediate_code > > GDB can't switch modes, so t

Re: [PATCH 00/26] hw/ppc: Prefer HumanReadableText over Monitor

2024-06-13 Thread Cédric Le Goater
On 6/10/24 8:20 AM, Philippe Mathieu-Daudé wrote: Hi, This series remove uses of Monitor in hw/ppc/, replacing by the more generic HumanReadableText. Care is taken to keep the commit bisectables by updating functions one by one, also easing review. For rationale see previous series from Daniel:

[PATCH v2] hw/net/virtio-net.c: fix crash in iov_copy()

2024-06-13 Thread Dmitry Frolov
A crash found while fuzzing device virtio-net-socket-check-used. Assertion "offset == 0" in iov_copy() fails if less than guest_hdr_len bytes were transmited. Signed-off-by: Dmitry Frolov --- v1: https://patchew.org/QEMU/20240527133140.218300-2-fro...@swemel.ru/ v2: replaced repeating code with g

Re: [PATCH v1 0/3] util/readline.c: Add common but missing shortcuts

2024-06-13 Thread Marc-André Lureau
Hi On Thu, Jun 13, 2024 at 12:07 PM Manos Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > Some commonly used readline shortcuts are missing from our > implementation. This series adds: > > - Control-n next line, same as Down arrow key > - Control-p previous line, same as Up arrow key > -

  1   2   3   >