All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, wenchaoqemu@gmail.com
Subject: Re: [Qemu-devel] [PATCH v3] qmp: add ACPI_DEVICE_OST event handling
Date: Sun, 22 Jun 2014 08:58:50 +0300	[thread overview]
Message-ID: <20140622055850.GA13824@redhat.com> (raw)
In-Reply-To: <1403253206-11133-1-git-send-email-imammedo@redhat.com>

On Fri, Jun 20, 2014 at 10:33:26AM +0200, Igor Mammedov wrote:
> emits event when ACPI OSPM evaluates _OST method
> of ACPI device.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>

The subject and commit log are confusing here.
We already have
	Author: Igor Mammedov <imammedo@redhat.com>
	    qmp: add ACPI_DEVICE_OST event handling

So I am guessing this reworks existing functionality
to use the new QMP infrastructure.
Please rewrite both subject and commit log.


> ---
> v2:
>  - use new QAPI event infrastructure
>       from rebased PCI tree on top of today's QMP pull request
> ---
>  hw/acpi/memory_hotplug.c |    7 ++++++-
>  qapi-event.json          |   10 ++++++++++
>  2 files changed, 16 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
> index e7009bc..38ca415 100644
> --- a/hw/acpi/memory_hotplug.c
> +++ b/hw/acpi/memory_hotplug.c
> @@ -3,6 +3,7 @@
>  #include "hw/mem/pc-dimm.h"
>  #include "hw/boards.h"
>  #include "trace.h"
> +#include "qapi-event.h"
>  
>  static ACPIOSTInfo *acpi_memory_device_status(int slot, MemStatus *mdev)
>  {
> @@ -88,6 +89,7 @@ static void acpi_memory_hotplug_write(void *opaque, hwaddr addr, uint64_t data,
>  {
>      MemHotplugState *mem_st = opaque;
>      MemStatus *mdev;
> +    ACPIOSTInfo *info;
>  
>      if (!mem_st->dev_count) {
>          return;
> @@ -119,8 +121,11 @@ static void acpi_memory_hotplug_write(void *opaque, hwaddr addr, uint64_t data,
>          mdev = &mem_st->devs[mem_st->selector];
>          mdev->ost_status = data;
>          trace_mhp_acpi_write_ost_status(mem_st->selector, mdev->ost_status);
> -        /* TODO: report async error */
>          /* TODO: implement memory removal on guest signal */
> +
> +        info = acpi_memory_device_status(mem_st->selector, mdev);
> +        qapi_event_send_acpi_device_ost(info, &error_abort);
> +        qapi_free_ACPIOSTInfo(info);
>          break;
>      case 0x14:
>          mdev = &mem_st->devs[mem_st->selector];
> diff --git a/qapi-event.json b/qapi-event.json
> index fbdda48..6876327 100644
> --- a/qapi-event.json
> +++ b/qapi-event.json
> @@ -304,3 +304,13 @@
>  { 'event': 'QUORUM_REPORT_BAD',
>    'data': { '*error': 'str', 'node-name': 'str',
>              'sector-num': 'int', 'sector-count': 'int' } }
> +
> +##
> +# @ACPI_DEVICE_OST
> +#
> +# Emitted when guest executes ACPI _OST method.
> +#
> +# @info: ACPIOSTInfo type as described in qapi-schema.json
> +##
> +{ 'event': 'ACPI_DEVICE_OST',
> +     'data': { 'info': 'ACPIOSTInfo' } }
> -- 
> 1.7.1

  parent reply	other threads:[~2014-06-22  5:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20  8:33 [Qemu-devel] [PATCH v3] qmp: add ACPI_DEVICE_OST event handling Igor Mammedov
2014-06-20 15:46 ` Eric Blake
2014-06-20 23:47   ` Wenchao Xia
2014-06-23  9:52     ` Markus Armbruster
2014-06-23 15:56     ` Eric Blake
2014-06-22  5:58 ` Michael S. Tsirkin [this message]
2014-06-23 15:59   ` Eric Blake
2014-06-23 17:17     ` Eric Blake

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=20140622055850.GA13824@redhat.com \
    --to=mst@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wenchaoqemu@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.