[PATCH 2/5] MAINTAINERS: Add RISC-V IOMMU maintainers

2023-07-19 Thread Tomasz Jeznach
Signed-off-by: Tomasz Jeznach --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 43bd9afc19..ed8f65d879 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1971,6 +1971,12 @@ F: include/hw/i2c/ppc4xx_i2c.h F: hw/intc/ppc-uic.c F: include/hw/intc

[PATCH 3/5] exec/memtxattr: add process identifier to the transaction attributes

2023-07-19 Thread Tomasz Jeznach
Extend memory transaction attributes with process identifier to allow per-request address translation logic to use requester_id / process_id to identify memory mapping (e.g. enabling IOMMU w/ PASID translations). Signed-off-by: Tomasz Jeznach --- include/exec/memattrs.h | 6 ++ 1 file change

[PATCH 5/5] hw/riscv: virt: support for RISC-V IOMMU platform device.

2023-07-19 Thread Tomasz Jeznach
Adding virt machine property 'iommu' to enable/disable IOMMU support, with platform RISC-V IOMMU device implementation. Generate device tree entry for riscv-iommu device, along with mapping all PCI device identifiers to the single IOMMU device instance. Signed-off-by: Tomasz Jeznach --- hw/risc

[PATCH 4/5] hw/riscv: IOMMU: use process identifier from transaction attributes.

2023-07-19 Thread Tomasz Jeznach
Use iommu index as process identifier, linking transaction memory attributes with translation request. Signed-off-by: Tomasz Jeznach --- hw/riscv/riscv-iommu.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index fd

[PATCH 1/5] hw/riscv: Introduction of RISC-V IOMMU device

2023-07-19 Thread Tomasz Jeznach
The RISC-V IOMMU specification is now ratified as-per the RISC-V international process [1]. The latest frozen specifcation can be found at: https://github.com/riscv-non-isa/riscv-iommu/releases/download/v1.0/riscv-iommu.pdf The patch add device emulation for RISC-V IOMMU which supports device and

[PATCH 0/5] QEMU RISC-V IOMMU Support

2023-07-19 Thread Tomasz Jeznach
, use Linux v6.5-rc2 with RISC-V IOMMU implementation available in the riscv_iommu_v1 branch at: https://github.com/tjeznach/linux/tree/riscv_iommu_v1 References: [1] - https://wiki.riscv.org/display/HOME/Specification+Status [2] - https://github.com/tjeznach/qemu/tree/tjeznach/riscv-iommu-202

Re: [RFC 1/1] virtio-pci: add SR-IOV capability

2023-07-19 Thread Jason Wang
On Wed, Jul 19, 2023 at 9:59 AM Yui Washizu wrote: > > This enables SR-IOV emulation on virtio-pci devices by adding SR-IOV > capability > It also introduces a newly added property 'sriov_max_vfs' > to enable or disable the SR-IOV feature on the virtio-pci device in guest, > as well as to specify

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

2023-07-19 Thread Jason Wang
On Wed, Jul 19, 2023 at 9:59 AM Yui Washizu wrote: > > This patch series is the first step towards enabling > hardware offloading of the L2 packet switching feature on virtio-net device > to host machine. > We are considering that this hardware offloading enables > the use of high-performance net

Re: Reducing vdpa migration downtime because of memory pin / maps

2023-07-19 Thread Si-Wei Liu
On 7/19/2023 3:40 AM, Eugenio Perez Martin wrote: On Mon, Jul 17, 2023 at 9:57 PM Si-Wei Liu wrote: Hey, I am now back from the break. Sorry for the delayed response, please see in line. On 7/9/2023 11:04 PM, Eugenio Perez Martin wrote: On Sat, Jul 8, 2023 at 11:14 AM Si-Wei Liu wrote:

Re: [RFC 1/1] virtio-pci: add SR-IOV capability

2023-07-19 Thread Akihiko Odaki
On 2023/07/19 10:56, Yui Washizu wrote: This enables SR-IOV emulation on virtio-pci devices by adding SR-IOV capability It also introduces a newly added property 'sriov_max_vfs' to enable or disable the SR-IOV feature on the virtio-pci device in guest, as well as to specify the maximum number of

Re: [PATCH 4/4] virtio-net: Added uso check

2023-07-19 Thread Akihiko Odaki
Placing this patch after "[PATCH 3/4] virtio-net: added USO support" may interfer with "git bisect" on a host that does not support USO as virtio-net can advertise USO support where it's not supported. I suggest to combine this patch with the earlier patch aforementioned. It will make the enti

Re: [PATCH 3/4] virtio-net: added USO support

