Re: [PATCH] hw/net: e1000e: Clear ICR on read when using non MSI-X interrupts

2022-02-11 Thread Jason Wang
On Thu, Feb 10, 2022 at 4:10 PM Nick Hudson wrote: > > In section 7.4.3 of the 82574 datasheet it states that > > "In systems that do not support MSI-X, reading the ICR > register clears it's bits..." > > Some OSes rely on this. > > Signed-off-by: Nick Hudson > --- > hw/net/e1000e_core.

Re: [PATCH v4 12/15] hw/nvme: Initialize capability structures for primary/secondary controllers

2022-02-11 Thread Klaus Jensen
On Jan 26 18:11, Lukasz Maniak wrote: > From: Łukasz Gieryk > > With four new properties: > - sriov_v{i,q}_flexible, > - sriov_max_v{i,q}_per_vf, > one can configure the number of available flexible resources, as well as > the limits. The primary and secondary controller capability structures >

Re: [PATCH v4 10/15] hw/nvme: Remove reg_size variable and update BAR0 size calculation

2022-02-11 Thread Klaus Jensen
On Jan 26 18:11, Lukasz Maniak wrote: > From: Łukasz Gieryk > > The n->reg_size parameter unnecessarily splits the BAR0 size calculation > in two phases; removed to simplify the code. > > With all the calculations done in one place, it seems the pow2ceil, > applied originally to reg_size, is unn

Re: [PATCH v3 1/2] hvf: arm: Use macros for sysreg shift/masking

2022-02-11 Thread Cameron Esfahani
LGTM Reviewed-by: Cameron Esfahani mailto:di...@apple.com>> Cameron > On Feb 9, 2022, at 4:41 AM, Alexander Graf wrote: > > We are parsing the syndrome field for sysregs in multiple places across > the hvf code, but repeat shift/mask operations with hard coded constants > every time. This is a

Re: [PATCH v9 00/23] QEMU RISC-V AIA support

2022-02-11 Thread Alistair Francis
On Thu, Feb 10, 2022 at 8:24 PM Anup Patel wrote: > > On Thu, Feb 10, 2022 at 1:58 PM Atish Patra wrote: > > > > On Mon, Feb 7, 2022 at 10:51 PM Alistair Francis > > wrote: > > > > > > On Tue, Feb 8, 2022 at 2:16 PM Alistair Francis > > > wrote: > > > > > > > > On Sat, Feb 5, 2022 at 3:47 AM

Re: [PATCH v2 1/3] hw/smbios: code cleanup - use macro definitions for table base addresses

2022-02-11 Thread Igor Mammedov
On Mon, 7 Feb 2022 17:01:27 +0530 Ani Sinha wrote: > This is a minor cleanup. Using macro definitions makes the code more > readable. It is at once clear which tables use which starting base addresses. > It also makes it easy to calculate the gaps between the addresses and modify > them if neede

[PATCH v2 2/3] virtio_crypto: Support virtio crypto asym operation

2022-02-11 Thread zhenwei pi
Several changes in this patch: - Add support for virtio crypto asymmetric handling, include: create/close session encrypt/decrypt/sign/verify guest data - Modify crypto backend to compat sym&asym operation. - Introduce akcipher class without any implementation. Then QEMU can provide

[PATCH v2 1/3] virtio-crypto: header update

2022-02-11 Thread zhenwei pi
Update header from linux, support akcipher service. Signed-off-by: lei he Signed-off-by: zhenwei pi --- .../standard-headers/linux/virtio_crypto.h| 82 ++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/include/standard-headers/linux/virtio_crypto.h b/include

[PATCH v2 3/3] crypto: Introduce RSA algorithm

