Re: [PATCH v2 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-02-15 Thread Davidlohr Bueso
is capable of. In addition, the patrol scrub controls allow the host to disable and enable the feature in case disabling of the feature is needed for other purposes such as performance-aware operations which require the background operations to be turned off. Reviewed-by: Davidlohr Bueso Signed-off

Re: [PATCH v7 4/7] hw/cxl/events: Add event interrupt support

2023-05-23 Thread Davidlohr Bueso
optional. Perform the checks separately. Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron I had done this long ago, but I guess I never sent a proper tag. Reviewed-by: Davidlohr Bueso

Re: [qemu PATCH] hw/cxl/cxl_device: Replace magic number in CXLError definition

2023-03-14 Thread Davidlohr Bueso
On Tue, 14 Mar 2023, Fan Ni wrote: Replace the magic number 32 with CXL_RAS_ERR_HEADER_NUM for better code readability and maintainability. Reviewed-by: Davidlohr Bueso Signed-off-by: Fan Ni --- include/hw/cxl/cxl_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 2/2] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-02-14 Thread Davidlohr Bueso
persistent memory is not yet supported. Volatile memory is mapped at DPA(0x0), while Persistent memory is mapped at DPA(vmem->size), per CXL Spec 8.2.9.8.2.0 - Get Partition Info. Signed-off-by: Gregory Price Signed-off-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso

[PATCH] docs/cxl: Fix some typos

2022-11-07 Thread Davidlohr Bueso
Found while reading the doc. Signed-off-by: Davidlohr Bueso --- docs/system/devices/cxl.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/system/devices/cxl.rst b/docs/system/devices/cxl.rst index abf7c1f24305..891bbd65d9d8 100644 --- a/docs/system

Re: [PATCH v2 1/8] hw/cxl: Make the CXL fixed memory window setup a machine parameter.

2022-06-07 Thread Davidlohr Bueso
: Davidlohr Bueso One thing missing however is updating qemu-options.hx - maybe fold in the below? Thanks! 8<--- diff --git a/qemu-options.hx b/qemu-options.hx index 60cf188da429..3bcf1247b88a 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -127,10 +127,43 @@ SRST ERST DEF

Re: [PATCH v8 04/46] hw/cxl/device: Introduce a CXL device (8.2.8)

2022-03-29 Thread Davidlohr Bueso
On Tue, 29 Mar 2022, Adam Manzanares wrote: +typedef struct cxl_device_state { +MemoryRegion device_registers; + +/* mmio for device capabilities array - 8.2.8.2 */ +MemoryRegion device; +MemoryRegion caps; + +/* mmio for the mailbox registers 8.2.8.4 */ +MemoryRegion mail

Re: [PATCH 1/2] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2022-10-07 Thread Davidlohr Bueso
On Thu, 06 Oct 2022, Gregory Price wrote: Current code sets to STORAGE_EXPRESS and then overrides it. Good catch. Reviewed-by: Davidlohr Bueso

Re: [PATCH 1/2] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2022-10-07 Thread Davidlohr Bueso
On Thu, 06 Oct 2022, Gregory Price wrote: Current code sets to STORAGE_EXPRESS and then overrides it. Good catch. Reviewed-by: Davidlohr Bueso Signed-off-by: Gregory Price --- hw/mem/cxl_type3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw

Re: [PATCH RFC] hw/cxl: type 3 devices can now present volatile or persistent memory

2022-10-07 Thread Davidlohr Bueso
On Thu, 06 Oct 2022, Jonathan Cameron wrote: 3) Upstream linux drivers haven't touched ram configurations yet. I just configured this with Dan Williams yesterday on IRC. My understanding is that it's been worked on but nothing has been upstreamed, in part because there are only a very small set

Re: [PATCH RFC] hw/cxl: type 3 devices can now present volatile or persistent memory

2022-10-07 Thread Davidlohr Bueso
On Thu, 06 Oct 2022, Jonathan Cameron wrote: One of the blockers for volatile support was that we had no means to poke it properly as the kernel doesn't yet support volatile capacity and no one has done the relevant work in EDK2 or similar to do it before the kernel boots. There has been some w