2023-07-19 Thread Akihiko Odaki
On 2023/07/20 0:21, Yuri Benditovich wrote: virtio-net can suggest USO features TX, RX v4 and RX v6, depending on kernel TUN ability to support them. These features require explicit enable in command-line. Shouldn't we enable these by default as the other offload features are? Signed-off-by:

Re: [PATCH 1/4] tap: Added USO support to tap device.

2023-07-19 Thread Akihiko Odaki
Nitpicking: the subject of this patch is somewhat unconventional. What about: "tap: Add USO support to tap device"? On 2023/07/20 0:21, Yuri Benditovich wrote: From: Andrew Melnychenko Passing additional parameters (USOv4 and USOv6 offloads) when setting TAP offloads Signed-off-by: Yuri Bend

Re: [PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-19 Thread Lei Yang
On Wed, Jul 19, 2023 at 11:25 PM Hawkins Jiawei wrote: > > 在 2023/7/19 20:44, Lei Yang 写道: > > Hello Hawkins and Michael > > > > Looks like there are big changes about vp_vdpa, therefore, if needed, > > QE can test this series in QE's environment before the patch is > > Hi Lei, > > This patch seri

[PATCH v3 09/14] tests/tcg/s390x: Test CLGEBR and CGEBRA

2023-07-19 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 5 + tests/tcg/s390x/cgebra.c| 32 tests/tcg/s390x/clgebr.c| 32 3 files c

[PATCH v3 07/14] target/s390x: Fix assertion failure in VFMIN/VFMAX with type 13

2023-07-19 Thread Ilya Leoshkevich
Type 13 is reserved, so using it should result in specification exception. Due to an off-by-1 error the code triggers an assertion at a later point in time instead. Cc: qemu-sta...@nongnu.org Fixes: da4807527f3b ("s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)") Reviewed-by: David Hildenbrand S

[PATCH v3 12/14] tests/tcg/s390x: Test MC

2023-07-19 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/mc.S| 56 + 2 files changed, 57 insertions(+) create mode 100644 tests/tcg/s390x/mc.S

[PATCH v3 00/14] target/s390x: Miscellaneous TCG fixes, part 2

2023-07-19 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg03762.html v2 -> v3: Document the new constraint set (Philippe). Fix clang build (Thomas). Add T-bs. v1: https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg03648.html v1 -> v2: Move the case in 04/14 (David).

[PATCH v3 06/14] tcg/{i386, s390x}: Add earlyclobber to the op_add2's first output

2023-07-19 Thread Ilya Leoshkevich
i386 and s390x implementations of op_add2 require an earlyclobber, which is currently missing. This breaks VCKSM in s390x guests. E.g., on x86_64 the following op: add2_i32 tmp2,tmp3,tmp2,tmp3,tmp3,tmp2 dead: 0 2 3 4 5 pref=none,0x is translated to: addl %ebx, %r12d adcl

[PATCH v3 10/14] tests/tcg/s390x: Test CLM

2023-07-19 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/clm.S | 29 + 2 files changed, 30 insertions(+) create mode 100644 tests/tcg/s390x/clm.S

[PATCH v3 08/14] tests/tcg/s390x: Test CKSM

2023-07-19 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/cksm.S | 29 + 2 files changed, 30 insertions(+) create mode 100644 tests/tcg/s390x/cksm.S diff --git a/tests/tc

[PATCH v3 04/14] target/s390x: Fix ICM with M3=0

2023-07-19 Thread Ilya Leoshkevich
When the mask is zero, access exceptions should still be recognized for 1 byte at the second-operand address. CC should be set to 0. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich --- target

[PATCH v3 14/14] tests/tcg/s390x: Test VCKSM

2023-07-19 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/vcksm.c | 31 +++ tests/tcg/s390x/vx.h| 2 ++ 3 files changed, 34 insertions(+) create mo

[PATCH v3 11/14] tests/tcg/s390x: Test ICM

2023-07-19 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/icm.S | 32 + 2 files changed, 33 insertions(+) create mode 100644 tests/tcg/s390x/icm.S

[PATCH v3 13/14] tests/tcg/s390x: Test STPQ

2023-07-19 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/stpq.S | 20 2 files changed, 21 insertions(+) create mode 100644 tests/tcg/s390x/stpq.S di

[PATCH v3 02/14] target/s390x: Fix CLM with M3=0

2023-07-19 Thread Ilya Leoshkevich
When the mask is zero, access exceptions should still be recognized for 1 byte at the second-operand address. CC should be set to 0. Reviewed-by: David Hildenbrand Cc: qemu-sta...@nongnu.org Fixes: defb0e3157af ("s390x: Implement opcode helpers") Signed-off-by: Ilya Leoshkevich --- target/s390x

[PATCH v3 05/14] target/s390x: Make MC raise specification exception when class >= 16

2023-07-19 Thread Ilya Leoshkevich
MC requires bit positions 8-11 (upper 4 bits of class) to be zeros, otherwise it must raise a specification exception. Cc: qemu-sta...@nongnu.org Fixes: 20d143e2cab8 ("s390x/tcg: Implement MONITOR CALL") Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/excp_he

[PATCH v3 03/14] target/s390x: Fix CONVERT TO LOGICAL/FIXED with out-of-range inputs

2023-07-19 Thread Ilya Leoshkevich
CONVERT TO LOGICAL/FIXED deviate from IEEE 754 in that they raise an inexact exception on out-of-range inputs. float_flag_invalid_cvti aligns nicely with that behavior, so convert it to S390_IEEE_MASK_INEXACT. Cc: qemu-sta...@nongnu.org Fixes: defb0e3157af ("s390x: Implement opcode helpers") Revie

[PATCH v3 01/14] target/s390x: Make CKSM raise an exception if R2 is odd

2023-07-19 Thread Ilya Leoshkevich
R2 designates an even-odd register pair; the instruction should raise a specification exception when R2 is not even. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/trans

Re: [PULL 10/66] tests/qtest: enable tests for virtio-scmi

2023-07-19 Thread Fabiano Rosas
Thomas Huth writes: > On 18/07/2023 14.55, Milan Zamazal wrote: >> Thomas Huth writes: >> >>> On 11/07/2023 01.02, Michael S. Tsirkin wrote: From: Milan Zamazal We don't have a virtio-scmi implementation in QEMU and only support >>> a vhost-user backend. This is very simil

Re: [PATCH v5 6/6] tests/qtest: migration-test: Add tests for file-based migration

2023-07-19 Thread Peter Xu
On Wed, Jul 12, 2023 at 04:07:42PM -0300, Fabiano Rosas wrote: > Add basic tests for file-based migration. > > Note that we cannot use test_precopy_common because that routine > expects it to be possible to run the migration live. With the file > transport there is no live migration because we mus

[PULL 10/14] nbd/server: Refactor to pass full request around

2023-07-19 Thread Eric Blake
Part of NBD's 64-bit headers extension involves passing the client's requested offset back as part of the reply header (one reason it stated for this change: converting absolute offsets stored in NBD_REPLY_TYPE_OFFSET_DATA to relative offsets within the buffer is easier if the absolute offset of th

[PULL 06/14] qemu-nbd: make verbose bool and local variable in main()

2023-07-19 Thread Eric Blake
From: "Denis V. Lunev" Pass 'verbose' to nbd_client_thread() inside NbdClientOpts which looks a little bit cleaner and make it bool as it is used as bool actually. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230717202520.236999-1-...@openvz.org

[PULL 03/14] qemu-nbd: properly report error if qemu_daemon() is failed

2023-07-19 Thread Eric Blake
From: "Denis V. Lunev" errno has been overwritten by dup2() just below qemu_daemon() and thus improperly returned to the caller. Fix accordingly. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230717145544.194786-5-...@openvz.org> Reviewed-by: Eri

Re: [Libguestfs] [PATCH v4 09/24] nbd: Replace bool structured_reply with mode enum

2023-07-19 Thread Eric Blake
On Mon, Jun 12, 2023 at 02:24:52PM -0500, Eric Blake wrote: > On Mon, Jun 12, 2023 at 06:07:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > On 08.06.23 16:56, Eric Blake wrote: > > > The upcoming patches for 64-bit extensions requires various points in > > > the protocol to make decisions based

[PULL 13/14] nbd/client: Add safety check on chunk payload length

2023-07-19 Thread Eric Blake
Our existing use of structured replies either reads into a qiov capped at 32M (NBD_CMD_READ) or caps allocation to 1000 bytes (see NBD_MAX_MALLOC_PAYLOAD in block/nbd.c). But the existing length checks are rather late; if we encounter a buggy (or malicious) server that sends a super-large payload

Re: [PULL 1/1] hw/nvme: fix endianness issue for shadow doorbells

2023-07-19 Thread Michael Tokarev
19.07.2023 10:36, Klaus Jensen wrote: pu(req->cmd.dptr.prp2); +uint32_t v; if (sq) { +v = cpu_to_le32(sq->tail); -pci_dma_write(pci, sq->db_addr, &sq->tail, sizeof(sq->tail)); +pci_dma_write(pci, sq->db_addr, &v, sizeof(sq->tail)); This an

[PULL 09/14] nbd/server: Prepare for alternate-size headers

2023-07-19 Thread Eric Blake
Upstream NBD now documents[1] an extension that supports 64-bit effect lengths in requests. As part of that extension, the size of the reply headers will change in order to permit a 64-bit length in the reply for symmetry[2]. Additionally, where the reply header is currently 16 bytes for simple r

[PULL 08/14] nbd: Consistent typedef usage in header

2023-07-19 Thread Eric Blake
We had a mix of struct declarations followed by typedefs, and direct struct definitions as part of a typedef. Pick a single style. Also float forward declarations of opaque types to the top of the file, rather than interspersed with function declarations, which will help a future patch that wants

[PULL 05/14] qemu-nbd: handle dup2() error when qemu-nbd finished setup process

2023-07-19 Thread Eric Blake
From: "Denis V. Lunev" Fail on error, we are in trouble. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230717145544.194786-6-...@openvz.org> Reviewed-by: Eric Blake [eblake: avoid intermediate variable] Signed-off-by: Eric Blake --- qemu-nbd.c

[PULL 12/14] nbd/client: Simplify cookie vs. index computation

2023-07-19 Thread Eric Blake
Our code relies on a sentinel cookie value of zero for deciding when a packet has been handled, as well as relying on array indices between 0 and MAX_NBD_REQUESTS-1 for dereferencing purposes. As long as we can symmetrically convert between two forms, there is no reason to go with the odd choice o

[PULL 11/14] nbd: s/handle/cookie/ to match NBD spec

2023-07-19 Thread Eric Blake
Externally, libnbd exposed the 64-bit opaque marker for each client NBD packet as the "cookie", because it was less confusing when contrasted with 'struct nbd_handle *' holding all libnbd state. It also avoids confusion between the noun 'handle' as a way to identify a packet and the verb 'handle'

[PULL 07/14] nbd/client: Use smarter assert

2023-07-19 Thread Eric Blake
Assigning strlen() to a uint32_t and then asserting that it isn't too large doesn't catch the case of an input string 4G in length. Thankfully, the incoming strings can never be that large: if the export name or query is reflecting a string the client got from the server, we already guarantee that

[PULL 04/14] qemu-nbd: properly report error on error in dup2() after qemu_daemon()

2023-07-19 Thread Eric Blake
From: "Denis V. Lunev" We are trying to temporarily redirect stderr of daemonized process to a pipe to report a error and get failed. In that case we could not use error_report() helper, but should write the message directly into the problematic pipe. Signed-off-by: Denis V. Lunev CC: Eric Blak

[PULL 14/14] nbd: Use enum for various negotiation modes

2023-07-19 Thread Eric Blake
Deciphering the hard-coded list of integer return values from nbd_start_negotiate() will only get more confusing when adding support for 64-bit extended headers. Better is to name things in an enum. Although the function in question is private to client.c, putting the enum in a public header and i

[PULL 02/14] qemu-nbd: fix regression with qemu-nbd --fork run over ssh

2023-07-19 Thread Eric Blake
From: "Denis V. Lunev" Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d Author: Hanna Reitz Date: Wed May 8 23:18:18 2019 +0200 qemu-nbd: Do not close stderr has introduced an interesting regression. Original behavior of ssh somehost qemu-nbd /home/den/tmp/file -f raw --fork wa

[PULL 00/14] NBD patches for 2023-07-19

2023-07-19 Thread Eric Blake
The following changes since commit 2c27fdc7a626408ee2cf30d791aa0b63027c7404: Update version for v8.1.0-rc0 release (2023-07-19 20:31:43 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2023-07-19 for you to fetch changes up to bfe04d0a7d5e8a4f4c

[PULL 01/14] qemu-nbd: pass structure into nbd_client_thread instead of plain char*

2023-07-19 Thread Eric Blake
From: "Denis V. Lunev" We are going to pass additional flag inside next patch. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy CC: Message-ID: <20230717145544.194786-2-...@openvz.org> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- qemu-nbd.c | 19 +

Re: [PULL 10/66] tests/qtest: enable tests for virtio-scmi

2023-07-19 Thread Milan Zamazal
Thomas Huth writes: > On 18/07/2023 14.55, Milan Zamazal wrote: >> Thomas Huth writes: >> > >>> On 11/07/2023 01.02, Michael S. Tsirkin wrote: From: Milan Zamazal We don't have a virtio-scmi implementation in QEMU and only support >>> a vhost-user backend. This is very sim

Re: [PULL 0/1] hw/nvme fixes

2023-07-19 Thread Peter Maydell
On Wed, 19 Jul 2023 at 08:36, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi, > > The following changes since commit 361d5397355276e3007825cc17217c1e4d4320f7: > > Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into > staging (2023-07-17 15:49:27 +0100) > > are available

Re: [PULL 0/5] riscv-to-apply queue

2023-07-19 Thread Peter Maydell
ilable in the Git repository at: > > https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-20230719-1 > > for you to fetch changes up to 32be32509987fbe42cf5c2fd3cea3c2ad6eae179: > > target/riscv: Fix

Re: [RFC PATCH 10/17] misc/i2c_mctp_cxl: Initial device emulation

2023-07-19 Thread Gregory Price
On Wed, Jul 19, 2023 at 09:19:47AM +0100, Jonathan Cameron wrote: > On Tue, 18 Jul 2023 17:30:57 -0400 > Gregory Price wrote: > > > On Mon, Jul 17, 2023 at 06:16:39PM +0100, Jonathan Cameron wrote: > > > @@ -397,8 +401,9 @@ struct CXLType3Dev { > > > AddressSpace hostpmem_as; > > > CXLC

[RFC] cxl/type3: minimum MHD cci support

2023-07-19 Thread Gregory Price
Implement the MHD GET_INFO cci command and add a shared memory region to the type3 device to host the information. Add a helper program to initialize this shared memory region. For now, limit the number of LD's to the number of heads. Later, this limitation will need to be lifted for MH-MLDs. In

[PATCH for-8.1] hw/nvme: fix compliance issue wrt. iosqes/iocqes

2023-07-19 Thread Klaus Jensen
From: Klaus Jensen As of prior to this patch, the controller checks the value of CC.IOCQES and CC.IOSQES prior to enabling the controller. As reported by Ben in GitLab issue #1691, this is not spec compliant. The controller should only check these values when queues are created. This patch moves

[PATCH] roms/opensbi: Upgrade from v1.3 to v1.3.1

2023-07-19 Thread Bin Meng
Upgrade OpenSBI from v1.3 to v1.3.1 and the pre-built bios images which fixes the boot failure seen when using QEMU to do a direct kernel boot with Microchip Icicle Kit board machine. The v1.3.1 release includes the following commits: 0907de3 lib: sbi: fix comment indent eb736a5 lib: sbi_pmu: Avo

Re: [PATCH v2 1/4] vhost-user.rst: Migrating back-end-internal state

2023-07-19 Thread Hanna Czenczek
On 18.07.23 17:57, Stefan Hajnoczi wrote: On Wed, Jul 12, 2023 at 01:16:59PM +0200, Hanna Czenczek wrote: For vhost-user devices, qemu can migrate the virtio state, but not the back-end's internal state. To do so, we need to be able to transfer this internal state between front-end (qemu) and b

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Bin Meng
Hi Anup, On Thu, Jul 20, 2023 at 12:10 AM Anup Patel wrote: > > Hi Bin, > > On Wed, Jul 19, 2023 at 9:15 PM Bin Meng wrote: > > > > On Wed, Jul 19, 2023 at 11:22 PM Anup Patel wrote: > > > > > > On Wed, Jul 19, 2023 at 3:23 PM Alistair Francis > > > wrote: > > > > > > > > On Wed, Jul 19, 2023

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Andreas Schwab
On Jul 19 2023, Bin Meng wrote: >> Please check >> https://github.com/riscv-software-src/opensbi/releases/tag/v1.3.1 >> >> I hope this helps. > > Hi Alistair, > > Do we need to update QEMU's opensbi binaries to v1.3.1? > > Hi Anup, > > Somehow I cannot see the 'tag' v1.3.1 being populated in the o

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Anup Patel
Hi Bin, On Wed, Jul 19, 2023 at 9:15 PM Bin Meng wrote: > > On Wed, Jul 19, 2023 at 11:22 PM Anup Patel wrote: > > > > On Wed, Jul 19, 2023 at 3:23 PM Alistair Francis > > wrote: > > > > > > On Wed, Jul 19, 2023 at 3:39 PM Anup Patel wrote: > > > > > > > > On Wed, Jul 19, 2023 at 7:03 AM Alis

[PATCH 0/5] target/arm: Fixes for RME

2023-07-19 Thread Jean-Philippe Brucker
With these patches I'm able to boot a Realm guest under "-cpu max,x-rme=on". They are based on Peter's series which fixes handling of NSTable: https://lore.kernel.org/qemu-devel/20230714154648.327466-1-peter.mayd...@linaro.org/ Running a Realm guest requires components at EL3 and R-EL2. Some roug

[PATCH 4/5] target/arm: Pass security space rather than flag for AT instructions

2023-07-19 Thread Jean-Philippe Brucker
At the moment we only handle Secure and Nonsecure security spaces for the AT instructions. Add support for Realm and Root. For AArch64, arm_security_space() gives the desired space. ARM DDI0487J says (R_NYXTL): If EL3 is implemented, then when an address translation instruction that applies t

[PATCH 5/5] target/arm/helper: Implement CNTHCTL_EL2.CNT[VP]MASK

2023-07-19 Thread Jean-Philippe Brucker
When FEAT_RME is implemented, these bits override the value of CNT[VP]_CTL_EL0.IMASK in Realm and Root state. Signed-off-by: Jean-Philippe Brucker --- target/arm/helper.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/h

[PATCH 2/5] target/arm/helper: Fix vae2_tlbmask()

2023-07-19 Thread Jean-Philippe Brucker
When HCR_EL2.E2H is enabled, TLB entries are formed using the EL2&0 translation regime, instead of the EL2 translation regime. The TLB VAE2* instructions invalidate the regime that corresponds to the current value of HCR_EL2.E2H. At the moment we only invalidate the EL2 translation regime. This ca

[PATCH 3/5] target/arm: Skip granule protection checks for AT instructions

2023-07-19 Thread Jean-Philippe Brucker
GPC checks are not performed on the output address for AT instructions, as stated by ARM DDI 0487J in D8.12.2: When populating PAR_EL1 with the result of an address translation instruction, granule protection checks are not performed on the final output address of a successful translation.

[PATCH 1/5] target/arm/ptw: Load stage-2 tables from realm physical space

2023-07-19 Thread Jean-Philippe Brucker
In realm state, stage-2 translation tables are fetched from the realm physical address space (R_PGRQD). Signed-off-by: Jean-Philippe Brucker --- target/arm/ptw.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index d1de934702..6318e13

[PULL 5/5] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-19 Thread Helge Deller
qemu-user crashes immediately when running static binaries on the armhf architecture. The problem is the memory layout where the executable is loaded before the interpreter library, in which case the reserved brk region clashes with the interpreter code and is released before qemu tries to start th

[PULL 2/5] linux-user: Prohibit brk() to to shrink below initial heap address

2023-07-19 Thread Helge Deller
Since commit 86f04735ac ("linux-user: Fix brk() to release pages") it's possible for userspace applications to reduce their memory footprint by calling brk() with a lower address and free up memory. Before that commit guest heap memory was never unmapped. But the Linux kernel prohibits to reduce b

[PULL 0/5] Linux user brk fixes patches

2023-07-19 Thread Helge Deller
The following changes since commit 361d5397355276e3007825cc17217c1e4d4320f7: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-07-17 15:49:27 +0100) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git tags/linux-user-brk-fixe

[PULL 4/5] linux-user: Fix strace output for old_mmap

2023-07-19 Thread Helge Deller
The old_mmap syscall (e.g. on i386) hands over the parameters in a struct. Adjust the strace output to print the correct values. Signed-off-by: Helge Deller Reported-by: John Reiser Closes: https://gitlab.com/qemu-project/qemu/-/issues/1760 --- linux-user/strace.c | 49 +

[PULL 3/5] linux-user: Fix signed math overflow in brk() syscall

2023-07-19 Thread Helge Deller
Fix the math overflow when calculating the new_malloc_size. new_host_brk_page and brk_page are unsigned integers. If userspace reduces the heap, new_host_brk_page is lower than brk_page which results in a huge positive number (but should actually be negative). Fix it by adding a proper check and

[PULL 1/5] linux-user: Fix qemu brk() to not zero bytes on current page

2023-07-19 Thread Helge Deller
The qemu brk() implementation is too aggressive and cleans remaining bytes on the current page above the last brk address. But some existing applications are buggy and read/write bytes above their current heap address. On a phyiscal machine this does not trigger a runtime error as long as the acce

Re: [PATCH for-8.1] tests/test-util-filemonitor: Avoid pointless allocations

2023-07-19 Thread Philippe Mathieu-Daudé
On 19/7/23 17:39, Daniel P. Berrangé wrote: On Wed, Jul 19, 2023 at 05:01:03PM +0200, Philippe Mathieu-Daudé wrote: Coverity reports few resource leaks. While they are harmless, fix them to avoid them showing on the reports. Reported-by: Coverity (CID 1432615: RESOURCE_LEAK) Fixes: 4f370b1098 (

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Bin Meng
On Wed, Jul 19, 2023 at 11:22 PM Anup Patel wrote: > > On Wed, Jul 19, 2023 at 3:23 PM Alistair Francis wrote: > > > > On Wed, Jul 19, 2023 at 3:39 PM Anup Patel wrote: > > > > > > On Wed, Jul 19, 2023 at 7:03 AM Alistair Francis > > > wrote: > > > > > > > > On Sat, Jul 15, 2023 at 7:14 PM Ati

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-19 Thread Pierre Morel
On 7/19/23 16:13, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-19 at 16:08 +0200, Pierre Morel wrote: On 7/14/23 18:30, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-12 at 22:11 +0200, Thomas Huth wrote: On 12/07/2023 21.37, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-05 at 12:22 +020

Re: [PATCH for-8.1] tests/test-util-filemonitor: Avoid pointless allocations

2023-07-19 Thread Daniel P . Berrangé
On Wed, Jul 19, 2023 at 05:01:03PM +0200, Philippe Mathieu-Daudé wrote: > Coverity reports few resource leaks. While they are > harmless, fix them to avoid them showing on the reports. > > Reported-by: Coverity (CID 1432615: RESOURCE_LEAK) > Fixes: 4f370b1098 ("test-util-filemonitor: Skip test on

Re: [PATCH v21 00/20] s390x: CPU Topology

2023-07-19 Thread Pierre Morel
On 7/5/23 12:02, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: ... Testing === To use the QEMU patches, you will need Linux V6-rc1 or newer, or use the following Linux mainline patches: f5ecfee94493 2022-07-20 KVM: s390: resetting the Topology-Change-Report 24fe0195bc19 202

Re: [PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-19 Thread Hawkins Jiawei
在 2023/7/19 20:44, Lei Yang 写道: > Hello Hawkins and Michael > > Looks like there are big changes about vp_vdpa, therefore, if needed, > QE can test this series in QE's environment before the patch is Hi Lei, This patch series does not modify the code of vp_vdpa. Instead, it only modifies how QEMU

[PATCH 2/4] virtio-net: Added USO flags to vhost support.

2023-07-19 Thread Yuri Benditovich
From: Andrew Melnychenko New features are subject to check with vhost-user and vdpa. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 3 +++ net/vhost-vdpa.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_n

[PATCH 1/4] tap: Added USO support to tap device.

2023-07-19 Thread Yuri Benditovich
From: Andrew Melnychenko Passing additional parameters (USOv4 and USOv6 offloads) when setting TAP offloads Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/e1000e_core.c | 2 +- hw/net/igb_core.c| 2 +- hw/net/virtio-net.c | 4 +++- hw/net/vmxnet3.c |

[PATCH 0/4] virtio-net: add USO feature (UDP segmentation offload)

2023-07-19 Thread Yuri Benditovich
Starting from 6.2 the kernel supports UDP segmentation offload, the kernel uses GSO_UDP_L4 to mark packets with USB sermentation request Andrew Melnychenko (3): tap: Added USO support to tap device. virtio-net: Added USO flags to vhost support. virtio-net: Added uso check Yuri Benditovich

[PATCH 4/4] virtio-net: Added uso check

2023-07-19 Thread Yuri Benditovich
From: Andrew Melnychenko Added tap uso check with stubs for non-Linux systems. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c | 15 +++ include/net/net.h | 3 +++ net/net.c | 9 + net/tap-bsd.c | 5 + net/

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Anup Patel
On Wed, Jul 19, 2023 at 3:23 PM Alistair Francis wrote: > > On Wed, Jul 19, 2023 at 3:39 PM Anup Patel wrote: > > > > On Wed, Jul 19, 2023 at 7:03 AM Alistair Francis > > wrote: > > > > > > On Sat, Jul 15, 2023 at 7:14 PM Atish Patra wrote: > > > > > > > > On Fri, Jul 14, 2023 at 5:29 AM Conor

[PATCH 3/4] virtio-net: added USO support

2023-07-19 Thread Yuri Benditovich
virtio-net can suggest USO features TX, RX v4 and RX v6, depending on kernel TUN ability to support them. These features require explicit enable in command-line. Signed-off-by: Yuri Benditovich --- hw/net/virtio-net.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff

Re: [PATCH v8 3/9] migration: convert socket backend to accept MigrateAddress

2023-07-19 Thread Daniel P . Berrangé
On Thu, Jul 13, 2023 at 10:57:07AM +, Het Gala wrote: > Socket transport backend for 'migrate'/'migrate-incoming' QAPIs accept > new wire protocol of MigrateAddress struct. > > It is achived by parsing 'uri' string and storing migration parameters > required for socket connection into well def

Re: [PATCH v3 0/8] vdpa: Send all CVQ state load commands in parallel

2023-07-19 Thread Hawkins Jiawei
在 2023/7/19 20:46, Michael S. Tsirkin 写道: > On Wed, Jul 19, 2023 at 08:35:50PM +0800, Hawkins Jiawei wrote: >> 在 2023/7/19 17:11, Michael S. Tsirkin 写道: >>> On Wed, Jul 19, 2023 at 03:53:45PM +0800, Hawkins Jiawei wrote: This patchset allows QEMU to delay polling and checking the device u

Re: [PATCH 5/6] vhost-vdpa: Match vhost-user's status reset

2023-07-19 Thread Stefan Hajnoczi
On Wed, 19 Jul 2023 at 10:10, Hanna Czenczek wrote: > > On 18.07.23 16:50, Stefan Hajnoczi wrote: > > On Tue, Jul 11, 2023 at 05:52:27PM +0200, Hanna Czenczek wrote: > >> vhost-vdpa and vhost-user differ in how they reset the status in their > >> respective vhost_reset_status implementations: vhos

Re: [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1

2023-07-19 Thread Philippe Mathieu-Daudé
On 19/7/23 14:40, Peter Maydell wrote: On Tue, 18 Jul 2023 at 10:31, Thomas Huth wrote: The following changes since commit 361d5397355276e3007825cc17217c1e4d4320f7: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-07-17 15:49:27 +0100) are available i

[PATCH for-8.1] tests/test-util-filemonitor: Avoid pointless allocations

2023-07-19 Thread Philippe Mathieu-Daudé
Coverity reports few resource leaks. While they are harmless, fix them to avoid them showing on the reports. Reported-by: Coverity (CID 1432615: RESOURCE_LEAK) Fixes: 4f370b1098 ("test-util-filemonitor: Skip test on non-x86 Travis containers") Signed-off-by: Philippe Mathieu-Daudé --- tests/uni

Re: [PATCH v2 14/14] tests/tcg/s390x: Test VCKSM

2023-07-19 Thread Thomas Huth
On 19/07/2023 11.44, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/vcksm.c | 31 +++ tests/tcg/s390x/vx.h| 2 ++ 3 files changed,

Re: [PATCH v2 13/14] tests/tcg/s390x: Test STPQ

2023-07-19 Thread Thomas Huth
On 19/07/2023 11.44, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/stpq.S | 20 2 files changed, 21 insertions(+) create mode 100644

Re: [PATCH v2 12/14] tests/tcg/s390x: Test MC

2023-07-19 Thread Thomas Huth
On 19/07/2023 11.44, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/mc.S| 56 + 2 files changed, 57 insertions(+) create mode 1

Re: [PATCH v2 11/14] tests/tcg/s390x: Test ICM

2023-07-19 Thread Thomas Huth
On 19/07/2023 11.44, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/icm.S | 32 + 2 files changed, 33 insertions(+) create mode 1

Re: [PATCH v2 10/14] tests/tcg/s390x: Test CLM

2023-07-19 Thread Thomas Huth
On 19/07/2023 11.44, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/clm.S | 29 + 2 files changed, 30 insertions(+) create mode 1

Re: [PATCH v2 09/14] tests/tcg/s390x: Test CLGEBR and CGEBRA

2023-07-19 Thread Thomas Huth
On 19/07/2023 11.44, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 5 + tests/tcg/s390x/cgebra.c| 32 tests/tcg/s390x/clgebr.c| 32 +

Re: [PATCH 6/6] vhost-user: Have reset_status fall back to reset

2023-07-19 Thread Hanna Czenczek
On 19.07.23 16:11, Hanna Czenczek wrote: On 18.07.23 17:10, Stefan Hajnoczi wrote: On Tue, Jul 11, 2023 at 05:52:28PM +0200, Hanna Czenczek wrote: The only user of vhost_user_reset_status() is vhost_dev_stop(), which only uses it as a fall-back to stop the back-end if it does not support SUSPEN

Re: [PATCH v21 20/20] tests/avocado: s390x cpu topology bad move

2023-07-19 Thread Pierre Morel
On 7/5/23 12:32, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QEMU refuses to move a CPU to an unexistant location. s/unexistant/nonexistent/ ? Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 25 +   1 file c

Re: [PATCH v2 08/14] tests/tcg/s390x: Test CKSM

2023-07-19 Thread Ilya Leoshkevich
On Wed, 2023-07-19 at 16:20 +0200, Thomas Huth wrote: > On 19/07/2023 11.44, Ilya Leoshkevich wrote: > > Add a small test to prevent regressions. > > > > Signed-off-by: Ilya Leoshkevich > > --- > >   tests/tcg/s390x/Makefile.softmmu-target |  1 + > >   tests/tcg/s390x/cksm.S  | 29

Re: [PATCH v21 19/20] tests/avocado: s390x cpu topology dedicated errors

2023-07-19 Thread Pierre Morel
On 7/5/23 12:28, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 48 ++   1 file changed, 48 ins

Re: [PATCH v21 18/20] tests/avocado: s390x cpu topology test socket full

2023-07-19 Thread Pierre Morel
On 7/5/23 12:26, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 25 +   1 file changed, 25 insertions(+)

Re: [PATCH v2 08/14] tests/tcg/s390x: Test CKSM

2023-07-19 Thread Thomas Huth
On 19/07/2023 11.44, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/cksm.S | 29 + 2 files changed, 30 insertions(+) create mode 1

  1   2   3   >