2022-02-11 Thread zhenwei pi
From: Lei He Implement RSA algorithm by nettle hogweed, and apply it for virtio-crypto akcipher backend. 1, The self-test framework of crypto layer works fine in guest kernel 2, Test with Linux guest(with asym support), the following script test(note that pkey_XXX is supported only in a newer ve

[PATCH v2 0/3] Support akcipher for virtio-crypto

2022-02-11 Thread zhenwei pi
v1 -> v2: - Update virtio_crypto.h from v2 version of related kernel patch. v1: - Support akcipher for virtio-crypto. - Introduce akcipher class. - Introduce ASN1 decoder into QEMU. - Implement RSA backend by nettle/hogweed. Lei He (1): crypto: Introduce RSA algorithm Zhenwei Pi (2): virtio-

Re: [PATCH v2 2/8] tests/qemu-iotests: Improve the check for GNU sed

2022-02-11 Thread Kevin Wolf
Am 09.02.2022 um 11:15 hat Thomas Huth geschrieben: > Instead of failing the iotests if GNU sed is not available (or skipping > them completely in the check-block.sh script), it would be better to > simply skip the bash-based tests, so that the python-based tests could > still be run. Thus add the

Re: [PATCH v5 02/20] job.h: categorize fields in struct Job

2022-02-11 Thread Emanuele Giuseppe Esposito
On 10/02/2022 18:35, Stefan Hajnoczi wrote: > On Thu, Feb 10, 2022 at 05:26:52PM +0100, Emanuele Giuseppe Esposito wrote: >> >> >> On 10/02/2022 16:40, Stefan Hajnoczi wrote: >>> On Tue, Feb 08, 2022 at 09:34:55AM -0500, Emanuele Giuseppe Esposito wrote: Categorize the fields in struct Job

Re: [PATCH v2 1/8] tests/qemu-iotests/testrunner: Allow parallel test invocations

2022-02-11 Thread Kevin Wolf
Am 09.02.2022 um 11:15 hat Thomas Huth geschrieben: > If multiple tests run in parallel, they must use unique file > names for the test output. > > Suggested-by: Hanna Reitz > Signed-off-by: Thomas Huth > --- > tests/qemu-iotests/testrunner.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH 7/9] user: Declare target-specific prototypes in 'user/cpu-target.h'

2022-02-11 Thread Philippe Mathieu-Daudé via
+Thomas On 11/2/22 00:19, Richard Henderson wrote: On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: Move user-mode specific prototypes from "exec/exec-all.h" to "user/cpu-target.h". Signed-off-by: Philippe Mathieu-Daudé --- Why a new cpu-target.h, and what is it supposed to mean?  What else i

Re: [RFC] thread-pool: Add option to fix the pool size

2022-02-11 Thread Nicolas Saenz Julienne
On Thu, 2022-02-03 at 14:19 +, Stefan Hajnoczi wrote: > Yep, I didn't comment on this because I don't have a good suggestion. > > In terms of semantics I think we should have: > > 1. A global default value that all new AioContext take. The QEMU main >loop's qemu_aio_context will use this

Re: [PATCH 1/9] accel/tcg: Add missing 'tcg/tcg.h' header

2022-02-11 Thread Philippe Mathieu-Daudé via
On 11/2/22 00:25, Richard Henderson wrote: On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   accel/tcg/tcg-accel-ops-icount.c | 1 +   accel/tcg/tcg-accel-ops-mttcg.c  | 1 +   accel/tcg/tcg-accel-ops-rr.c | 1 +   accel/tcg/tcg-accel-ops.c    | 1

Re: [PATCH 6/9] exec: Define MMUAccessType in 'exec/cpu-tlb.h' header

2022-02-11 Thread Philippe Mathieu-Daudé via
On 11/2/22 00:14, Richard Henderson wrote: On 2/10/22 10:00, Philippe Mathieu-Daudé wrote: To reduce the inclusion of "hw/core/cpu.h", extract MMUAccessType to its own "exec/cpu-tlb.h" header. Signed-off-by: Philippe Mathieu-Daudé --- Not keen on the name, unless you plan to put something els

Re: [PATCH v2 1/8] tests/qemu-iotests/testrunner: Allow parallel test invocations

2022-02-11 Thread Vladimir Sementsov-Ogievskiy
11.02.2022 12:29, Kevin Wolf wrote: Am 09.02.2022 um 11:15 hat Thomas Huth geschrieben: If multiple tests run in parallel, they must use unique file names for the test output. Suggested-by: Hanna Reitz Signed-off-by: Thomas Huth --- tests/qemu-iotests/testrunner.py | 2 +- 1 file changed,

Re: [PATCH v3 1/2] hvf: arm: Use macros for sysreg shift/masking

2022-02-11 Thread Philippe Mathieu-Daudé via
On 9/2/22 13:41, Alexander Graf wrote: We are parsing the syndrome field for sysregs in multiple places across the hvf code, but repeat shift/mask operations with hard coded constants every time. This is an error prone approach and makes it harder to reason about the correctness of these operatio

Re: [PATCH] Hexagon (target/hexagon) convert to OBJECT_DECLARE_TYPE

2022-02-11 Thread Philippe Mathieu-Daudé via
On 11/2/22 04:30, Taylor Simpson wrote: Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/cpu.h | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 58a0d3870b..e3efbb2303 100644 --- a/ta

Re: [PATCH] qapi, i386/sev: Add debug-launch-digest to launch-measure response

2022-02-11 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 07:39:01PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > I wonder if we're thinking of this at the wrong level though. Does > > it actually need to be QEMU providing this info to the guest owner ? > > > > Guest owners aren't go

