From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D39C915C9 for ; Wed, 14 Aug 2024 12:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723638808; cv=none; b=utRJnAc8ma+8ag1+3hd91XM3UkdbdEH3o06exdRduDbSgM16xMTrbM535H150DoQOGfCEkClExHQTfw+L4uljFu0ocKju6n96l/pcmdKZXoY4umyaWDYI9RbaEMm0EE5pRHl/0b++G3XOXex+OLY7FkyuR/JOW9K219bNLc1gLY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723638808; c=relaxed/simple; bh=DHV2uWE6ni5lA3UiW2HdYQC2TiAck0cpPDIwmsMyMRA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Bn0/Qb6F5QKvBeC+F2Hun+P8KCCI3NmRA7DexPPWumswwfLZnryKTbrlePhHpeHqapWqea1g9Ud3GfIcdoqCq6n3gbguCochZhltXD87X2tOV4k+CKcNcPrBbENDp7TKUayDsHeSebAAZTnLt2f2t7sOeAfUPCT30BdZHiN2ZiQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4WkSJh1Qcmz6K99w; Wed, 14 Aug 2024 20:30:28 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 3A101140A78; Wed, 14 Aug 2024 20:33:23 +0800 (CST) Received: from localhost (10.203.177.66) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 14 Aug 2024 13:33:22 +0100 Date: Wed, 14 Aug 2024 13:33:21 +0100 From: Jonathan Cameron To: Mauro Carvalho Chehab CC: Shiju Jose , "Michael S. Tsirkin" , Ani Sinha , Igor Mammedov , , Subject: Re: [PATCH v7 01/10] acpi/generic_event_device: add an APEI error device Message-ID: <20240814133321.00006401@Huawei.com> In-Reply-To: <0be6db8d06b3abab551f24dcc645d46d72d3f668.1723591201.git.mchehab+huawei@kernel.org> References: <0be6db8d06b3abab551f24dcc645d46d72d3f668.1723591201.git.mchehab+huawei@kernel.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 14 Aug 2024 01:23:23 +0200 Mauro Carvalho Chehab wrote: > Adds a generic error device to handle generic hardware error > events as specified at ACPI 6.5 specification at 18.3.2.7.2: > https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html#event-notification-for-generic-error-sources > using HID PNP0C33. > > The PNP0C33 device is used to report hardware errors to > the guest via ACPI APEI Generic Hardware Error Source (GHES). > > Co-authored-by: Mauro Carvalho Chehab > Co-authored-by: Jonathan Cameron > Signed-off-by: Jonathan Cameron > Signed-off-by: Mauro Carvalho Chehab > Reviewed-by: Igor Mammedov > --- > hw/acpi/aml-build.c | 10 ++++++++++ > hw/acpi/generic_event_device.c | 8 ++++++++ > include/hw/acpi/acpi_dev_interface.h | 1 + > include/hw/acpi/aml-build.h | 2 ++ > include/hw/acpi/generic_event_device.h | 1 + > 5 files changed, 22 insertions(+) > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c > index 6d4517cfbe3d..cb167523859f 100644 > --- a/hw/acpi/aml-build.c > +++ b/hw/acpi/aml-build.c > @@ -2520,3 +2520,13 @@ Aml *aml_i2c_serial_bus_device(uint16_t address, const char *resource_source) > > return var; > } > + > +/* ACPI 5.0: 18.3.2.6.2 Event Notification For Generic Error Sources */ Given this section got a rename maybe the comment should mention old name and current name for the section? > +Aml *aml_error_device(void) > +{ > + Aml *dev = aml_device(ACPI_APEI_ERROR_DEVICE); > + aml_append(dev, aml_name_decl("_HID", aml_string("PNP0C33"))); > + aml_append(dev, aml_name_decl("_UID", aml_int(0))); > + > + return dev; > +} > diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c > index 15b4c3ebbf24..1673e9695be3 100644 > --- a/hw/acpi/generic_event_device.c > +++ b/hw/acpi/generic_event_device.c > @@ -26,6 +26,7 @@ static const uint32_t ged_supported_events[] = { > ACPI_GED_PWR_DOWN_EVT, > ACPI_GED_NVDIMM_HOTPLUG_EVT, > ACPI_GED_CPU_HOTPLUG_EVT, > + ACPI_GED_ERROR_EVT trailing comma missing.