From: Jonathan Cameron <Jonathan.Cameron@huawei.com> To: <qemu-devel@nongnu.org>, Michael Tsirkin <mst@redhat.com>, Fan Ni <fan.ni@samsung.com> Cc: linux-cxl@vger.kernel.org, linuxarm@huawei.com, "Ira Weiny" <ira.weiny@intel.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Dave Jiang" <dave.jiang@intel.com> Subject: [PATCH v3 0/7] QEMU CXL Provide mock CXL events and irq support Date: Mon, 27 Feb 2023 17:34:09 +0000 [thread overview] Message-ID: <20230227173416.7740-1-Jonathan.Cameron@huawei.com> (raw) Whilst I'm an optimist, I suspect this is now 8.1 material because we have 5 CXL patch sets outstanding before it. One of the earlier series has non trivial PCI changes, so I'm hoping to route all these through Michael Tsirkin as for previous releases. v3: A lot of changes due to rebasing on other patch sets, new event types and changes in response to v2 review. A few big ones: - Use the ability to optional fields in qapi json to make the handling of flags more intuitive. - Add dram and memory module events. - Various patches from original series moved to other series and the CXLRetCode move ended up here. This shuffling was to allow use of some features Ira introduced in patch sets that were ready to upstream earlier than this one. One challenge here is striking the right balance between lots of constraints in the injection code to enforce particular reserved bits etc by breaking out all the flags as individual parameters vs having a reasonably concise API. I think this set strikes the right balance but others may well disagree :) Based on following series (in order) 1. [PATCH v4 00/10] hw/cxl: CXL emulation cleanups and minor fixes for upstream 2. [PATCH v6 0/8] hw/cxl: RAS error emulation and injection 3. [PATCH v2 0/2] hw/cxl: Passthrough HDM decoder emulation 4. [PATCH v4 0/2] hw/mem: CXL Type-3 Volatile Memory Support 5. [PATCH v2 0/6] hw/cxl: Poison get, inject, clear Based on: Message-Id: 20230206172816.8201-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227112751.6101-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227153128.8164-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227163157.6621-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227170311.20054-1-Jonathan.Cameron@huawei.com v2 cover letter. CXL Event records inform the OS of various CXL device events. Thus far CXL memory devices are emulated and therefore don't naturally generate events. Add an event infrastructure and mock event injection. Previous versions included a bulk insertion of lots of events. However, this series focuses on providing the ability to inject individual events through QMP. Only the General Media Event is included in this series as an example. Other events can be added pretty easily once the infrastructure is acceptable. In addition, this version updates the code to be in line with the specification based on discussions around the kernel patches. Injection examples; { "execute": "cxl-inject-gen-media-event", "arguments": { "path": "/machine/peripheral/cxl-mem0", "log": "informational", "flags": 1, "physaddr": 1000, "descriptor": 3, "type": 3, "transaction-type": 192, "channel": 3, "device": 5, "component-id": "iras mem" }} { "execute": "cxl-inject-dram-event", "arguments": { "path": "/machine/peripheral/cxl-mem0", "log": "informational", "flags": 1, "physaddr": 1000, "descriptor": 3, "type": 3, "transaction-type": 192, "channel": 3, "rank": 17, "nibble-mask": 37421234, "bank-group": 7, "bank": 11, "row": 2, "column": 77, "correction-mask": [33, 44, 55, 66] }} { "execute": "cxl-inject-memory-module-event", "arguments": { "path": "/machine/peripheral/cxl-mem0", "log": "informational", "flags": 1, "type": 3, "health-status": 3, "media-status": 7, "additional-status": 33, "life-used": 30, "temperature": -15, "dirty-shutdown-count": 4, "corrected-volatile-error-count": 3233, "corrected-persistent-error-count": 1300 }} Ira Weiny (4): hw/cxl/events: Add event status register hw/cxl/events: Wire up get/clear event mailbox commands hw/cxl/events: Add event interrupt support hw/cxl/events: Add injection of General Media Events Jonathan Cameron (3): hw/cxl: Move CXLRetCode definition to cxl_device.h hw/cxl/events: Add injection of DRAM events hw/cxl/events: Add injection of Memory Module Events hw/cxl/cxl-device-utils.c | 43 +++++- hw/cxl/cxl-events.c | 248 +++++++++++++++++++++++++++++++ hw/cxl/cxl-mailbox-utils.c | 166 +++++++++++++++------ hw/cxl/meson.build | 1 + hw/mem/cxl_type3.c | 289 +++++++++++++++++++++++++++++++++++- hw/mem/cxl_type3_stubs.c | 35 +++++ include/hw/cxl/cxl_device.h | 80 +++++++++- include/hw/cxl/cxl_events.h | 168 +++++++++++++++++++++ qapi/cxl.json | 120 +++++++++++++++ 9 files changed, 1094 insertions(+), 56 deletions(-) create mode 100644 hw/cxl/cxl-events.c create mode 100644 include/hw/cxl/cxl_events.h -- 2.37.2
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron via <qemu-devel@nongnu.org> To: <qemu-devel@nongnu.org>, Michael Tsirkin <mst@redhat.com>, Fan Ni <fan.ni@samsung.com> Cc: linux-cxl@vger.kernel.org, linuxarm@huawei.com, "Ira Weiny" <ira.weiny@intel.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Dave Jiang" <dave.jiang@intel.com> Subject: [PATCH v3 0/7] QEMU CXL Provide mock CXL events and irq support Date: Mon, 27 Feb 2023 17:34:09 +0000 [thread overview] Message-ID: <20230227173416.7740-1-Jonathan.Cameron@huawei.com> (raw) Whilst I'm an optimist, I suspect this is now 8.1 material because we have 5 CXL patch sets outstanding before it. One of the earlier series has non trivial PCI changes, so I'm hoping to route all these through Michael Tsirkin as for previous releases. v3: A lot of changes due to rebasing on other patch sets, new event types and changes in response to v2 review. A few big ones: - Use the ability to optional fields in qapi json to make the handling of flags more intuitive. - Add dram and memory module events. - Various patches from original series moved to other series and the CXLRetCode move ended up here. This shuffling was to allow use of some features Ira introduced in patch sets that were ready to upstream earlier than this one. One challenge here is striking the right balance between lots of constraints in the injection code to enforce particular reserved bits etc by breaking out all the flags as individual parameters vs having a reasonably concise API. I think this set strikes the right balance but others may well disagree :) Based on following series (in order) 1. [PATCH v4 00/10] hw/cxl: CXL emulation cleanups and minor fixes for upstream 2. [PATCH v6 0/8] hw/cxl: RAS error emulation and injection 3. [PATCH v2 0/2] hw/cxl: Passthrough HDM decoder emulation 4. [PATCH v4 0/2] hw/mem: CXL Type-3 Volatile Memory Support 5. [PATCH v2 0/6] hw/cxl: Poison get, inject, clear Based on: Message-Id: 20230206172816.8201-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227112751.6101-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227153128.8164-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227163157.6621-1-Jonathan.Cameron@huawei.com Based-on: Message-id: 20230227170311.20054-1-Jonathan.Cameron@huawei.com v2 cover letter. CXL Event records inform the OS of various CXL device events. Thus far CXL memory devices are emulated and therefore don't naturally generate events. Add an event infrastructure and mock event injection. Previous versions included a bulk insertion of lots of events. However, this series focuses on providing the ability to inject individual events through QMP. Only the General Media Event is included in this series as an example. Other events can be added pretty easily once the infrastructure is acceptable. In addition, this version updates the code to be in line with the specification based on discussions around the kernel patches. Injection examples; { "execute": "cxl-inject-gen-media-event", "arguments": { "path": "/machine/peripheral/cxl-mem0", "log": "informational", "flags": 1, "physaddr": 1000, "descriptor": 3, "type": 3, "transaction-type": 192, "channel": 3, "device": 5, "component-id": "iras mem" }} { "execute": "cxl-inject-dram-event", "arguments": { "path": "/machine/peripheral/cxl-mem0", "log": "informational", "flags": 1, "physaddr": 1000, "descriptor": 3, "type": 3, "transaction-type": 192, "channel": 3, "rank": 17, "nibble-mask": 37421234, "bank-group": 7, "bank": 11, "row": 2, "column": 77, "correction-mask": [33, 44, 55, 66] }} { "execute": "cxl-inject-memory-module-event", "arguments": { "path": "/machine/peripheral/cxl-mem0", "log": "informational", "flags": 1, "type": 3, "health-status": 3, "media-status": 7, "additional-status": 33, "life-used": 30, "temperature": -15, "dirty-shutdown-count": 4, "corrected-volatile-error-count": 3233, "corrected-persistent-error-count": 1300 }} Ira Weiny (4): hw/cxl/events: Add event status register hw/cxl/events: Wire up get/clear event mailbox commands hw/cxl/events: Add event interrupt support hw/cxl/events: Add injection of General Media Events Jonathan Cameron (3): hw/cxl: Move CXLRetCode definition to cxl_device.h hw/cxl/events: Add injection of DRAM events hw/cxl/events: Add injection of Memory Module Events hw/cxl/cxl-device-utils.c | 43 +++++- hw/cxl/cxl-events.c | 248 +++++++++++++++++++++++++++++++ hw/cxl/cxl-mailbox-utils.c | 166 +++++++++++++++------ hw/cxl/meson.build | 1 + hw/mem/cxl_type3.c | 289 +++++++++++++++++++++++++++++++++++- hw/mem/cxl_type3_stubs.c | 35 +++++ include/hw/cxl/cxl_device.h | 80 +++++++++- include/hw/cxl/cxl_events.h | 168 +++++++++++++++++++++ qapi/cxl.json | 120 +++++++++++++++ 9 files changed, 1094 insertions(+), 56 deletions(-) create mode 100644 hw/cxl/cxl-events.c create mode 100644 include/hw/cxl/cxl_events.h -- 2.37.2
next reply other threads:[~2023-02-27 17:34 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-27 17:34 Jonathan Cameron [this message] 2023-02-27 17:34 ` [PATCH v3 0/7] QEMU CXL Provide mock CXL events and irq support Jonathan Cameron via 2023-02-27 17:34 ` [PATCH v3 1/7] hw/cxl/events: Add event status register Jonathan Cameron 2023-02-27 17:34 ` Jonathan Cameron via 2023-02-27 17:34 ` [PATCH v3 2/7] hw/cxl: Move CXLRetCode definition to cxl_device.h Jonathan Cameron 2023-02-27 17:34 ` Jonathan Cameron via 2023-02-27 17:34 ` [PATCH v3 3/7] hw/cxl/events: Wire up get/clear event mailbox commands Jonathan Cameron 2023-02-27 17:34 ` Jonathan Cameron via 2023-02-27 17:34 ` [PATCH v3 4/7] hw/cxl/events: Add event interrupt support Jonathan Cameron 2023-02-27 17:34 ` Jonathan Cameron via 2023-02-27 17:34 ` [PATCH v3 5/7] hw/cxl/events: Add injection of General Media Events Jonathan Cameron 2023-02-27 17:34 ` Jonathan Cameron via 2023-03-02 17:42 ` Jonathan Cameron 2023-03-02 17:42 ` Jonathan Cameron via 2023-02-27 17:34 ` [PATCH v3 6/7] hw/cxl/events: Add injection of DRAM events Jonathan Cameron via 2023-02-27 17:34 ` Jonathan Cameron 2023-03-02 6:38 ` Ira Weiny 2023-03-03 11:46 ` Jonathan Cameron 2023-03-03 11:46 ` Jonathan Cameron via 2023-02-27 17:34 ` [PATCH v3 7/7] hw/cxl/events: Add injection of Memory Module Events Jonathan Cameron via 2023-02-27 17:34 ` Jonathan Cameron 2023-03-02 6:44 ` Ira Weiny
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230227173416.7740-1-Jonathan.Cameron@huawei.com \ --to=jonathan.cameron@huawei.com \ --cc=dave.jiang@intel.com \ --cc=fan.ni@samsung.com \ --cc=ira.weiny@intel.com \ --cc=linux-cxl@vger.kernel.org \ --cc=linuxarm@huawei.com \ --cc=mst@redhat.com \ --cc=philmd@linaro.org \ --cc=qemu-devel@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.