[PULL 04/12] Hexagon (target/hexagon) properly handle denorm in arch_sf_recip_common

2022-02-11 Thread Taylor Simpson
The arch_sf_recip_common function was calling float32_getexp which adjusts for denorm, but the we actually need the raw exponent bits. This function is called from 3 instructions sfrecipa sffixupn sffixupd Test cases added to tests/tcg/hexagon/fpstuff.c Signed-off-by: Taylor Simpson

[PULL 12/12] target/hexagon: remove unused variable

2022-02-11 Thread Taylor Simpson
From: Zongyuan Li When building with clang version 13.0.0 (eg. Fedora 13.0.0-3.fc35), two unused variables introduced by macro GATHER_FUNCTION and SCATTER_FUNCTION will cause building process failure due to [-Werror -Wunused-variable]. Signed-off-by: Zongyuan Li Resolves: https://gitlab.com/qem

[PULL 10/12] Hexagon (target/hexagon) assignment to c4 should wait until packet commit

2022-02-11 Thread Taylor Simpson
On Hexagon, c4 is an alias for predicate registers P3:0. If we assign to c4 inside a packet with reads from predicate registers, the predicate reads should get the old values. Test case added to tests/tcg/hexagon/preg_alias.c Co-authored-by: Michael Lambert Signed-off-by: Taylor Simpson Messag

[PULL 03/12] Hexagon (target/hexagon) properly set FPINVF bit in sfcmp.uo and dfcmp.uo

2022-02-11 Thread Taylor Simpson
Instead of checking for nan arguments, use float??_unordered_quiet test cases added in a subsequent patch to more extensively test USR bits Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-4-tsimp...@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/op_helper.c | 6 +

Re: [PATCH] hw/i386/pc: when adding reserved E820 entries do not allocate dynamic entries

2022-02-11 Thread Ani Sinha
On Thu, 10 Feb 2022, Philippe Mathieu-Daudé wrote: > On 10/2/22 14:28, Ani Sinha wrote: > > When adding E820_RESERVED entries we also accidentally allocate dynamic > > entries. This is incorrect. We should simply return early with the count of > > the number of reserved entries added. > > > > fi

[PULL 01/12] Hexagon (target/hexagon) fix bug in circular addressing

2022-02-11 Thread Taylor Simpson
From: Michael Lambert Versions V3 and earlier should treat the "K_const" and "length" values as unsigned. Modified circ_test_v3() in tests/tcg/hexagon/circ.c to reproduce the bug Signed-off-by: Michael Lambert Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-2-tsimp...@quicinc.c

[PULL 11/12] Hexagon (target/hexagon) convert to OBJECT_DECLARE_TYPE

2022-02-11 Thread Taylor Simpson
Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson Message-Id: <20220211033034.21107-1-tsimp...@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/cpu.h | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.

[PULL 06/12] Hexagon (tests/tcg/hexagon) add floating point instructions to usr.c

2022-02-11 Thread Taylor Simpson
Tests to confirm floating point instructions are properly setting exception bits in USR Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-8-tsimp...@quicinc.com> Acked-by: Richard Henderson --- tests/tcg/hexagon/usr.c | 339 1 file changed,

[PULL 07/12] Hexagon (tests/tcg/hexagon) update overflow test

2022-02-11 Thread Taylor Simpson
Add a test that sets USR multiple times in a packet Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-9-tsimp...@quicinc.com> Acked-by: Richard Henderson --- tests/tcg/hexagon/overflow.c | 61 +++- 1 file changed, 60 insertions(+), 1 deletion(-) dif

[PULL 02/12] Hexagon HVX (target/hexagon) fix bug in HVX saturate instructions

2022-02-11 Thread Taylor Simpson
Two tests added to tests/tcg/hexagon/hvx_misc.c v21.uw = vadd(v11.uw, v10.uw):sat v25:24.uw = vsub(v17:16.uw, v27:26.uw):sat Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-3-tsimp...@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/macros.h | 4 +- te

[PULL 05/12] Hexagon (tests/tcg/hexagon) test instructions that might set bits in USR

2022-02-11 Thread Taylor Simpson
Hexagon has ~200 instructions that set the saturate bit in USR, these were broken into groups of similar instructions and one instruction from each group is tested with at least one input that does not saturate and at least one input that does saturate. Signed-off-by: Taylor Simpson Message-Id: <

[PULL 09/12] Hexagon (target/hexagon) fix bug in conv_df2uw_chop

