qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Markus Armbruster <armbru@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, groug@kaod.org
Subject: Re: [PATCH v7 5/7] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event
Date: Mon, 6 Sep 2021 09:40:47 -0300	[thread overview]
Message-ID: <3dad103a-0019-2643-815a-ac9fb08b743e@gmail.com> (raw)
In-Reply-To: <874kb0pnlq.fsf@dusky.pond.sub.org>



On 9/4/21 8:49 AM, Markus Armbruster wrote:
> David Gibson <david@gibson.dropbear.id.au> writes:
> 
>> On Wed, Sep 01, 2021 at 03:19:26PM +0200, Markus Armbruster wrote:
>>> Daniel Henrique Barboza <danielhb413@gmail.com> writes:
>>>
>>>> At this moment we only provide one event to report a hotunplug error,
>>>> MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries
>>>> machine is now able to report unplug errors for other device types, such
>>>> as CPUs.
>>>>
>>>> Instead of creating a (device_type)_UNPLUG_ERROR for each new device,
>>>> create a generic DEVICE_UNPLUG_GUEST_ERROR event that can be used by all
>>>> guest side unplug errors in the future. This event has a similar API as
>>>> the existing DEVICE_DELETED event, always providing the QOM path of the
>>>> device and dev->id if there's any.
>>>>
>>>> With this new generic event, MEM_UNPLUG_ERROR is now marked as deprecated.
>>>>
>>>> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
>>>> ---
>>>
>>> [...]
>>>
>>>> diff --git a/qapi/qdev.json b/qapi/qdev.json
>>>> index 0e9cb2ae88..8b1a1dd43b 100644
>>>> --- a/qapi/qdev.json
>>>> +++ b/qapi/qdev.json
>>>> @@ -84,7 +84,9 @@
>>>>   #        This command merely requests that the guest begin the hot removal
>>>>   #        process.  Completion of the device removal process is signaled with a
>>>>   #        DEVICE_DELETED event. Guest reset will automatically complete removal
>>>> -#        for all devices.
>>>> +#        for all devices.  If a guest-side error in the hot removal process is
>>>> +#        detected, the device will not be removed and a DEVICE_UNPLUG_GUEST_ERROR
>>>> +#        event is sent.  Some errors cannot be detected.
>>>>   #
>>>>   # Since: 0.14
>>>>   #
>>>> @@ -124,3 +126,27 @@
>>>>   ##
>>>>   { 'event': 'DEVICE_DELETED',
>>>>     'data': { '*device': 'str', 'path': 'str' } }
>>>> +
>>>> +##
>>>> +# @DEVICE_UNPLUG_GUEST_ERROR:
>>>> +#
>>>> +# Emitted when a device hot unplug fails due to an internal guest
>>>> +# error.
>>>
>>> Suggest to scratch "internal".
>>
>> I'd suggest s/internal guest/guest reported/.  "guest error" is a bit
>> vague, this doesn't neccessarily indicate a bug in the guest.  The key
>> point is that we're reporting this event because the guest performed
>> some explicit action to tell us something went wrong with the plug
>> attempt.
> 
> Yes, that's better.


I agree.  David, let me know if you need another spin with this change.



Thanks,


Daniel

> 
> [...]
> 


  reply	other threads:[~2021-09-06 12:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  0:48 [PATCH v7 0/7] DEVICE_UNPLUG_GUEST_ERROR QAPI event Daniel Henrique Barboza
2021-08-25  0:48 ` [PATCH v7 1/7] memory_hotplug.c: handle dev->id = NULL in acpi_memory_hotplug_write() Daniel Henrique Barboza
2021-08-25  3:49   ` David Gibson
2021-08-25 12:12   ` Igor Mammedov
2021-08-25 13:47   ` Greg Kurz
2021-08-25  0:48 ` [PATCH v7 2/7] spapr.c: handle dev->id in spapr_memory_unplug_rollback() Daniel Henrique Barboza
2021-08-25  3:49   ` David Gibson
2021-08-25 13:51   ` Greg Kurz
2021-08-25  0:48 ` [PATCH v7 3/7] spapr_drc.c: do not error_report() when drc->dev->id == NULL Daniel Henrique Barboza
2021-08-25  3:50   ` David Gibson
2021-08-25  0:48 ` [PATCH v7 4/7] qapi/qdev.json: fix DEVICE_DELETED parameters doc Daniel Henrique Barboza
2021-08-25  3:50   ` David Gibson
2021-08-25  0:48 ` [PATCH v7 5/7] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event Daniel Henrique Barboza
2021-08-25  3:53   ` David Gibson
2021-08-25 13:53   ` Greg Kurz
2021-09-01 13:19   ` Markus Armbruster
2021-09-04  3:53     ` David Gibson
2021-09-04 11:49       ` Markus Armbruster
2021-09-06 12:40         ` Daniel Henrique Barboza [this message]
2021-09-06 23:24           ` David Gibson
2021-08-25  0:48 ` [PATCH v7 6/7] spapr: use DEVICE_UNPLUG_GUEST_ERROR to report unplug errors Daniel Henrique Barboza
2021-08-25  3:54   ` David Gibson
2021-08-25  0:48 ` [PATCH v7 7/7] memory_hotplug.c: send DEVICE_UNPLUG_GUEST_ERROR in acpi_memory_hotplug_write() Daniel Henrique Barboza
2021-08-25  3:55   ` David Gibson
2021-08-25 12:14   ` Igor Mammedov
2021-08-30 22:21   ` Michael S. Tsirkin
2021-09-01 13:20 ` [PATCH v7 0/7] DEVICE_UNPLUG_GUEST_ERROR QAPI event Markus Armbruster
2021-09-22 11:56 ` Markus Armbruster
2021-09-22 12:03   ` Markus Armbruster
2021-09-24  2:15     ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3dad103a-0019-2643-815a-ac9fb08b743e@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).