Message ID | 53A49053.5080606@redhat.com |
---|---|
State | New |
Headers | show |
On 06/20/2014 01:49 PM, Paolo Bonzini wrote: > > As I explained on IRC, many patches when rebased would have conflicts > with Igor's new event. I think this is much more complex than having > an "extraordinary" merge commit. > > I include the conflict resolution: > > - hw/acpi/memory-hotplug.c is only present in mst's branch, so I'm > including the diff from there (changing to the QAPI event style) > > - qapi-event.json is only present in luiz's branch, so I'm > including the diff from there (adding the ACPI_DEVICE_OST event) One other alternative would have been to pull out the new ACPI_DEVICE_OST patches out of mst's branch, and upgrade them to Igor's v3 which applies on top of Wenchao's work: https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg04927.html > > - > Paolo > > a76d72f692ed5f4f30f116cc9c3ac5fefe221cb7 > Merge: 0a99aae b98ff90 > Author: Paolo Bonzini <pbonzini@redhat.com> > Date: Fri Jun 20 21:18:08 2014 +0200 > > Merge commit b98ff90e9459e0113da8502c03670a9539f90aa1 of git://repo.or.cz/qemu/qmp-unstable into HEAD > > Conflicts: > docs/qmp/qmp-events.txt [removed with QAPI event conversion] > hw/core/qdev.c [trivial header file conflict] > include/monitor/monitor.h [QMP event enum removed by QAPI conversion] > monitor.c [QMP event enum removed by QAPI conversion] > qapi-schema.json [trivial, code added by both sides in the same place] > qemu-char.c [trivial, code added by both sides in the same place] > vl.c [trivial header file conflict] > > Other files changed: > qapi-event.json [include ACPI_DEVICE_OST event] > hw/acpi/memory-hotplug.c [use QAPI event] > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> If you are okay taking this complex merge patch, you can add: Reviewed-by: Eric Blake <eblake@redhat.com>
于 2014/6/21 4:02, Eric Blake 写道: > On 06/20/2014 01:49 PM, Paolo Bonzini wrote: > >> >> As I explained on IRC, many patches when rebased would have conflicts >> with Igor's new event. I think this is much more complex than having >> an "extraordinary" merge commit. >> >> I include the conflict resolution: >> >> - hw/acpi/memory-hotplug.c is only present in mst's branch, so I'm >> including the diff from there (changing to the QAPI event style) >> >> - qapi-event.json is only present in luiz's branch, so I'm >> including the diff from there (adding the ACPI_DEVICE_OST event) > > One other alternative would have been to pull out the new > ACPI_DEVICE_OST patches out of mst's branch, and upgrade them to Igor's > v3 which applies on top of Wenchao's work: > https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg04927.html > So which way to go now? >> >> - >> Paolo >> >> a76d72f692ed5f4f30f116cc9c3ac5fefe221cb7 >> Merge: 0a99aae b98ff90 >> Author: Paolo Bonzini <pbonzini@redhat.com> >> Date: Fri Jun 20 21:18:08 2014 +0200 >> >> Merge commit b98ff90e9459e0113da8502c03670a9539f90aa1 of git://repo.or.cz/qemu/qmp-unstable into HEAD >> >> Conflicts: >> docs/qmp/qmp-events.txt [removed with QAPI event conversion] >> hw/core/qdev.c [trivial header file conflict] >> include/monitor/monitor.h [QMP event enum removed by QAPI conversion] >> monitor.c [QMP event enum removed by QAPI conversion] >> qapi-schema.json [trivial, code added by both sides in the same place] >> qemu-char.c [trivial, code added by both sides in the same place] >> vl.c [trivial header file conflict] >> >> Other files changed: >> qapi-event.json [include ACPI_DEVICE_OST event] >> hw/acpi/memory-hotplug.c [use QAPI event] >> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > > If you are okay taking this complex merge patch, you can add: > > Reviewed-by: Eric Blake <eblake@redhat.com> >
On 06/24/2014 07:08 AM, Wenchao Xia wrote: > 于 2014/6/21 4:02, Eric Blake 写道: >> On 06/20/2014 01:49 PM, Paolo Bonzini wrote: >> >>> >>> As I explained on IRC, many patches when rebased would have conflicts >>> with Igor's new event. I think this is much more complex than having >>> an "extraordinary" merge commit. >>> >>> I include the conflict resolution: >>> >>> - hw/acpi/memory-hotplug.c is only present in mst's branch, so I'm >>> including the diff from there (changing to the QAPI event style) >>> >>> - qapi-event.json is only present in luiz's branch, so I'm >>> including the diff from there (adding the ACPI_DEVICE_OST event) >> >> One other alternative would have been to pull out the new >> ACPI_DEVICE_OST patches out of mst's branch, and upgrade them to Igor's >> v3 which applies on top of Wenchao's work: >> https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg04927.html >> > > So which way to go now? Rebase your cleanups on to of this PULL request: https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg05424.html
On 24 June 2014 14:20, Eric Blake <eblake@redhat.com> wrote: > Rebase your cleanups on to of this PULL request: > https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg05424.html I just applied that, so "rebase on top of master"... thanks -- PMM
于 2014/6/24 21:24, Peter Maydell 写道: > On 24 June 2014 14:20, Eric Blake <eblake@redhat.com> wrote: >> Rebase your cleanups on to of this PULL request: >> https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg05424.html > > I just applied that, so "rebase on top of master"... > There is a test broken due to CompatGMutex in test_qmp_event.c, and using CompatGMutest instead of simple GStaticMutex is caused by patch: commit 86946a2d835614050b90bc8e5c82982fe45deff2: Author: Michael Tokarev <mjt@tls.msk.ru> glib-compat.h: add new thread API emulation on top of pre-2.31 API It seems cond->once.retval never get a chance to be allocated before g_mutex_lock(), a bug? > thanks > -- PMM >
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index de4ddc2..98d900e 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -4,6 +4,7 @@ #include "hw/boards.h" #include "trace.h" #include "qapi-visit.h" +#include "qapi-event.h" #include "monitor/monitor.h" #include "qapi/dealloc-visitor.h" #include "qapi/qmp-output-visitor.h" @@ -41,25 +42,18 @@ void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list) static void acpi_memory_ost_mon_event(const MemHotplugState *mem_st) { - Visitor *v; - QObject *out_info; - QapiDeallocVisitor *md; - QmpOutputVisitor *mo = qmp_output_visitor_new(); MemStatus *mdev = &mem_st->devs[mem_st->selector]; ACPIOSTInfo *info = acpi_memory_device_status(mem_st->selector, mdev); - v = qmp_output_get_visitor(mo); - visit_type_ACPIOSTInfo(v, &info, "unused", NULL); + /* QAPI event declarations support struct names in the 'data', + * field, but we have to list all the fields of ACPIOSTInfo. + */ + qapi_event_send_acpi_device_ost(info->has_device, info->device, + info->slot, info->slot_type, + info->source, info->status, + NULL); - out_info = qmp_output_get_qobject(mo); - monitor_protocol_event(QEVENT_ACPI_OST, out_info); - qobject_decref(out_info); - - qmp_output_visitor_cleanup(mo); - md = qapi_dealloc_visitor_new(); - v = qapi_dealloc_get_visitor(md); - visit_type_ACPIOSTInfo(v, &info, "unused", NULL); - qapi_dealloc_visitor_cleanup(md); + qapi_free_ACPIOSTInfo(info); } static uint64_t acpi_memory_hotplug_read(void *opaque, hwaddr addr, diff --git a/qapi-event.json b/qapi-event.json index fbdda48..cb63d85 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 the guest executes the ACPI _OST method. +# For the description of data, see @ACPIOSTInfo. +# +# Since: 2.1 +## +{ 'event': 'ACPI_DEVICE_OST', + 'data' : 'ACPIOSTInfo' }