2022-02-11 Thread Taylor Simpson
Fix typo that checked for 32 bit nan instead of 64 bit Test case added in tests/tcg/hexagon/usr.c Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-11-tsimp...@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/op_helper.c | 2 +- tests/tcg/hexagon/usr.c| 4 2

[PULL 00/12] Hexagon (target/hexagon) queue

2022-02-11 Thread Taylor Simpson
The following changes since commit 0a301624c2f4ced3331ffd5bce85b4274fe132af: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20220208' into staging (2022-02-08 11:40:08 +) are available in the Git repository at: https://github.com/quic/qemu tags/pull-he

[PULL 08/12] Hexagon (tests/tcg/hexagon) fix inline asm in preg_alias.c

2022-02-11 Thread Taylor Simpson
Replace consecutive inline asm blocks with a single one with proper outputs/inputs/clobbers rather than making assumptions about register values being carried between separate blocks. Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-10-tsimp...@quicinc.com> Reviewed-by: Richard Hend

Re: [RFC] thread-pool: Add option to fix the pool size

2022-02-11 Thread Kevin Wolf
Am 03.02.2022 um 15:19 hat Stefan Hajnoczi geschrieben: > On Thu, Feb 03, 2022 at 10:56:49AM +, Daniel P. Berrangé wrote: > > On Thu, Feb 03, 2022 at 10:53:07AM +, Stefan Hajnoczi wrote: > > > On Wed, Feb 02, 2022 at 06:52:34PM +0100, Nicolas Saenz Julienne wrote: > > > > The thread pool re

Re: [PULL 00/12] Hexagon (target/hexagon) queue

2022-02-11 Thread Taylor Simpson
ull-target-arm-20220208' into staging (2022-02-08 11:40:08 +) are available in the Git repository at: https://github.com/quic/qemu tags/pull-hex-20220211 for you to fetch changes up to effdede7a4b04cacea14618010ccc7775bb19196: target/hexagon: remove unused variable (2022-02-11

Re: [RFC PATCH] linux-user: trap internal SIGABRT's

2022-02-11 Thread Peter Maydell
On Wed, 9 Feb 2022 at 22:12, Richard Henderson wrote: > > On 2/9/22 22:22, Alex Bennée wrote: > > linux-user wants to trap all signals in case they are related to the > > guest. This however results in less than helpful core dumps when the > > error is internal to QEMU. We can detect when an asser

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-11 Thread Peter Maydell
On Thu, 10 Feb 2022 at 11:48, Philippe Mathieu-Daudé wrote: > > Hi Alex, > > On 10/2/22 12:30, Alex Bennée wrote: > > The previous numbers were a guess at best and rather arbitrary without > > taking into account anything that might be loaded. Instead of using > > guesses based on the state of reg

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-11 Thread Kevin Wolf
Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: > Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() > is not a good idea: the callback might be called when running > a drain in a coroutine, and bdrv_drained_begin_poll() does not > handle that case, resulting

Re: [PATCH 2/9] coverity-scan: Cover common-user/

