From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:907:20b4:b0:9a1:fa4e:495e with SMTP id pw20csp4245703ejb; Wed, 20 Sep 2023 04:48:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVeAArvngx8l5O/CKz23zQWq6wIJF5x+bMtmrwVUUpeNA5e4aXteKSZKZY4XYr1JJ3bS88 X-Received: by 2002:a05:620a:2698:b0:76c:e6b6:58d3 with SMTP id c24-20020a05620a269800b0076ce6b658d3mr2388247qkp.22.1695210536715; Wed, 20 Sep 2023 04:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695210536; cv=none; d=google.com; s=arc-20160816; b=Ne9i1R7e6cN4NBr6ieTUkS+KsxuNiD6p0JQNuPuuX/WvvOw8/vx5FXffz67oBOqHPy qfF9Y4lfLFvreuxQ2FvpRQbxPuD41ci9U6fYzyx1qvdrrAAAg+Rh9hOH37aMgJlxEsSH Hx0KPQXMWfCspaOCbXFbRW7+stAEJw9mwHBQrEdvyapGjugz8+NWhItvMrAcBo4vQyl1 Psfgm34s88t1tpwqSIwgWpW/9s/UYh+/m/U8q0CDdZbU6tK9mRgz0rK+B34yN6nB8NGQ ey4wHpBPDdLzK9t8gVPC/gODX25GxODH5CTpuBNJeZWji/2GSuEDMRSREhwrb5mtyMFD g42Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:from:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:date; bh=hFhkT1az2WvqAfo23nFj/KExTyktbbmWHTliR7mDzI8=; fh=5qf9frC2/st8HEyI2ZzJQIJIi0h8vBj4yfollNgcOnI=; b=xX89W/T8SFjto7TNjFX65oLasPIWdtzkx265HBiKCK+qZUfg5WzUtxmHgfGyjZ/ibL ulxnqNDNMUAws7qGJNXcqfJKjBTU4iH8eLuMjc86I8k94tHF58hKntP6oNe6ebq5p+A7 rPfttH1VBTNJjU5ojUYI19obEeFItJIyPRVFkE3LKld/CRi263mzp/iZGWru82LwG6f5 SIPjV/uF4bQfCFsDYIJ7qnG7uLaukfVIUx2ODm0VizpgRReid5q2CMW2u/xEdiz0YT18 uAjYwkR8s+laNhORZjQV/JhRE5+QaFcz8bLjGVtFTVgFkNskhjVgP8Nosrmo1Fy+HxKe geiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t4-20020a05620a450400b0076cae48eb5dsi9379183qkp.234.2023.09.20.04.48.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2023 04:48:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nongnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qivgz-0001ry-AT; Wed, 20 Sep 2023 07:48:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qivgx-0001rW-GK; Wed, 20 Sep 2023 07:48:27 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qivgv-0007GL-9o; Wed, 20 Sep 2023 07:48:27 -0400 Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RrGvZ0qnnz6HJc5; Wed, 20 Sep 2023 19:46:18 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Wed, 20 Sep 2023 12:48:04 +0100 Date: Wed, 20 Sep 2023 12:48:03 +0100 To: Klaus Jensen CC: Corey Minyard , Paolo Bonzini , Peter Maydell , Jason Wang , Keith Busch , Lior Weintraub , Jeremy Kerr , Andrew Jeffery , Matt Johnston , Peter Delevoryas , , , , Klaus Jensen Subject: Re: [PATCH v6 0/3] hw/{i2c,nvme}: mctp endpoint, nvme management interface model Message-ID: <20230920124803.00005ae9@Huawei.com> In-Reply-To: <20230914-nmi-i2c-v6-0-11bbb4f74d18@samsung.com> References: <20230914-nmi-i2c-v6-0-11bbb4f74d18@samsung.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Received-SPF: pass client-ip=185.176.79.56; envelope-from=jonathan.cameron@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Jonathan Cameron From: Jonathan Cameron via Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: E26vWl3DFJtk On Thu, 14 Sep 2023 11:53:40 +0200 Klaus Jensen wrote: > This adds a generic MCTP endpoint model that other devices may derive > from. > > Also included is a very basic implementation of an NVMe-MI device, > supporting only a small subset of the required commands. > > Since this all relies on i2c target mode, this can currently only be > used with an SoC that includes the Aspeed I2C controller. > > The easiest way to get up and running with this, is to grab my buildroot > overlay[1] (aspeed_ast2600evb_nmi_defconfig). It includes modified a > modified dts as well as a couple of required packages. > > QEMU can then be launched along these lines: > > qemu-system-arm \ > -nographic \ > -M ast2600-evb \ > -kernel output/images/zImage \ > -initrd output/images/rootfs.cpio \ > -dtb output/images/aspeed-ast2600-evb-nmi.dtb \ > -nic user,hostfwd=tcp::2222-:22 \ > -device nmi-i2c,address=0x3a \ > -serial mon:stdio > > From within the booted system, > > mctp addr add 8 dev mctpi2c15 > mctp link set mctpi2c15 up > mctp route add 9 via mctpi2c15 > mctp neigh add 9 dev mctpi2c15 lladdr 0x3a > mi-mctp 1 9 info > > Comments are very welcome! > > [1]: https://github.com/birkelund/hwtests/tree/main/br2-external > > Signed-off-by: Klaus Jensen Hi Klaus, Silly question, but who is likely to pick this up? + likely to be soon? I'm going to post the CXL stuff that makes use of the core support shortly and whilst I can point at this patch set on list, I'd keen to see it upstream to reduce the dependencies (it's got 2 sets ahead of it of CXL stuff anyway but that will all hopefully go through Michael Tsirkin's tree for PCI stuff in one go). Jonathan > --- > Changes in v6: > - Use nmi_scratch_append() directly where it makes sense. Fixes bug > observed by Andrew. > - Link to v5: https://lore.kernel.org/r/20230905-nmi-i2c-v5-0-0001d372a728@samsung.com > > Changes in v5: > - Added a nmi_scratch_append() that asserts available space in the > scratch buffer. This is a similar defensive strategy as used in > hw/i2c/mctp.c > - Various small fixups in response to review (Jonathan) > - Link to v4: https://lore.kernel.org/r/20230823-nmi-i2c-v4-0-2b0f86e5be25@samsung.com > > --- > Klaus Jensen (3): > hw/i2c: add smbus pec utility function > hw/i2c: add mctp core > hw/nvme: add nvme management interface model > > MAINTAINERS | 7 + > hw/arm/Kconfig | 1 + > hw/i2c/Kconfig | 4 + > hw/i2c/mctp.c | 432 ++++++++++++++++++++++++++++++++++++++++++ > hw/i2c/meson.build | 1 + > hw/i2c/smbus_master.c | 26 +++ > hw/i2c/trace-events | 13 ++ > hw/nvme/Kconfig | 4 + > hw/nvme/meson.build | 1 + > hw/nvme/nmi-i2c.c | 407 +++++++++++++++++++++++++++++++++++++++ > hw/nvme/trace-events | 6 + > include/hw/i2c/mctp.h | 125 ++++++++++++ > include/hw/i2c/smbus_master.h | 2 + > include/net/mctp.h | 35 ++++ > 14 files changed, 1064 insertions(+) > --- > base-commit: 005ad32358f12fe9313a4a01918a55e60d4f39e5 > change-id: 20230822-nmi-i2c-d804ed5be7e6 > > Best regards, From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33541CE79CF for ; Wed, 20 Sep 2023 11:48:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qivgz-0001sW-Pe; Wed, 20 Sep 2023 07:48:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qivgx-0001rW-GK; Wed, 20 Sep 2023 07:48:27 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qivgv-0007GL-9o; Wed, 20 Sep 2023 07:48:27 -0400 Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RrGvZ0qnnz6HJc5; Wed, 20 Sep 2023 19:46:18 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Wed, 20 Sep 2023 12:48:04 +0100 Date: Wed, 20 Sep 2023 12:48:03 +0100 To: Klaus Jensen CC: Corey Minyard , Paolo Bonzini , Peter Maydell , Jason Wang , Keith Busch , Lior Weintraub , Jeremy Kerr , Andrew Jeffery , Matt Johnston , Peter Delevoryas , , , , Klaus Jensen Subject: Re: [PATCH v6 0/3] hw/{i2c,nvme}: mctp endpoint, nvme management interface model Message-ID: <20230920124803.00005ae9@Huawei.com> In-Reply-To: <20230914-nmi-i2c-v6-0-11bbb4f74d18@samsung.com> References: <20230914-nmi-i2c-v6-0-11bbb4f74d18@samsung.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Received-SPF: pass client-ip=185.176.79.56; envelope-from=jonathan.cameron@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Jonathan Cameron From: Jonathan Cameron via Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Thu, 14 Sep 2023 11:53:40 +0200 Klaus Jensen wrote: > This adds a generic MCTP endpoint model that other devices may derive > from. > > Also included is a very basic implementation of an NVMe-MI device, > supporting only a small subset of the required commands. > > Since this all relies on i2c target mode, this can currently only be > used with an SoC that includes the Aspeed I2C controller. > > The easiest way to get up and running with this, is to grab my buildroot > overlay[1] (aspeed_ast2600evb_nmi_defconfig). It includes modified a > modified dts as well as a couple of required packages. > > QEMU can then be launched along these lines: > > qemu-system-arm \ > -nographic \ > -M ast2600-evb \ > -kernel output/images/zImage \ > -initrd output/images/rootfs.cpio \ > -dtb output/images/aspeed-ast2600-evb-nmi.dtb \ > -nic user,hostfwd=tcp::2222-:22 \ > -device nmi-i2c,address=0x3a \ > -serial mon:stdio > > From within the booted system, > > mctp addr add 8 dev mctpi2c15 > mctp link set mctpi2c15 up > mctp route add 9 via mctpi2c15 > mctp neigh add 9 dev mctpi2c15 lladdr 0x3a > mi-mctp 1 9 info > > Comments are very welcome! > > [1]: https://github.com/birkelund/hwtests/tree/main/br2-external > > Signed-off-by: Klaus Jensen Hi Klaus, Silly question, but who is likely to pick this up? + likely to be soon? I'm going to post the CXL stuff that makes use of the core support shortly and whilst I can point at this patch set on list, I'd keen to see it upstream to reduce the dependencies (it's got 2 sets ahead of it of CXL stuff anyway but that will all hopefully go through Michael Tsirkin's tree for PCI stuff in one go). Jonathan > --- > Changes in v6: > - Use nmi_scratch_append() directly where it makes sense. Fixes bug > observed by Andrew. > - Link to v5: https://lore.kernel.org/r/20230905-nmi-i2c-v5-0-0001d372a728@samsung.com > > Changes in v5: > - Added a nmi_scratch_append() that asserts available space in the > scratch buffer. This is a similar defensive strategy as used in > hw/i2c/mctp.c > - Various small fixups in response to review (Jonathan) > - Link to v4: https://lore.kernel.org/r/20230823-nmi-i2c-v4-0-2b0f86e5be25@samsung.com > > --- > Klaus Jensen (3): > hw/i2c: add smbus pec utility function > hw/i2c: add mctp core > hw/nvme: add nvme management interface model > > MAINTAINERS | 7 + > hw/arm/Kconfig | 1 + > hw/i2c/Kconfig | 4 + > hw/i2c/mctp.c | 432 ++++++++++++++++++++++++++++++++++++++++++ > hw/i2c/meson.build | 1 + > hw/i2c/smbus_master.c | 26 +++ > hw/i2c/trace-events | 13 ++ > hw/nvme/Kconfig | 4 + > hw/nvme/meson.build | 1 + > hw/nvme/nmi-i2c.c | 407 +++++++++++++++++++++++++++++++++++++++ > hw/nvme/trace-events | 6 + > include/hw/i2c/mctp.h | 125 ++++++++++++ > include/hw/i2c/smbus_master.h | 2 + > include/net/mctp.h | 35 ++++ > 14 files changed, 1064 insertions(+) > --- > base-commit: 005ad32358f12fe9313a4a01918a55e60d4f39e5 > change-id: 20230822-nmi-i2c-d804ed5be7e6 > > Best regards,