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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 073C0C07E98 for ; Mon, 5 Jul 2021 05:00:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5ACA7610A5 for ; Mon, 5 Jul 2021 05:00:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5ACA7610A5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0GiN-00028m-7j for qemu-devel@archiver.kernel.org; Mon, 05 Jul 2021 01:00:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0Ges-0008TG-Gu; Mon, 05 Jul 2021 00:56:38 -0400 Received: from ozlabs.org ([203.11.71.1]:58529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0Gep-0002Fc-Uv; Mon, 05 Jul 2021 00:56:38 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4GJD191kdLz9sXM; Mon, 5 Jul 2021 14:56:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1625460989; bh=znCPvsaG30plkYy6w8LmyzKWXlS23ny9jtpzagtTiXI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wh4lJkPF1D1k8MPpi/dhAhJaf1rEMSYEcb/rjCsABCswKu2vBMPQHkSdqLfiamUQD TSVaCXRUUU3oNYdf+YreZfHT4hNUyXFvJjpJKRT6wt8/dxCthvU9wirtZcfRbWmZ3R xw3IyMl6bugWfaoCbGTNjGqk/rYWMB1vJ69QTf58= Date: Mon, 5 Jul 2021 14:56:22 +1000 From: David Gibson To: Daniel Henrique Barboza Subject: Re: [PATCH v3 3/3] memory_hotplug.c: send DEVICE_UNPLUG_ERROR in acpi_memory_hotplug_write() Message-ID: References: <20210621205907.244841-1-danielhb413@gmail.com> <20210621205907.244841-4-danielhb413@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DcjfbPMhDcEXqRhi" Content-Disposition: inline In-Reply-To: <20210621205907.244841-4-danielhb413@gmail.com> Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S . Tsirkin" , armbru@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, Igor Mammedov , eblake@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --DcjfbPMhDcEXqRhi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 21, 2021 at 05:59:07PM -0300, Daniel Henrique Barboza wrote: > MEM_UNPLUG_ERROR is deprecated since the introduction of > DEVICE_UNPLUG_ERROR. Keep emitting both while the deprecation of > MEM_UNPLUG_ERROR is pending. >=20 > CC: Michael S. Tsirkin > CC: Igor Mammedov > Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson > --- > hw/acpi/memory_hotplug.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c > index af37889423..fb9f4d2de7 100644 > --- a/hw/acpi/memory_hotplug.c > +++ b/hw/acpi/memory_hotplug.c > @@ -8,6 +8,7 @@ > #include "qapi/error.h" > #include "qapi/qapi-events-acpi.h" > #include "qapi/qapi-events-machine.h" > +#include "qapi/qapi-events-qdev.h" > =20 > #define MEMORY_SLOTS_NUMBER "MDNR" > #define MEMORY_HOTPLUG_IO_REGION "HPMR" > @@ -177,9 +178,17 @@ static void acpi_memory_hotplug_write(void *opaque, = hwaddr addr, uint64_t data, > /* call pc-dimm unplug cb */ > hotplug_handler_unplug(hotplug_ctrl, dev, &local_err); > if (local_err) { > + const char *error_pretty =3D error_get_pretty(local_err); > + > trace_mhp_acpi_pc_dimm_delete_failed(mem_st->selector); > - qapi_event_send_mem_unplug_error(dev->id, > - error_get_pretty(local_= err)); > + > + /* > + * Send both MEM_UNPLUG_ERROR and DEVICE_UNPLUG_ERROR > + * while the deprecation of MEM_UNPLUG_ERROR is > + * pending. > + */ > + qapi_event_send_mem_unplug_error(dev->id, error_pretty); > + qapi_event_send_device_unplug_error(dev->id, error_prett= y); > error_free(local_err); > break; > } --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --DcjfbPMhDcEXqRhi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmDikPYACgkQbDjKyiDZ s5IEOA//c8mcx8Y0dKsxpD1zJhHfh540qqDurRH2VFh4Wh+Zrh/YG+e9nkMNtazE wYbQPfS0bZzu4mqWqjBksiXJSQFwiDZkmAgEo7Z6mq+vaMCX5Tl7ugDSBoJqBQdI bV1mW1GbylLDKXFsQibPylx8tQWto9JkRZtblIwyvAUdlSVfQRzRRQtdyd2HoxDN uYcf8rpU2Hibup7vzScK4bPuInanDeixJZUs9Mglkxtkwe3YfZDjcLCa5W01IwIc WOnQMaGgAnax1pLXrc+Wwktanpf3CV8gsbRttpmfvbqS9SfMwVow1cyIoIRLfCIs 87azTUnnn7gblRWcs2Vvrbxj7ciNja0P2cKuaTQ4gm8mqtQYfOIH7DXmzSG3Lzu3 0TCAQ/rA9WFPO+fr1mn3Swr8GQEK8DfQdBfOrIHF9r1Im9HD5SrKrnd09DqAy0Tw bbrKHGpW2vH96r5/SSCQJgtjvfEaEMzvrT+Qavs3IHhpfRIqvKuRwViOWMTtAC9c LERrFZ+0WrFqaKkgt7q5yxbkG+BYlZstvOPMuFIcp+dZ4vAaMmyYp64LNZw7VGaK 1RUwupXYAp+wX6jesQBl4pFy75gAomcaC895LKDrzjpmOYZ4TMZ8U3zaWWnhGtMG NKy83ODb+2j/7pux0Zm+ZiwIcuK0CMk+IWlPCehPLH3i9h9R2ug= =zlb+ -----END PGP SIGNATURE----- --DcjfbPMhDcEXqRhi--