2022-02-11 Thread Peter Maydell
On Wed, 9 Feb 2022 at 23:12, Philippe Mathieu-Daudé via wrote: > > common-user/ has been added in commit bbf15aaf7c > ("common-user: Move safe-syscall.* from linux-user"). > > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/coverity-scan/COMPONENTS.md | 2 +- > 1 file changed, 1 insertion(

Re: [PATCH] scripts/qapi: minor delinting

2022-02-11 Thread Markus Armbruster
John Snow writes: > On Thu, Feb 10, 2022 at 10:56 AM Markus Armbruster wrote: >> >> John Snow writes: >> >> > Just cleaning up some cobwebs. >> > >> > Signed-off-by: John Snow >> > --- >> > scripts/qapi/commands.py | 2 +- >> > scripts/qapi/events.py | 6 +++--- >> > scripts/qapi/types.py

Re: [PATCH v12 3/8] qmp: add QMP command x-query-virtio

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command lists all the instances of VirtIODevices with > their canonical QOM path and name. > > [Jonah: @virtio_list duplicates information that already exists in > the QOM composition tree. However, extracting necessary information > fro

Re: [PATCH v11 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > These new commands show the internal status of a VirtIODevice's > VirtQueue and a vhost device's vhost_virtqueue (if active). > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 4/8] qmp: add QMP command x-query-virtio-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the status of a VirtIODevice, including > its corresponding vhost device's status (if active). > > Next patch will improve output by decoding feature bits, including > vhost device's feature bits (backend, protocol, acked, an

[PATCH v6 00/43] CXl 2.0 emulation Support

2022-02-11 Thread Jonathan Cameron via
This version is mainly a reorganization of v5 patch ordering to make for more sensible stepwise review and merging. I took the opportunity to add a few more tests and introduce an overview document. Changes since v5: Thanks to Michael and Igor for comments. - Reorganize series to make it more sens

Re: [PATCH v11 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the information of a VirtQueue element. > > [Note: Up until v10 of this patch series, virtio.json had many (15+) > enums defined (e.g. decoded device features, statuses, etc.). In v10 > most of these enums were removed and

[PATCH v6 03/43] MAINTAINERS: Add entry for Compute Express Link Emulation

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron The CXL emulation will be jointly maintained by Ben Widawsky and Jonathan Cameron. Broken out as a separate patch to improve visibility. Signed-off-by: Jonathan Cameron Reviewed-by: Alex Bennée --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/

[PATCH v6 01/43] hw/pci/cxl: Add a CXL component type (interface)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky A CXL component is a hardware entity that implements CXL component registers from the CXL 2.0 spec (8.2.3). Currently these represent 3 general types. 1. Host Bridge 2. Ports (root, upstream, downstream) 3. Devices (memory, other) A CXL component can be conceptually thought of

[PATCH v6 06/43] hw/cxl/device: Implement basic mailbox (8.2.8.4)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky This is the beginning of implementing mailbox support for CXL 2.0 devices. The implementation recognizes when the doorbell is rung, handles the command/payload, clears the doorbell while returning error codes and data. Generally the mailbox mechanism is designed to permit comm

[PATCH v6 05/43] hw/cxl/device: Implement the CAP array (8.2.8.1-2)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky This implements all device MMIO up to the first capability. That includes the CXL Device Capabilities Array Register, as well as all of the CXL Device Capability Header Registers. The latter are filled in as they are implemented in the following patches. Endianness and alignme

[PATCH v6 08/43] hw/cxl/device: Add cheap EVENTS implementation (8.2.9.1)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky Using the previously implemented stubbed helpers, it is now possible to easily add the missing, required commands to the implementation. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron Reviewed-by: Alex Bennée --- hw/cxl/cxl-mailbox-utils.c | 27 +++

[PATCH v6 02/43] hw/cxl/component: Introduce CXL components (8.1.x, 8.2.5)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky A CXL 2.0 component is any entity in the CXL topology. All components have a analogous function in PCIe. Except for the CXL host bridge, all have a PCIe config space that is accessible via the common PCIe mechanisms. CXL components are enumerated via DVSEC fields in the extende

[PATCH v6 07/43] hw/cxl/device: Add memory device utilities

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky Memory devices implement extra capabilities on top of CXL devices. This adds support for that. A large part of memory devices is the mailbox/command interface. All of the mailbox handling is done in the mailbox-utils library. Longer term, new CXL devices that are being emulate

[PATCH v6 10/43] hw/cxl/device: Add log commands (8.2.9.4) + CEL

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky CXL specification provides for the ability to obtain logs from the device. Logs are either spec defined, like the "Command Effects Log" (CEL), or vendor specific. UUIDs are defined for all log types. The CEL is a mechanism to provide information to the host about which command

[PATCH v6 09/43] hw/cxl/device: Timestamp implementation (8.2.9.3)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky Errata F4 to CXL 2.0 clarified the meaning of the timer as the sum of the value set with the timestamp set command and the number of nano seconds since it was last set. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 44

Re: [PATCH v12 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > These new commands show the internal status of a VirtIODevice's > VirtQueue and a vhost device's vhost_virtqueue (if active). > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

[PATCH v6 12/43] hw/pci/cxl: Create a CXL bus type

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky The easiest way to differentiate a CXL bus, and a PCIE bus is using a flag. A CXL bus, in hardware, is backward compatible with PCIE, and therefore the code tries pretty hard to keep them in sync as much as possible. The other way to implement this would be to try to cast the

[PATCH v6 15/43] qtest/cxl: Introduce initial test for pxb-cxl only.

2022-02-11 Thread Jonathan Cameron via
Initial test with just pxb-cxl. Other tests will be added alongside functionality. Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 23 +++ tests/qtest/meson.build | 4 2 files changed, 27 insertions(+) diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cx

[PATCH v6 11/43] hw/pxb: Use a type for realizing expanders

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky This opens up the possibility for more types of expanders (other than PCI and PCIe). We'll need this to create a CXL expander. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron Reviewed-by: Alex Bennée --- hw/pci-bridge/pci_expander_bridge.c | 11 +++ 1 f

[PATCH v6 04/43] hw/cxl/device: Introduce a CXL device (8.2.8)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky A CXL device is a type of CXL component. Conceptually, a CXL device would be a leaf node in a CXL topology. From an emulation perspective, CXL devices are the most complex and so the actual implementation is reserved for discrete commits. This new device type is specifically c

[PATCH v6 13/43] cxl: Machine level control on whether CXL support is enabled

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron There are going to be some potential overheads to CXL enablement, for example the host bridge region reserved in memory maps. Add a machine level control so that CXL is disabled by default. Signed-off-by: Jonathan Cameron Reviewed-by: Alex Bennée --- hw/core/machine.c

[PATCH v6 19/43] hw/cxl/device: Implement MMIO HDM decoding (8.2.5.12)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky A device's volatile and persistent memory are known Host Defined Memory (HDM) regions. The mechanism by which the device is programmed to claim the addresses associated with those regions is through dedicated logic known as the HDM decoder. In order to allow the OS to properly

[PATCH v6 17/43] hw/cxl/device: Add a memory device (8.2.8.5)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky A CXL memory device (AKA Type 3) is a CXL component that contains some combination of volatile and persistent memory. It also implements the previously defined mailbox interface as well as the memory device firmware interface. Although the memory device is configured like a no

[PATCH v6 14/43] hw/pxb: Allow creation of a CXL PXB (host bridge)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky This works like adding a typical pxb device, except the name is 'pxb-cxl' instead of 'pxb-pcie'. An example command line would be as follows: -device pxb-cxl,id=cxl.0,bus="pcie.0",bus_nr=1 A CXL PXB is backward compatible with PCIe. What this means in practice is that an ope

Re: [PATCH v12 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the information of a VirtQueue element. > > [Note: Up until v10 of this patch series, virtio.json had many (15+) > enums defined (e.g. decoded device features, statuses, etc.). In v10 > most of these enums were removed and

[PATCH v6 20/43] hw/cxl/device: Add some trivial commands

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky GET_FW_INFO and GET_PARTITION_INFO, for this emulation, is equivalent to info already returned in the IDENTIFY command. To have a more robust implementation, add those. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 69 +

[PATCH v6 16/43] hw/cxl/rp: Add a root port

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky This adds just enough of a root port implementation to be able to enumerate root ports (creating the required DVSEC entries). What's not here yet is the MMIO nor the ability to write some of the DVSEC entries. This can be added with the qemu commandline by adding a rootport to

[PATCH v6 26/43] hw/cxl/component: Add utils for interleave parameter encoding/decoding

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron Both registers and the CFMWS entries in CDAT use simple encodings for the number of interleave ways and the interleave granularity. Introduce simple conversion functions to/from the unencoded number / size. So far the iw decode has not been needed so is it not implemented.

[PATCH v6 18/43] qtests/cxl: Add initial root port and CXL type3 tests

2022-02-11 Thread Jonathan Cameron via
At this stage we can boot configurations with host bridges, root ports and type 3 memory devices, so add appropriate tests. Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 126 + 1 file changed, 126 insertions(+) diff --git a/tests/qtest/cxl-

[PATCH v6 29/43] hw/pci-host/gpex-acpi: Add support for dsdt construction for pxb-cxl

2022-02-11 Thread Jonathan Cameron via
This adds code to instantiate the slightly extended ACPI root port description in DSDT as per the CXL 2.0 specification. Basically a cut and paste job from the i386/pc code. Signed-off-by: Jonathan Cameron Signed-off-by: Ben Widawsky --- hw/arm/Kconfig | 1 + hw/pci-host/gpex-acpi.c

[PATCH v6 22/43] hw/cxl/device: Implement get/set Label Storage Area (LSA)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky Implement get and set handlers for the Label Storage Area used to hold data describing persistent memory configuration so that it can be ensured it is seen in the same configuration after reboot. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mai

[PATCH v6 27/43] hw/cxl/host: Add support for CXL Fixed Memory Windows.

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron The concept of these is introduced in [1] in terms of the description the CEDT ACPI table. The principal is more general. Unlike once traffic hits the CXL root bridges, the host system memory address routing is implementation defined and effectively static once observable b

[PATCH v6 21/43] hw/cxl/device: Plumb real Label Storage Area (LSA) sizing

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky This should introduce no change. Subsequent work will make use of this new class member. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 3 +++ hw/mem/cxl_type3.c | 24 +--- include/hw/cxl/cxl_devic

[PATCH v6 38/43] qtests/bios-tables-test: Add a test for CXL emulation.

2022-02-11 Thread Jonathan Cameron via
The DSDT includes several CXL specific elements and the CEDT table is only present if we enable CXL. The test exercises all current functionality with several CFMWS, CHBS structures in CEDT and ACPI0016/ACPI00017 and _OSC entries in DSDT. Signed-off-by: Jonathan Cameron --- tests/qtest/bios-tab

[PATCH v6 30/43] pci/pcie_port: Add pci_find_port_by_pn()

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron Simple function to search a PCIBus to find a port by it's port number. CXL interleave decoding uses the port number as a target so it is necessary to locate the port when doing interleave decoding. Signed-off-by: Jonathan Cameron --- hw/pci/pcie_port.c | 25

[PATCH v6 28/43] acpi/cxl: Introduce CFMWS structures in CEDT

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky The CEDT CXL Fixed Window Memory Window Structures (CFMWs) define regions of the host phyiscal address map which (via an impdef means) are configured such that they have a particular interleave setup across one or more CXL Host Bridges. Reported-by: Alison Schofield Signed-of

[PATCH v6 23/43] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky CXL host bridges themselves may have MMIO. Since host bridges don't have a BAR they are treated as special for MMIO. This patch includes i386/pc support. Also hook up the device reset now that we have have the MMIO space in which the results are visible. Note that we duplicat

Re: [PATCH 2/6] block.c: bdrv_replace_child_noperm: first remove the child, and then call ->detach()

2022-02-11 Thread Kevin Wolf
Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: > Doing the opposite can make ->detach() (more precisely > bdrv_unapply_subtree_drain() in bdrv_child_cb_detach) undo the subtree_drain > just performed to protect the removal of the child from the graph, > thus making the fully-ena

[PATCH v6 31/43] CXL/cxl_component: Add cxl_get_hb_cstate()

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron Accessor to get hold of the cxl state for a CXL host bridge without exposing the internals of the implementation. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/pci_expander_bridge.c | 7 +++ include/hw/cxl/cxl_component.h | 2 ++ 2 files changed, 9 insertion

[PATCH v6 36/43] i386/pc: Enable CXL fixed memory windows

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron Add the CFMWs memory regions to the memorymap and adjust the PCI window to avoid hitting the same memory. Signed-off-by: Jonathan Cameron --- hw/i386/pc.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/h

[PATCH v6 24/43] acpi/cxl: Add _OSC implementation (9.14.2)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky CXL 2.0 specification adds 2 new dwords to the existing _OSC definition from PCIe. The new dwords are accessed with a new uuid. This implementation supports what is in the specification. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron --- hw/acpi/Kconfig |

[PATCH v6 41/43] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-02-11 Thread Jonathan Cameron via
Code based on i386/pc enablement. The memory layout places space for 16 host bridge register regions after the GIC_REDIST2 in the extended memmap. The CFMWs are placed above the extended memmap. Only create the CEDT table if cxl=on set for the machine. Signed-off-by: Jonathan Cameron Signed-off-

[PATCH v6 32/43] mem/cxl_type3: Add read and write functions for associated hostmem.

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron Once a read or write reaches a CXL type 3 device, the HDM decoders on the device are used to establish the Device Physical Address which should be accessed. These functions peform the required maths and then directly access the hostmem->mr to fullfil the actual operation.

[PATCH v6 37/43] tests/acpi: q35: Allow addition of a CXL test.

2022-02-11 Thread Jonathan Cameron via
Add exceptions for the DSDT and the new CEDT tables specific to a new CXL test in the following patch. Signed-off-by: Jonathan Cameron --- tests/data/acpi/q35/CEDT.cxl| 0 tests/data/acpi/q35/DSDT.cxl| 0 tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 3 files

[PATCH v6 25/43] acpi/cxl: Create the CEDT (9.14.1)

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky The CXL Early Discovery Table is defined in the CXL 2.0 specification as a way for the OS to get CXL specific information from the system firmware. CXL 2.0 specification adds an _HID, ACPI0016, for CXL capable host bridges, with a _CID of PNP0A08 (PCIe host bridge). CXL aware

[PATCH v6 42/43] qtest/cxl: Add aarch64 virt test for CXL

2022-02-11 Thread Jonathan Cameron via
Add a single complex case for aarch64 virt machine. Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 49 + tests/qtest/meson.build | 1 + 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl

[PATCH v6 33/43] cxl/cxl-host: Add memops for CFMWS region.

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron These memops perform interleave decoding, walking down the CXL topology from CFMWS described host interleave decoder via CXL host bridge HDM decoders, through the CXL root ports and finally call CXL type 3 specific read and write functions. Note that, whilst functional the

[PATCH v6 40/43] qtest/cxl: Add more complex test cases with CFMWs

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky Add CXL Fixed Memory Windows to the CXL tests. Signed-off-by: Ben Widawsky Co-developed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qtest/cxl-test.c b/tes

[PATCH v6 43/43] docs/cxl: Add initial Compute eXpress Link (CXL) documentation.

2022-02-11 Thread Jonathan Cameron via
Provide an introduction to the main components of a CXL system, with detailed explanation of memory interleaving, example command lines and kernel configuration. This was a challenging document to write due to the need to extract only that subset of CXL information which is relevant to either user

[PATCH v6 34/43] RFC: softmmu/memory: Add ops to memory_region_ram_init_from_file

2022-02-11 Thread Jonathan Cameron via
From: Jonathan Cameron Inorder to implement memory interleaving we need a means to proxy the calls. Adding mem_ops allows such proxying. Note should have no impact on use cases not using _dispatch_read/write. For now, only file backed hostmem is considered to seek feedback on the approach before

[PATCH v6 35/43] hw/cxl/component Add a dumb HDM decoder handler

2022-02-11 Thread Jonathan Cameron via
From: Ben Widawsky Add a trivial handler for now to cover the root bridge where we could do some error checking in future. Signed-off-by: Ben Widawsky Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-component-utils.c | 31 +++ 1 file changed, 31 insertions(+) diff

Re: [PATCH 2/9] coverity-scan: Cover common-user/

2022-02-11 Thread Philippe Mathieu-Daudé via
On 11/2/22 12:56, Peter Maydell wrote: On Wed, 9 Feb 2022 at 23:12, Philippe Mathieu-Daudé via wrote: common-user/ has been added in commit bbf15aaf7c ("common-user: Move safe-syscall.* from linux-user"). Signed-off-by: Philippe Mathieu-Daudé --- scripts/coverity-scan/COMPONENTS.md | 2 +-

[PATCH v6 39/43] tests/acpi: Add tables for CXL emulation.

2022-02-11 Thread Jonathan Cameron via
Tables that differ from normal Q35 tables when running the CXL test. Signed-off-by: Jonathan Cameron --- tests/data/acpi/q35/CEDT.cxl| Bin 0 -> 184 bytes tests/data/acpi/q35/DSDT.cxl| Bin 0 -> 9627 bytes tests/qtest/bios-tables-test-allowed-diff.h | 2 -- 3 fi

Re: [PATCH v12 5/8] qmp: decode feature & status bits in virtio-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > Display feature names instead of bitmaps for host, guest, and > backend for VirtIODevices. > > Display status names instead of bitmaps for VirtIODevices. > > Display feature names instead of bitmaps for backend, protocol, > acked, and features (hde

Re: [PATCH 3/6] block.c: bdrv_replace_child_noperm: first call ->attach(), and then add child

2022-02-11 Thread Kevin Wolf
Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: > Doing the opposite can make adding the child node to a non-drained node, > as apply_subtree_drain is only done in ->attach() and thus make > assert_bdrv_graph_writable fail. > > This can happen for example during a transaction ro

Re: [PULL 0/7] nbd: handle AioContext change correctly

2022-02-11 Thread Peter Maydell
On Wed, 9 Feb 2022 at 14:03, Vladimir Sementsov-Ogievskiy wrote: > > The following changes since commit 0a301624c2f4ced3331ffd5bce85b4274fe132af: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20220208' into staging (2022-02-08 > 11:40:08 +) > > are available in

Re: [PATCH 2/9] coverity-scan: Cover common-user/

2022-02-11 Thread Peter Maydell
On Fri, 11 Feb 2022 at 12:38, Philippe Mathieu-Daudé wrote: > > On 11/2/22 12:56, Peter Maydell wrote: > > On Wed, 9 Feb 2022 at 23:12, Philippe Mathieu-Daudé via > > wrote: > >> > >> common-user/ has been added in commit bbf15aaf7c > >> ("common-user: Move safe-syscall.* from linux-user"). > >>

RE: [RFC v4 20/21] vfio-user: migration support

2022-02-11 Thread Thanos Makatos
> -Original Message- > From: Qemu-devel bounces+thanos.makatos=nutanix@nongnu.org> On Behalf Of John > Johnson > Sent: 12 January 2022 00:44 > To: qemu-devel@nongnu.org > Subject: [RFC v4 20/21] vfio-user: migration support > > Signed-off-by: John G Johnson > Signed-off-by: Elena U

Re: [PULL 0/7] nbd: handle AioContext change correctly

2022-02-11 Thread Vladimir Sementsov-Ogievskiy
11.02.2022 15:52, Peter Maydell wrote: On Wed, 9 Feb 2022 at 14:03, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 0a301624c2f4ced3331ffd5bce85b4274fe132af: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20220208' into staging (2022-02-08 11:4

  1   2   3   >