From nobody Sat May 18 22:54:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615579770; cv=none; d=zohomail.com; s=zohoarc; b=HHZVdZMEjvDZ9oaVzyir4bXNIAd0k2OIrGRzWlS/jWXSw2vJ+UqYGtvwksHJkdeUP+KRYn8qsbIGMBojIOJupk1Uw2RD/DSsycBBJ7B1t6U9USaGGYwB6u75T8EilrEVQE1wF2+gNqeKMgwlR/4xoQb0KlwH6PxV7dQVPUQSI8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615579770; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rLOLgIRjpS3Q69hBryUtdykb4swdd9INECJB0dRgMv0=; b=TNC2qxUGbvTJaH62CjsgYGlzMbIx89A0OHD1YLGyvEZMA4vtd8jlUNAIlXGJoyBuUW3MafFGyBwzTPjbtH3K2MNE+PydtKCAuhfgInUrfqTfIGSVBYlY2g0mtm3NEPdSh6i63Mx99joDM6MMGTqEtlzaOJy7zHalmNxpqge8kcA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615579770694115.48858270869744; Fri, 12 Mar 2021 12:09:30 -0800 (PST) Received: from localhost ([::1]:50802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKo6A-0000jM-Kv for importer@patchew.org; Fri, 12 Mar 2021 15:09:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKo4n-0007ky-BY; Fri, 12 Mar 2021 15:08:01 -0500 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]:42658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKo4l-0005Zr-KC; Fri, 12 Mar 2021 15:08:01 -0500 Received: by mail-qk1-x729.google.com with SMTP id z190so25628925qka.9; Fri, 12 Mar 2021 12:07:58 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c7:cc80:21a:fa87:b9b8:5376]) by smtp.gmail.com with ESMTPSA id j24sm5074126qka.67.2021.03.12.12.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 12:07:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rLOLgIRjpS3Q69hBryUtdykb4swdd9INECJB0dRgMv0=; b=hCFiZ7zSe4aYkMdJz4kU2JWfLJsbNdYxf1p+Q8q91xotmWTAqdJlDmzjn2i1/Ghin0 jkXZAXXsa04v3AxzR2K2aEYHdNK3wAdZmqVDxBeciLOq9aJCkB+qKcwhCINxf0wONYRA 8TJZZbW2pxOnRcUZWGT2FP4USUhhpEojCsnqf++y7qvNi1ZqEUsBSvDhAAp6kN9KcVuL 2L57ROEclyOUvKwbQ2DIBCnJYKgHryWVUFj+oeCkPwO6pLOiiTCONfNgl2xiOdT2731x J/yPG4Y30RgOAf/b2oNvbbwAQVK3H4VnQL0TfUywdjah9Yn76CfoPcn6t4bwccCFiAYz FXJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rLOLgIRjpS3Q69hBryUtdykb4swdd9INECJB0dRgMv0=; b=CWPCap9ZYGDwm2cYgIVv7TPQgvK2FFdaL1ng3v/on69WZfNba3lyeAow5wQ+PVZavt h2O2sFn4rOs9b5WRnVkl1J9x7xP7Q/gryy8vE6z0H4RTGploiDckcm15c4XlkIU2c3CR YJ82eMzFl2mMLGP0e1gfBWm58Q/WcF2hTweah4lHfuaEywD54uJzpJvLl4lXgqeVZ36h 35fX4We3TylYaX9PQNKRWpQGpbDaHT7hM6A4cWd0YMfwDwprFqPWFEXmyIQ0LvtILfws t5r/Zs1eDuz4uMirDt+DQSRPm6SgwpovhwmKsp0Ct87Bn1wFz6mVpMWScERWvwOmxoVU /c7w== X-Gm-Message-State: AOAM532AX+4pXk2gptacqyh5aaugP41YiJIRMqdwQ7ba+iyv6qg3n/fM hHhDRzvVctHJmEPnZ0Xce7jMLx/rlro= X-Google-Smtp-Source: ABdhPJxgHE3oQjeoOXzpo+Wou++ASq1ir4NiMlJrw0Aymn68n9WtOnNUCao0x5jDFkKlg+qL51WGqA== X-Received: by 2002:a37:c16:: with SMTP id 22mr14373233qkm.84.1615579678248; Fri, 12 Mar 2021 12:07:58 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH 1/4] qapi/qdev.json: add DEVICE_NOT_DELETED event Date: Fri, 12 Mar 2021 17:07:37 -0300 Message-Id: <20210312200740.815014-2-danielhb413@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210312200740.815014-1-danielhb413@gmail.com> References: <20210312200740.815014-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::729; envelope-from=danielhb413@gmail.com; helo=mail-qk1-x729.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com, Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This new event informs QAPI listeners that a previously issued 'device_del' command failed to delete the device from the machine. Note that no assertion can be made about the failure reason. The goal of this event is to inform management that QEMU is not able to assess whether the hotunplug is taking too long to complete or failed in the guest and, as result, the device is not removed from QOM. When receiving this event, users/management must check inside the guest to verify the result of the hotunplug operation. This scenario happens with architectures where the guest does not have an official way to report the hotunplug error back to the hypervisor, such as PowerPC and the pseries machine type. Signed-off-by: Daniel Henrique Barboza --- qapi/qdev.json | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/qapi/qdev.json b/qapi/qdev.json index b83178220b..df9a1b9e67 100644 --- a/qapi/qdev.json +++ b/qapi/qdev.json @@ -124,3 +124,31 @@ ## { 'event': 'DEVICE_DELETED', 'data': { '*device': 'str', 'path': 'str' } } + +## +# @DEVICE_NOT_DELETED: +# +# Emitted whenever the device removal process expired and the device +# still exists in QOM. This indicates that the guest took too long +# to acknowlege the device removal, and we can not be sure of whether +# the process will be completed in the guest later on or a guest +# side error occurred. +# +# It is not safe to reuse the specified device ID. +# +# @device: device name +# +# @path: device path +# +# Since: 6.0 +# +# Example: +# +# <- { "event": "DEVICE_NOT_DELETED", +# "data": { "device": "core1", +# "path": "/machine/peripheral/core1" }, +# "timestamp": { "seconds": 1615570254, "microseconds": 573986 } } +# +## +{ 'event': 'DEVICE_NOT_DELETED', + 'data': { '*device': 'str', 'path': 'str' } } \ No newline at end of file --=20 2.29.2 From nobody Sat May 18 22:54:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615579979; cv=none; d=zohomail.com; s=zohoarc; b=jINFwL0k5zQNXQKy1rcu+7VT4yKz/Ij8R2EKaiNYIpMt9UCW54/GzPBPdTrF1jBASzaypdK12BOcfHBvURUwrPovUx/xUExibNamIOQ9XgXE3T3rlsm0ZSqRi6Xq0CdvBdELS0Nzz8GDrd6v+yjryC9OBldc/0ZlhPFFbYE/KwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615579979; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tjkiypVj/VONiqsfJbI2gXY78Zz9NiDgUTTpy2xzkdQ=; b=D6IiaoLVq99iT19lyRIzpTs6X8ztUswBZzdETQL3s7xGKy+IdgjfusWET/1vZrEbVo2OHi886fRA7xUdDxXTgToAj0VxPJ1yam56CbfkmkAVnAHgoB9LLxG4i3+M0iCvio8C6O6fxeeCpryKZZU071FyMGK1PmjhSVPYqcM+t08= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615579979094633.0993200906004; Fri, 12 Mar 2021 12:12:59 -0800 (PST) Received: from localhost ([::1]:56806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKo9Z-0003DV-Pf for importer@patchew.org; Fri, 12 Mar 2021 15:12:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKo4p-0007nx-OW; Fri, 12 Mar 2021 15:08:03 -0500 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]:40686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKo4o-0005cH-2z; Fri, 12 Mar 2021 15:08:03 -0500 Received: by mail-qk1-x72c.google.com with SMTP id l132so25662832qke.7; Fri, 12 Mar 2021 12:08:01 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c7:cc80:21a:fa87:b9b8:5376]) by smtp.gmail.com with ESMTPSA id j24sm5074126qka.67.2021.03.12.12.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 12:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tjkiypVj/VONiqsfJbI2gXY78Zz9NiDgUTTpy2xzkdQ=; b=UxHgn4fvnDZOyq0w6XLP/NKRzSWyG+Z5Cx8AJepugOSKV0fQpDGymqb+vjfwMmgDRP XlClKVQNxyPi4KSOdmaQsUSR/2vSlj8N6LpA1CVScx7GkrwwE79LCyiAHpdnVN9DIBDD wSLnepS72haf4Dd4/SDmH+hnqSSO3qmGINC3pHifppsYBGg5GljgnbKXIyeWmgjbnh7o mWhWgS/o7ze+f5Rd0iw2plnZWBJM9vlVQiNZEbqPd7/A3FTDrxDRUazSu7mgBaYbNsnV KL5Xycm8vPn7P58gUzu6Hoya0VnqFLoXOQuB2inZsu7zqKSvX/ohJcvYrdbVcXMQFpYy HCng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tjkiypVj/VONiqsfJbI2gXY78Zz9NiDgUTTpy2xzkdQ=; b=Q6f/dFtHPtnj7dvNinmSqSRQR0Jnyk4fjMWDUBg5VPMT397OKUjqQYtNYIXmrFJtqZ TITLxxLiJecqzRWoz0WQxpP2fpMHOnrs6dUWuTgCAsWgyJaOLEAhyOAWYyNzlrn0D+Fp H48aIjGxPsn3hs27uTpQEoDrNIExQ0xuJd6guZJeG0OZHCmX2EdOQg4TzB75P1Z+RAl7 VqVDfuAK9mabsoL8PUGNecNTfU2tgFvh7z4bLTImshWMj+vohDCKV7Kq090ZeJKpeC7n 5DPTRkxMVQWe0qwI5xavEPpjbDuJBJM1i6+XAjpxrniQoPI++hjNTgrqPUkPO0UoV9CH LY8A== X-Gm-Message-State: AOAM533sjpsX+rwc9Unu+HNOy2SAYE0B/lRb0vaYWj2rK2J0Zo0/Xwuu vDj6WJ7pdun1LufXVrkGN+6tkdvfoPA= X-Google-Smtp-Source: ABdhPJwaDUTF+e/3viEUSUQvJCeaM1YjP9jA1YEbQ5yBD5Qroax6S97LOE5D8CyOW31QBt6WtVJhOw== X-Received: by 2002:a05:620a:1323:: with SMTP id p3mr14080163qkj.175.1615579680519; Fri, 12 Mar 2021 12:08:00 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH 2/4] spapr_drc.c: send DEVICE_NOT_DELETED event on unplug timeout Date: Fri, 12 Mar 2021 17:07:38 -0300 Message-Id: <20210312200740.815014-3-danielhb413@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210312200740.815014-1-danielhb413@gmail.com> References: <20210312200740.815014-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::72c; envelope-from=danielhb413@gmail.com; helo=mail-qk1-x72c.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com, Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The newly added DEVICE_NOT_DELETED QAPI event is adequate to be sent when the hotunplug timeout expires, letting users know that something happened inside the guest and the pseries machine didn't delete the device from QOM. After this patch, if an user try to hotunplug the last online CPU of the guest, the "DEIVCE_NOT_DELETED" event will be issued when the hotunplug timeout for 'core1' is expired: {"execute": "device_del", "arguments": {"id": "core1"} } {"return": {}} {"execute": "device_del", "arguments": {"id": "core1"} } {"error": {"class": "GenericError", "desc": "core-id 1 unplug is still pending, 12 seconds timeout r= emaining"}} {"execute": "device_del", "arguments": {"id": "core1"} } {"error": {"class": "GenericError", "desc": "core-id 1 unplug is still pending, 5 seconds timeout re= maining"}} {"timestamp": {"seconds": 1615570254, "microseconds": 573986}, "event": "DEVICE_NOT_DELETED", "data": {"device": "core1", "path": "/machine/peripheral/core1"}} Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr_drc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 8a71b03800..14f39cec71 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/qmp/qnull.h" +#include "qapi/qapi-events-qdev.h" #include "cpu.h" #include "qemu/cutils.h" #include "hw/ppc/spapr_drc.h" @@ -529,9 +530,16 @@ static const VMStateDescription vmstate_spapr_drc =3D { static void drc_unplug_timeout_cb(void *opaque) { SpaprDrc *drc =3D opaque; + DeviceState *dev =3D drc->dev; =20 if (drc->unplug_requested) { drc->unplug_requested =3D false; + + if (dev) { + qapi_event_send_device_not_deleted(!!dev->id, + dev->id, + dev->canonical_path); + } } } =20 --=20 2.29.2 From nobody Sat May 18 22:54:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615580277; cv=none; d=zohomail.com; s=zohoarc; b=TDSgqyg1cIwDx3xMvGN/AeDVuIilL0lEzi3TTRRxdoMLr41pVNbZ/rz1Ag87jUuSKrBRHbIUe6MJg8QQTHLDe+MuigILoRh4qst6dX4n6iCcZtqWrKcn6xl+JoYVrqxq3pWg2lvRy5BZiwuN/rfE4kA66S+77KJLF4lPmf+HMBU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615580277; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nHzpNXK2Bgd5WqEFdnHbZIvX/mwQqXVui82vjvFUpvU=; b=EvRk63OFwdf0s1bDkJt5EwgyeHaLkjt1+Uc0R4mIkQjMaJEIaX0rvS417P3hGaBIN7PzXmWBwDW7Yksp+xGUv+8+MQs5klh+uJivAyxqUwK5fo0MelfobtQYlToDqDQIq1VpLOhnZRkyglEBvuoF+rHjBn3HGA96dOHVssL9svY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615580277385682.9357539563885; Fri, 12 Mar 2021 12:17:57 -0800 (PST) Received: from localhost ([::1]:33930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKoEO-00008r-AQ for importer@patchew.org; Fri, 12 Mar 2021 15:17:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKo4r-0007sk-Uh; Fri, 12 Mar 2021 15:08:05 -0500 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:42664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKo4q-0005eU-Bu; Fri, 12 Mar 2021 15:08:05 -0500 Received: by mail-qk1-x72f.google.com with SMTP id z190so25629149qka.9; Fri, 12 Mar 2021 12:08:03 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c7:cc80:21a:fa87:b9b8:5376]) by smtp.gmail.com with ESMTPSA id j24sm5074126qka.67.2021.03.12.12.08.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 12:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nHzpNXK2Bgd5WqEFdnHbZIvX/mwQqXVui82vjvFUpvU=; b=tFSs7pf5o4lsUDyUGibb6mBoUlj/H16VV+Z7HFN5z2R/NzYJxXyUF0+lNMvSjA2H7y DcQwziD7uMHjmGzUvgwZDa82/w0Wc13eKt/hnhD4wTLgLyAaBTWC1FWOLf8T/m6xo4Qk 2kIFzn1T95siFf4hpDwa+JrpR0lMSn+fgBmFk5dop/mLBsgQWyWNh6/7h6Od9abBWoCe GsmwjBpGQlIbN5AHqAHAQ/W+EoEbCPx2iuMY4s1ivVuSYq8+FrV6tTH5ZscDVwP9NOAw OfyN0B0KazZKe1uf4dGlZMxphbgQF4Wa5CojHa1Lvv6xvpsrU95m6xdMkOgfkrAmqJ1Q s5bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nHzpNXK2Bgd5WqEFdnHbZIvX/mwQqXVui82vjvFUpvU=; b=hNVYckSOCtNiobG1aI2s0eILzFzoN5U8xMmoRIH9Vt6sefKu4UAyFEDEXYprkCAjb/ xmYAtRG2jFWhKbTqj6ds0YrPXaZUAtcGm2ApfxgG483o5x1pM3JS1bAxmlSbSn6MWfoS FVlmI/TSaC3AJuxmbMduOCw7U+hD/OWy3qjZIdWukp+Ag0Xyicz8RxKe6oXeHkLPSD09 nyh+hJm9jSqVGSrGa+mXZ+g2cC0CclITuHDcpQBp4fAU2XpQGDLooCndB9wRdIycxx1M /CeDzlnsLmHyRzkGaGslyxXIwd5r8hiPr4NDq8TsCAXtHI6ws7vwoXivVfNGC2+FkKnn vnHw== X-Gm-Message-State: AOAM533FZ+Tl6hFqII4mqZHx24VzCAy/tXBVV2v1Mpt5yD7UTLCkl96S k/5M/MgYAA9QuKWVMRpIX7a2ujEfU4k= X-Google-Smtp-Source: ABdhPJz/0NPG5KiSVtjN5GDr7H5RVhpiNze17akmvVr6pKiF+RamRvpmFbQnBvsgYWYzqGCQdfdUXg== X-Received: by 2002:a37:424e:: with SMTP id p75mr14239932qka.341.1615579682927; Fri, 12 Mar 2021 12:08:02 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH 3/4] qapi/machine.json: add DEVICE_UNPLUG_ERROR QAPI event Date: Fri, 12 Mar 2021 17:07:39 -0300 Message-Id: <20210312200740.815014-4-danielhb413@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210312200740.815014-1-danielhb413@gmail.com> References: <20210312200740.815014-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=danielhb413@gmail.com; helo=mail-qk1-x72f.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com, Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" At this moment we only provide one event to report a hotunplug error, MEM_UNPLUG_ERROR. There will be other device types that are going to be throwing unplug errors in the future though. Instead of creating a (device_type)_UNPLUG_ERROR for each new device, create a generic DEVICE_UNPLUG_ERROR event that can be used by all unplug errors in the future. Signed-off-by: Daniel Henrique Barboza --- qapi/machine.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/qapi/machine.json b/qapi/machine.json index 330189efe3..9b2c93aad3 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1471,3 +1471,26 @@ ## { 'event': 'MEM_UNPLUG_ERROR', 'data': { 'device': 'str', 'msg': 'str' } } + +## +# @DEVICE_UNPLUG_ERROR: +# +# Emitted when a device hot unplug error occurs. +# +# @device: device name +# +# @msg: Informative message +# +# Since: 6.0 +# +# Example: +# +# <- { "event": "DEVICE_UNPLUG_ERROR" +# "data": { "device": "dimm1", +# "msg": "Memory hotunplug rejected by the guest for device= dimm1" +# }, +# "timestamp": { "seconds": 1615570772, "microseconds": 202844 } } +# +## +{ 'event': 'DEVICE_UNPLUG_ERROR', + 'data': { 'device': 'str', 'msg': 'str' } } \ No newline at end of file --=20 2.29.2 From nobody Sat May 18 22:54:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615580176; cv=none; d=zohomail.com; s=zohoarc; b=VUdIjxGMcQyhyh5fq6k7Q9mgJPoF/cd5chkahKXK7A+RHByGdyU2wUg0l+f3xDhm1kmXJ8jUUxcEdaYq65JuZ0huFG607wOGyxvUO4bnPPDGvasyQz3Uj6lbu9dHUXK2z/HNC8baFuwQ0pAJvouVoPUYGxrmU41DXl8EqmsviCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615580176; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=h4euZu88pDlQtkYGkvefUZ+xefeYqAFQh4NY7T6v41s=; b=my+mUiygHsUQU1l+9B3/HStFQKmTbdjMiiJQCtBSMw+25tw1b9gb+61SpSwUv+PEokiJYOUSi66uq3EtDY/FJcKMYWs7EdvErelZsIQowU39QZkkcboQJqgH6WOjIlxNFooI6LHyX7jjluf5jhomzwZzE5bBT3QcwNfd6UFYqes= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615580176256572.1255204355795; Fri, 12 Mar 2021 12:16:16 -0800 (PST) Received: from localhost ([::1]:59512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKoCl-0006xo-9F for importer@patchew.org; Fri, 12 Mar 2021 15:16:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKo4u-0007xq-87; Fri, 12 Mar 2021 15:08:08 -0500 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:45925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKo4s-0005fU-O7; Fri, 12 Mar 2021 15:08:07 -0500 Received: by mail-qt1-x82c.google.com with SMTP id u7so4789326qtq.12; Fri, 12 Mar 2021 12:08:05 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c7:cc80:21a:fa87:b9b8:5376]) by smtp.gmail.com with ESMTPSA id j24sm5074126qka.67.2021.03.12.12.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 12:08:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h4euZu88pDlQtkYGkvefUZ+xefeYqAFQh4NY7T6v41s=; b=sEXivPAcl1QSD7o2FO9BcXM+S9cj65JbWMeUgGSYryZCKEXRP8Q6jR60gmATflQ4OL CpApPDGfCXkIuLYe03GGApU+s8Kw4ukBfdLvj/x2eBgxGE6SweX36jSZYosyWQo4JLe7 rRHyDWlLXKPtJAEoaCPgEEaFOjOjpM79PUUgSartIT77uWqVoHYFgp47wak43XoL6lGO rl9HXdynCZXCxFI7t67i+kRqJtaEs4CGHIypfkxEr0GPV95uqZ99f9+7WRtESCTIN3H6 o0W58vVUfpRpz4L7O4rzCnezWu6adY/VmEVHDOew3/Gdmvlb/lWYOx9un/nhT0R7UV/U mjxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h4euZu88pDlQtkYGkvefUZ+xefeYqAFQh4NY7T6v41s=; b=i96+SJNYSEMaIO0ouxkZ7QQhLSEOluZUfWD9LB5rj2+KgT6AsK/8JZ0gq40w+1zqbE StSRjHSfc9X9IlLMZMCbG9C5jU0aZbFhYvB3x6IsaFEyd/YGFQIs4hATllWNEntJZuN3 Kex+Vxp8mJbNcW/Iwvz6toyVTs2S3dPSqREqbRfRapbV4bOxKBlOEUy/eAEmbqr8eCtf hkhWNOBz3/3pHDbgsnb8z09DDJb0LAqquidLzm+jCIY0KfljTNIRkZIzU3kNx13aqdHR rj6eqE1PwV/o0Yjmd5bgiN7AjZuoQoMpvaO1fULku1PoEbKS4jE2ltbat7gGbfdYY9Ab jk5g== X-Gm-Message-State: AOAM531Zy3wtsHd0xFO95AF1ApAfgg54dcfNz5saI1Y6m9LTlYwNSp26 dy6NUxvoc7bCsUwn3XUnhT0++QEI5Hc= X-Google-Smtp-Source: ABdhPJxZs01HVwY431kn4/7Y1SyGC3WWz01VUiKTojG3bQKs75G+uUzDM4KcKVUWPTrZhxOo96zGaw== X-Received: by 2002:aed:2f65:: with SMTP id l92mr1224927qtd.193.1615579685302; Fri, 12 Mar 2021 12:08:05 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH 4/4] spapr.c: use DEVICE_UNPLUG_ERROR event in spapr_memory_unplug_rollback() Date: Fri, 12 Mar 2021 17:07:40 -0300 Message-Id: <20210312200740.815014-5-danielhb413@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210312200740.815014-1-danielhb413@gmail.com> References: <20210312200740.815014-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::82c; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x82c.google.com 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, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com, Daniel Henrique Barboza , qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Other device types in the pseries machine will use DEVICE_UNPLUG_ERROR to report hotunplug errors. Use it to report the memory hotunplug error in spapr_memory_unplug_rollback() as well. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d56418ca29..697664e72f 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3624,7 +3624,7 @@ void spapr_memory_unplug_rollback(SpaprMachineState *= spapr, DeviceState *dev) */ qapi_error =3D g_strdup_printf("Memory hotunplug rejected by the guest= " "for device %s", dev->id); - qapi_event_send_mem_unplug_error(dev->id, qapi_error); + qapi_event_send_device_unplug_error(dev->id, qapi_error); } =20 /* Callback to be called during DRC release. */ --=20 2.29.2