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 4BA2AC678D4 for ; Thu, 2 Mar 2023 06:44:54 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXcg8-0000pp-28; Thu, 02 Mar 2023 01:44:36 -0500 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 1pXcfr-0000mU-Mm for qemu-devel@nongnu.org; Thu, 02 Mar 2023 01:44:24 -0500 Received: from mga09.intel.com ([134.134.136.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXcfp-0000f3-KP for qemu-devel@nongnu.org; Thu, 02 Mar 2023 01:44:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677739457; x=1709275457; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=oueOD11PCg/91V1I8tHKkro3mAtodyyY/mGuuHrNFaE=; b=gPpDXg72M7bPfoWvtBotRhRaZDijRMABv1CPIJGbXGqZIDaqe88x2UUr Xor/0egDsiLBpDGbhBPbKZ9LEWG/Z/KGkw1zmqoPyXvesYan/IeLrfnk0 uJI5bUlS5x0guruCWG9aA+hAkbRgwnrW9HV25qtVI/QMdGHbEL3mWDhPz 5iiRtbQOV5/LmK/kho6fAgdJUHUWMUw77VGD50sf0j5WW/sTagXvhF3nq JBmyUtfThAnpELAmkDXka2FnhzJEYzhfF5nPbwkIgbkjt9WrULsMrsckS Zh2SV36NT3ja4/6aNaGka68Bnr1vOEp5kzW9JOn+J37xX5/wurZmzCEUl g==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="336134467" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="336134467" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 22:44:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="763890262" X-IronPort-AV: E=Sophos;i="5.98,226,1673942400"; d="scan'208";a="763890262" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP; 01 Mar 2023 22:44:14 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 1 Mar 2023 22:44:13 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Wed, 1 Mar 2023 22:44:13 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 1 Mar 2023 22:44:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CiYPMf0NX9h4r8zTKR/MSs/fLoRpGTTC3oftkxcw8Jlrpgfw4KptJmR6GXu7h67FLd3fdB9seVyCL/hzHiKRRP89rYjwbw/KeOxM1uVvC5hYvPRnsKUlDEcnY6n2VlEW/01BXLIwOu7d20vKbaDLj6KNcya6jfMCallizq/bu2+CImhGpSSwRBpnk1dAtVEJify5sdMaDOkilFSBS3bmCtA5wb42SpzfObhdDLr3k4p56YGFvu9DoyIWq38ZKNNkvpoL3G8WdByt/5JobKq2nrHQ7JDJV1DVHUtJ1Od0XWoCkzqX0K71i3l6Cko9GcOGTqvsVMQTBIIOXvYJgZphOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eIEh/GE+J/i8dtNJ0VsJfaETrpDfuca5DSp+emoFcEA=; b=LUZOPUguBAsi9wZ61by0JD2J+Bcfd96Avx+XeBFlPstfZ0VazVFdwTs37/vUmsCcBwc3xmC9A+Y1ZHgMZT+4V37cCwBj4Mg7XGCdVb5g0x/xDm1jY7Ts8alwVxXJTyfSPJ7OHUloZA6YGdZiLRxtnHN2T/M/yo/TzOfArp+IvbV4SGr9ULRY6pcIKpTVAFiz9feWQYqY8zcAsZEI63etmOfP5zJ/xdqXYRzHErwft1xIqwpBnsERJFKh2XD8u1kKQAINS/e6dM2joG3XxwyX3/LDfPxoXiFG8NOHFZ+rrIT6ZuqF2FOlwVrnILivkVYeLDUGSUaoUICyMbl5/fpEoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) by DM8PR11MB5653.namprd11.prod.outlook.com (2603:10b6:8:25::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.19; Thu, 2 Mar 2023 06:44:11 +0000 Received: from SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::84dd:d3f2:6d99:d7ff]) by SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::84dd:d3f2:6d99:d7ff%7]) with mapi id 15.20.6156.019; Thu, 2 Mar 2023 06:44:11 +0000 Date: Wed, 1 Mar 2023 22:44:07 -0800 From: Ira Weiny To: Jonathan Cameron , , Michael Tsirkin , Fan Ni CC: , , Ira Weiny , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Dave Jiang Subject: Re: [PATCH v3 7/7] hw/cxl/events: Add injection of Memory Module Events Message-ID: <640045b7d503a_3a6b529495@iweiny-mobl.notmuch> References: <20230227173416.7740-1-Jonathan.Cameron@huawei.com> <20230227173416.7740-8-Jonathan.Cameron@huawei.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230227173416.7740-8-Jonathan.Cameron@huawei.com> X-ClientProxiedBy: BY3PR04CA0005.namprd04.prod.outlook.com (2603:10b6:a03:217::10) To SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB6733:EE_|DM8PR11MB5653:EE_ X-MS-Office365-Filtering-Correlation-Id: 72476861-7868-4d64-81a7-08db1ae987c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yR8xNlbZbccUjM4NBhF+skiQscN/ANrXvB64tpFjQKYPAchgX/dx2bSefXYVJz7f2fdO86uhpm0q7R4Z7KT9RH1/+dSO6Mir4E3EHbWtSkCsbB5geDDKjh8eB3bvOt5F5kkMQ4VDqXD8ZS6EVstSE4XAdxKtwIOWgppvmOWnq0/CBUneXyWQ4xMngqP9xzstouOt2syme64GS9YA690oIqE4dOLOwA4x/7qGpIeBwrVUssCEJeqvWN4TffoGEnuE2+U1nTAZMjJ0dZCcUYCdoiGFKQvpZcZSTOI++wz/M/Dsj84nJdtjJ5aJvvdyhN1qmoh3/ypJuiZ1FbIoG92Tjt3XFwhYe1UfgryDzs4iw7OTx35UMnz7q1Z4N2/ebIzVoa7ep+xrKkP2lqu+Sxoj8fQ8tM8GKexWVmEqXkiuffYQKy/tEhqWRsu2TWwD7Njmm7j7nDMbtIDfbbyd7TAM0NDYsRTawWfUirUzpgosp3ZKe8TMd/OoC5Z6YO3RTCB72kDGpy0rOoWlcIuFgWlt2Aa4K+7oNh2uwY1mGso5FHiuWPOuuuZSzLZ4e038RmqRP2E54Wg5lDZqmLL7Vby+GCpdFE4WRI+jGit8ILg23UuBrIw8tpq6iP/pVaovsl4rwBg4+jVUKXMQKdO+tYy9rQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA1PR11MB6733.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(136003)(39860400002)(396003)(366004)(346002)(376002)(451199018)(107886003)(6666004)(38100700002)(8936002)(5660300002)(478600001)(82960400001)(66946007)(86362001)(26005)(186003)(9686003)(6512007)(6506007)(6486002)(66476007)(66556008)(2906002)(44832011)(8676002)(316002)(41300700001)(4326008)(110136005)(54906003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lfLQ+40qTfzI6KLEMhInQ2P4a5e9Wq1nITDrJEmwOhvwM8uIp3NmJRtr7+Rq?= =?us-ascii?Q?Ks/oSe0n/8QzfnFc0ymjTmevvbuHfjIoQ7tjDLE92zy41/XQkbpfcNF3T+ph?= =?us-ascii?Q?z8NKibUSF2sq7gTGOnIlkuAH8oUD6fGUKF5WXbpyWAvkjjfqJ29/hOzpI1w+?= =?us-ascii?Q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Vo0P4MV?= =?us-ascii?Q?n7rJzdhW46gfaFLF+ucrYiJj/FA8OOiC+AcNVltRg9GVWEPjRf+mJs0IFlgu?= =?us-ascii?Q?2cpwDtGQAC2/SV650QLgQg+n6pqykRL3TnaAMTIzw0xQ5VXl+j45qSV/0LFP?= =?us-ascii?Q?GT4ihhsHQ1t874X3cEGnbjSDSACa7OZwA/IBSbO1gWLz4t0yj4gYqla5fNy/?= =?us-ascii?Q?MzaPMmO2UHx0gqCIcHAdh+VBghSaEe8gC6vK6sfoNxhjPO6VyXpmwBs9Q1yz?= =?us-ascii?Q?ItTe6APgiIJGYyOYh7MTF44M93Ggj30yFSfbnd74aQZ+zXSPuMxbuUH7lQGA?= =?us-ascii?Q?cpvUB91ARHfCb2nfmzDL6HGgsLhjry7hyTXIHCXaDezkk0o+q5vAZk3iaENZ?= =?us-ascii?Q?SWcS+ZZpKJNO0tC7VK7yqKGyuXduxd7sr90x/A5J5/M6ALcRpw+F7PX7W5ui?= =?us-ascii?Q?gy+ARyLMmuK7z8mOVgv4+3ubPEp1IR7rV+zv+paW1N0zbrpDfhqGnf5KATGj?= =?us-ascii?Q?iPkDA/xv4kF6ZO8PHIUSBhMPO+9Z2jlA1madYk3/?= X-MS-Exchange-CrossTenant-Network-Message-Id: 72476861-7868-4d64-81a7-08db1ae987c8 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB6733.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2023 06:44:11.4105 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ftDHJdA38++7YdqWFEALSaWSXAEK+z/JZT8MNhKE2bFSzuMofjRVEMR7PN8NNiMhw5jzJ/Q7Atb4dPjiOkcx8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5653 X-OriginatorOrg: intel.com Received-SPF: pass client-ip=134.134.136.24; envelope-from=ira.weiny@intel.com; helo=mga09.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Jonathan Cameron wrote: > These events include a copy of the device health information at the > time of the event. Actually using the emulated device health would > require a lot of controls to manipulate that state. Given the aim > of this injection code is to just test the flows when events occur, > inject the contents of the device health state as well. > > Future work may add more sophisticate device health emulation > including direct generation of these records when events occur > (such as a temperature threshold being crossed). That does not > reduce the usefulness of this more basic generation of the events. Seems very reasonable to me. One spelling issue below. With that. Reviewed-by: Ira Weiny > > Signed-off-by: Jonathan Cameron > --- > hw/mem/cxl_type3.c | 61 +++++++++++++++++++++++++++++++++++++ > hw/mem/cxl_type3_stubs.c | 12 ++++++++ > include/hw/cxl/cxl_events.h | 19 ++++++++++++ > qapi/cxl.json | 35 +++++++++++++++++++++ > 4 files changed, 127 insertions(+) > [...] > diff --git a/qapi/cxl.json b/qapi/cxl.json > index 32f340d972..8b3d30cd71 100644 > --- a/qapi/cxl.json > +++ b/qapi/cxl.json > @@ -90,6 +90,41 @@ > '*column': 'uint16', '*correction-mask': [ 'uint64' ] > }} > > +## > +# @cxl-inject-memory-module-event: > +# > +# Inject an event record for a Memory Module Event (CXL r3.0 8.2.9.2.1.3) > +# This event includes a copy of the Device Health info at the time of > +# the event. > +# > +# @path: CXL type 3 device canonical QOM path > +# @log: Event Log to add the event to > +# @flags: header flags > +# @type: Device Event Type (see spec for permitted values) > +# @health-status: Overall health summary bitmap (see spec for permitted bits) > +# @media-status: Overall media health summary (see spec for permitted values) > +# @additional-status: Complex field (see spec for meaning) > +# @life-used: Percentage (0-100) of factory expected life span > +# @temperature: Device temperature in degrees Celsius > +# @dirty-shutdown-count: Counter incremented whenever device is unable > +# to determine if data loss may have occured. ^^^^^^^^^ occurred Ira