Re: [PATCH RFC] hw/cxl: type 3 devices can now present volatile or persistent memory

2022-10-07 Thread Davidlohr Bueso
On Fri, 07 Oct 2022, Gregory Price wrote: Spec says that volatile devices `may` implement an lsa. Right you are. Get LSA (Opcode 4102h) The Label Storage Area (LSA) shall be supported by a memory device that provides persistent memory capacity and may be supported by a device that provides o

Re: [PATCH RFC] hw/cxl: type 3 devices can now present volatile or persistent memory

2022-10-10 Thread Davidlohr Bueso
On Mon, 10 Oct 2022, Jonathan Cameron wrote: I wonder if we care to emulate beyond 1 volatile and 1 persistent. Sure devices might exist, but if we can exercise all the code paths with a simpler configuration, perhaps we don't need to handle the more complex ones? Yes, I completely agree. 1 of

Re: [PATCH 2/2] hw/cxl: Allow CXL type-3 devices to be persistent or volatile

2022-10-10 Thread Davidlohr Bueso
On Thu, 06 Oct 2022, Gregory Price wrote: diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c index bc1bb18844..dfec11a1b5 100644 --- a/hw/cxl/cxl-mailbox-utils.c +++ b/hw/cxl/cxl-mailbox-utils.c @@ -138,7 +138,7 @@ static ret_code cmd_firmware_update_get_info(struct cxl_cmd *c

Re: [PATCH 2/2] hw/cxl: Allow CXL type-3 devices to be persistent or volatile

2022-10-10 Thread Davidlohr Bueso
On Mon, 10 Oct 2022, Davidlohr Bueso wrote: This hides requirement details as to the necessary changes that are needed for volatile support - for example, build_dvsecs(). Imo using two backends (without breaking current configs, of course) should be the initial version, not something to leave

Re: [PATCH RFC] hw/cxl: type 3 devices can now present volatile or persistent memory

2022-10-11 Thread Davidlohr Bueso
_CAPACITY_MULTIPLIER pullout patch (@Davidlohr request) Reviewed-by: Davidlohr Bueso However this needs a changelog; for however redundant it may be. 3/5: Generalizes CDATDsmas intialization ahead of multi-region 4/5: Multi-region support w/ backward compatibility * Requires extra ey

Re: [RFC PATCH 1/3] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2023-11-20 Thread Davidlohr Bueso
of a feature can be retrieved using Get Feature and optionally modified using Set Feature. Signed-off-by: Shiju Jose Reviewed-by: Davidlohr Bueso ... with some comments below. --- hw/cxl/cxl-mailbox-utils.c | 140 + 1 file changed, 140 insertions(+) diff

Re: [RFC PATCH 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2023-11-20 Thread Davidlohr Bueso
On Tue, 14 Nov 2023, shiju.j...@huawei.com wrote: +case CXL_FEATURE_PATROL_SCRUB: +/* Fill supported feature entry for device patrol scrub control */ +supported_feats->feat_entries[entry] = + (struct CXLSupportedFeatureEntry) { +

Re: [PATCH v1 2/2] hw/mem/cxl_type3: allocate more vectors for MSI-X

2023-11-27 Thread Davidlohr Bueso
On Mon, 27 Nov 2023, Hyeonggon Yoo wrote: commit 43efb0bfad2b ("hw/cxl/mbox: Wire up interrupts for background completion") enables notifying background command completion via MSI-X interrupt (vector number 9). However, the commit uses vector number 9 but the maximum number of entries is less t

Re: [PATCH v1 1/2] hw/cxl/device: read from register values in mdev_reg_read()

2023-11-27 Thread Davidlohr Bueso
read register values instead of returning dummy values. Fixes: commit 25a52959f99d ("hw/cxl: Add support for device sanitation") Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> Looks good, thanks. Reviewed-by: Davidlohr Bueso In addition how about the following to fur

Re: [PATCH v1 1/2] hw/cxl/device: read from register values in mdev_reg_read()

2023-11-27 Thread Davidlohr Bueso
On Tue, 28 Nov 2023, Hyeonggon Yoo wrote: All of them make sense to me. I will adjust, thanks! But I'm not confident enough to write a single description for all the changes so will split it into a few patches. May I add your Suggested-by (or Signed-off-by) in v2 as it will contain some part of

Re: [PATCH v1 1/2] hw/cxl/device: read from register values in mdev_reg_read()

2023-12-03 Thread Davidlohr Bueso
On Thu, 30 Nov 2023, Jonathan Cameron wrote: If you mean generally harden the code we haven't fixed up for big endian systems then fair enough - that indeed needs doing. Yes, that was a braino, sorry for the confusion. Tricky to be sure we got it all right though unless we have a big endian

Re: [PATCH v2 4/4] hw/cxl/events: discard all event records during sanitation

2024-01-01 Thread Davidlohr Bueso
On Fri, 22 Dec 2023, Hyeonggon Yoo wrote: Per spec 8.2.9.9.5.1 Sanitize (Opcode 4400h), sanitize command should delete all event logs. Introduce cxl_discard_all_event_logs() and call this in __do_sanitization(). lgtm Reviewed-by: Davidlohr Bueso Signed-off-by: Hyeonggon Yoo <42.

Re: [PULL 57/63] hw/cxl: Add support for device sanitation

2023-11-09 Thread Davidlohr Bueso
On Thu, 09 Nov 2023, Peter Maydell wrote: On Tue, 7 Nov 2023 at 10:13, Michael S. Tsirkin wrote: From: Davidlohr Bueso Make use of the background operations through the sanitize command, per CXL 3.0 specs. Traditionally run times can be rather long, depending on the size of the media

Re: [PULL 55/63] hw/cxl/mbox: Add support for background operations

2023-11-09 Thread Davidlohr Bueso
On Thu, 09 Nov 2023, Peter Maydell wrote: On Tue, 7 Nov 2023 at 10:13, Michael S. Tsirkin wrote: From: Davidlohr Bueso Support background commands in the mailbox, and update cmd_infostat_bg_op_sts() accordingly. This patch does not implement mbox interrupts upon completion, so the kernel

[PATCH] hw/cxl/mbox: Remove dead code

2023-11-10 Thread Davidlohr Bueso
Two functions were reported to have dead code, remove the bogus branches altogether, as well as a misplaced qemu_log call. Reported-by: Peter Maydell Signed-off-by: Davidlohr Bueso --- hw/cxl/cxl-mailbox-utils.c | 43 +- 1 file changed, 15 insertions(+), 28

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

2024-10-08 Thread Davidlohr Bueso
level of parenthesis (other cmds as well), otherwise: Reviewed-by: Davidlohr Bueso Signed-off-by: Fan Ni --- hw/cxl/cxl-mailbox-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c index 9258e48f95..c82ad50ac8

[PATCH -qemu] hw/cxl: Support get/set mctp response payload size

2024-10-09 Thread Davidlohr Bueso
Add Get/Set Response Message Limit commands. Signed-off-by: Davidlohr Bueso --- hw/cxl/cxl-mailbox-utils.c | 68 -- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c index c2d776bc96eb

Re: [PATCH] hw/cxl: Support aborting background commands

2024-10-21 Thread Davidlohr Bueso
On Tue, 27 Aug 2024, Jonathan Cameron wrote:\n No comments inline and LGTM. I'll queue it on my tree and push that out on gitlab sometime soonish. I don't see this picked up, which is a good thing atm. While testing the kernel side, I noticed the following is needed, will send a v2 with it fold

Re: [PATCH] hw/cxl: Support aborting background commands

2025-02-04 Thread Davidlohr Bueso
On Mon, 03 Feb 2025, Jonathan Cameron wrote: On Tue, 22 Oct 2024 18:00:30 +0100 Jonathan Cameron wrote: On Mon, 21 Oct 2024 20:23:46 -0700 Davidlohr Bueso wrote: > On Tue, 27 Aug 2024, Jonathan Cameron wrote:\n > >No comments inline and LGTM. I'll queue it on my tree and pu