* [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged
@ 2022-08-16 9:49 Keqian Zhu via
2022-08-24 15:04 ` Igor Mammedov
0 siblings, 1 reply; 6+ messages in thread
From: Keqian Zhu via @ 2022-08-16 9:49 UTC (permalink / raw)
To: qemu-devel, qemu-arm, qemu-trivial
Cc: Peter Maydell, Eric Auger, Peter Xu, Igor Mammedov,
wanghaibin.wang
Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status"
causes segmentation fault with following dumpstack:
#1 0x0000aaaaab64235c in qmp_query_acpi_ospm_status (errp=errp@entry=0xfffffffff030) at ../monitor/qmp-cmds.c:312
#2 0x0000aaaaabfc4e20 in qmp_marshal_query_acpi_ospm_status (args=<optimized out>, ret=0xffffea4ffe90, errp=0xffffea4ffe88) at qapi/qapi-commands-acpi.c:63
#3 0x0000aaaaabff8ba0 in do_qmp_dispatch_bh (opaque=0xffffea4ffe98) at ../qapi/qmp-dispatch.c:128
#4 0x0000aaaaac02e594 in aio_bh_call (bh=0xffffe0004d80) at ../util/async.c:150
#5 aio_bh_poll (ctx=ctx@entry=0xaaaaad0f6040) at ../util/async.c:178
#6 0x0000aaaaac00bd40 in aio_dispatch (ctx=ctx@entry=0xaaaaad0f6040) at ../util/aio-posix.c:421
#7 0x0000aaaaac02e010 in aio_ctx_dispatch (source=0xaaaaad0f6040, callback=<optimized out>, user_data=<optimized out>) at ../util/async.c:320
#8 0x0000fffff76f6884 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#9 0x0000aaaaac0452d4 in glib_pollfds_poll () at ../util/main-loop.c:297
#10 os_host_main_loop_wait (timeout=0) at ../util/main-loop.c:320
#11 main_loop_wait (nonblocking=nonblocking@entry=0) at ../util/main-loop.c:596
#12 0x0000aaaaab5c9e50 in qemu_main_loop () at ../softmmu/runstate.c:734
#13 0x0000aaaaab185370 in qemu_main (argc=argc@entry=47, argv=argv@entry=0xfffffffff518, envp=envp@entry=0x0) at ../softmmu/main.c:38
#14 0x0000aaaaab16f99c in main (argc=47, argv=0xfffffffff518) at ../softmmu/main.c:47
Fixes: ebb62075021a ("hw/acpi: Add ACPI Generic Event Device Support")
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
hw/acpi/generic_event_device.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index e28457a7d1..a3d31631fe 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -267,6 +267,13 @@ static void acpi_ged_unplug_cb(HotplugHandler *hotplug_dev,
}
}
+static void acpi_ged_ospm_status(AcpiDeviceIf *adev, ACPIOSTInfoList ***list)
+{
+ AcpiGedState *s = ACPI_GED(adev);
+
+ acpi_memory_ospm_status(&s->memhp_state, list);
+}
+
static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
{
AcpiGedState *s = ACPI_GED(adev);
@@ -409,6 +416,7 @@ static void acpi_ged_class_init(ObjectClass *class, void *data)
hc->unplug_request = acpi_ged_unplug_request_cb;
hc->unplug = acpi_ged_unplug_cb;
+ adevc->ospm_status = acpi_ged_ospm_status;
adevc->send_event = acpi_ged_send_event;
}
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged
2022-08-16 9:49 [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged Keqian Zhu via
@ 2022-08-24 15:04 ` Igor Mammedov
2022-09-20 13:15 ` Peter Maydell
0 siblings, 1 reply; 6+ messages in thread
From: Igor Mammedov @ 2022-08-24 15:04 UTC (permalink / raw)
To: Keqian Zhu
Cc: qemu-devel, qemu-arm, qemu-trivial, Peter Maydell, Eric Auger,
Peter Xu, wanghaibin.wang
On Tue, 16 Aug 2022 17:49:57 +0800
Keqian Zhu <zhukeqian1@huawei.com> wrote:
> Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status"
> causes segmentation fault with following dumpstack:
> #1 0x0000aaaaab64235c in qmp_query_acpi_ospm_status (errp=errp@entry=0xfffffffff030) at ../monitor/qmp-cmds.c:312
> #2 0x0000aaaaabfc4e20 in qmp_marshal_query_acpi_ospm_status (args=<optimized out>, ret=0xffffea4ffe90, errp=0xffffea4ffe88) at qapi/qapi-commands-acpi.c:63
> #3 0x0000aaaaabff8ba0 in do_qmp_dispatch_bh (opaque=0xffffea4ffe98) at ../qapi/qmp-dispatch.c:128
> #4 0x0000aaaaac02e594 in aio_bh_call (bh=0xffffe0004d80) at ../util/async.c:150
> #5 aio_bh_poll (ctx=ctx@entry=0xaaaaad0f6040) at ../util/async.c:178
> #6 0x0000aaaaac00bd40 in aio_dispatch (ctx=ctx@entry=0xaaaaad0f6040) at ../util/aio-posix.c:421
> #7 0x0000aaaaac02e010 in aio_ctx_dispatch (source=0xaaaaad0f6040, callback=<optimized out>, user_data=<optimized out>) at ../util/async.c:320
> #8 0x0000fffff76f6884 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
> #9 0x0000aaaaac0452d4 in glib_pollfds_poll () at ../util/main-loop.c:297
> #10 os_host_main_loop_wait (timeout=0) at ../util/main-loop.c:320
> #11 main_loop_wait (nonblocking=nonblocking@entry=0) at ../util/main-loop.c:596
> #12 0x0000aaaaab5c9e50 in qemu_main_loop () at ../softmmu/runstate.c:734
> #13 0x0000aaaaab185370 in qemu_main (argc=argc@entry=47, argv=argv@entry=0xfffffffff518, envp=envp@entry=0x0) at ../softmmu/main.c:38
> #14 0x0000aaaaab16f99c in main (argc=47, argv=0xfffffffff518) at ../softmmu/main.c:47
>
> Fixes: ebb62075021a ("hw/acpi: Add ACPI Generic Event Device Support")
> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/acpi/generic_event_device.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> index e28457a7d1..a3d31631fe 100644
> --- a/hw/acpi/generic_event_device.c
> +++ b/hw/acpi/generic_event_device.c
> @@ -267,6 +267,13 @@ static void acpi_ged_unplug_cb(HotplugHandler *hotplug_dev,
> }
> }
>
> +static void acpi_ged_ospm_status(AcpiDeviceIf *adev, ACPIOSTInfoList ***list)
> +{
> + AcpiGedState *s = ACPI_GED(adev);
> +
> + acpi_memory_ospm_status(&s->memhp_state, list);
> +}
> +
> static void acpi_ged_send_event(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
> {
> AcpiGedState *s = ACPI_GED(adev);
> @@ -409,6 +416,7 @@ static void acpi_ged_class_init(ObjectClass *class, void *data)
> hc->unplug_request = acpi_ged_unplug_request_cb;
> hc->unplug = acpi_ged_unplug_cb;
>
> + adevc->ospm_status = acpi_ged_ospm_status;
> adevc->send_event = acpi_ged_send_event;
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged
2022-08-24 15:04 ` Igor Mammedov
@ 2022-09-20 13:15 ` Peter Maydell
2022-09-21 13:22 ` Igor Mammedov
0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2022-09-20 13:15 UTC (permalink / raw)
To: Igor Mammedov
Cc: Keqian Zhu, qemu-devel, qemu-arm, qemu-trivial, Eric Auger,
Peter Xu, wanghaibin.wang
On Wed, 24 Aug 2022 at 16:04, Igor Mammedov <imammedo@redhat.com> wrote:
>
> On Tue, 16 Aug 2022 17:49:57 +0800
> Keqian Zhu <zhukeqian1@huawei.com> wrote:
>
> > Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status"
> > causes segmentation fault with following dumpstack:
> > #1 0x0000aaaaab64235c in qmp_query_acpi_ospm_status (errp=errp@entry=0xfffffffff030) at ../monitor/qmp-cmds.c:312
> > #2 0x0000aaaaabfc4e20 in qmp_marshal_query_acpi_ospm_status (args=<optimized out>, ret=0xffffea4ffe90, errp=0xffffea4ffe88) at qapi/qapi-commands-acpi.c:63
> > #3 0x0000aaaaabff8ba0 in do_qmp_dispatch_bh (opaque=0xffffea4ffe98) at ../qapi/qmp-dispatch.c:128
> > #4 0x0000aaaaac02e594 in aio_bh_call (bh=0xffffe0004d80) at ../util/async.c:150
> > #5 aio_bh_poll (ctx=ctx@entry=0xaaaaad0f6040) at ../util/async.c:178
> > #6 0x0000aaaaac00bd40 in aio_dispatch (ctx=ctx@entry=0xaaaaad0f6040) at ../util/aio-posix.c:421
> > #7 0x0000aaaaac02e010 in aio_ctx_dispatch (source=0xaaaaad0f6040, callback=<optimized out>, user_data=<optimized out>) at ../util/async.c:320
> > #8 0x0000fffff76f6884 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
> > #9 0x0000aaaaac0452d4 in glib_pollfds_poll () at ../util/main-loop.c:297
> > #10 os_host_main_loop_wait (timeout=0) at ../util/main-loop.c:320
> > #11 main_loop_wait (nonblocking=nonblocking@entry=0) at ../util/main-loop.c:596
> > #12 0x0000aaaaab5c9e50 in qemu_main_loop () at ../softmmu/runstate.c:734
> > #13 0x0000aaaaab185370 in qemu_main (argc=argc@entry=47, argv=argv@entry=0xfffffffff518, envp=envp@entry=0x0) at ../softmmu/main.c:38
> > #14 0x0000aaaaab16f99c in main (argc=47, argv=0xfffffffff518) at ../softmmu/main.c:47
> >
> > Fixes: ebb62075021a ("hw/acpi: Add ACPI Generic Event Device Support")
> > Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
I notice this doesn't seem to have gone in yet -- whose tree is it
going to go via?
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged
2022-09-20 13:15 ` Peter Maydell
@ 2022-09-21 13:22 ` Igor Mammedov
2022-09-22 11:09 ` Peter Maydell
0 siblings, 1 reply; 6+ messages in thread
From: Igor Mammedov @ 2022-09-21 13:22 UTC (permalink / raw)
To: Peter Maydell
Cc: Keqian Zhu, qemu-devel, qemu-arm, qemu-trivial, Eric Auger,
Peter Xu, wanghaibin.wang
On Tue, 20 Sep 2022 14:15:36 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:
> On Wed, 24 Aug 2022 at 16:04, Igor Mammedov <imammedo@redhat.com> wrote:
> >
> > On Tue, 16 Aug 2022 17:49:57 +0800
> > Keqian Zhu <zhukeqian1@huawei.com> wrote:
> >
> > > Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status"
> > > causes segmentation fault with following dumpstack:
> > > #1 0x0000aaaaab64235c in qmp_query_acpi_ospm_status (errp=errp@entry=0xfffffffff030) at ../monitor/qmp-cmds.c:312
> > > #2 0x0000aaaaabfc4e20 in qmp_marshal_query_acpi_ospm_status (args=<optimized out>, ret=0xffffea4ffe90, errp=0xffffea4ffe88) at qapi/qapi-commands-acpi.c:63
> > > #3 0x0000aaaaabff8ba0 in do_qmp_dispatch_bh (opaque=0xffffea4ffe98) at ../qapi/qmp-dispatch.c:128
> > > #4 0x0000aaaaac02e594 in aio_bh_call (bh=0xffffe0004d80) at ../util/async.c:150
> > > #5 aio_bh_poll (ctx=ctx@entry=0xaaaaad0f6040) at ../util/async.c:178
> > > #6 0x0000aaaaac00bd40 in aio_dispatch (ctx=ctx@entry=0xaaaaad0f6040) at ../util/aio-posix.c:421
> > > #7 0x0000aaaaac02e010 in aio_ctx_dispatch (source=0xaaaaad0f6040, callback=<optimized out>, user_data=<optimized out>) at ../util/async.c:320
> > > #8 0x0000fffff76f6884 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
> > > #9 0x0000aaaaac0452d4 in glib_pollfds_poll () at ../util/main-loop.c:297
> > > #10 os_host_main_loop_wait (timeout=0) at ../util/main-loop.c:320
> > > #11 main_loop_wait (nonblocking=nonblocking@entry=0) at ../util/main-loop.c:596
> > > #12 0x0000aaaaab5c9e50 in qemu_main_loop () at ../softmmu/runstate.c:734
> > > #13 0x0000aaaaab185370 in qemu_main (argc=argc@entry=47, argv=argv@entry=0xfffffffff518, envp=envp@entry=0x0) at ../softmmu/main.c:38
> > > #14 0x0000aaaaab16f99c in main (argc=47, argv=0xfffffffff518) at ../softmmu/main.c:47
> > >
> > > Fixes: ebb62075021a ("hw/acpi: Add ACPI Generic Event Device Support")
> > > Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
> >
> > Reviewed-by: Igor Mammedov <imammedo@redhat.com>
>
> I notice this doesn't seem to have gone in yet -- whose tree is it
> going to go via?
I'd guess ARM tree (due to almost sole user virt-arm).
(there are toy users like microvm and new loongarch)
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged
2022-09-21 13:22 ` Igor Mammedov
@ 2022-09-22 11:09 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2022-09-22 11:09 UTC (permalink / raw)
To: Igor Mammedov
Cc: Keqian Zhu, qemu-devel, qemu-arm, qemu-trivial, Eric Auger,
Peter Xu, wanghaibin.wang
On Wed, 21 Sept 2022 at 14:22, Igor Mammedov <imammedo@redhat.com> wrote:
>
> On Tue, 20 Sep 2022 14:15:36 +0100
> Peter Maydell <peter.maydell@linaro.org> wrote:
>
> > On Wed, 24 Aug 2022 at 16:04, Igor Mammedov <imammedo@redhat.com> wrote:
> > >
> > > On Tue, 16 Aug 2022 17:49:57 +0800
> > > Keqian Zhu <zhukeqian1@huawei.com> wrote:
> > >
> > > > Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status"
> > > > causes segmentation fault with following dumpstack:
> > > > #1 0x0000aaaaab64235c in qmp_query_acpi_ospm_status (errp=errp@entry=0xfffffffff030) at ../monitor/qmp-cmds.c:312
> > > > #2 0x0000aaaaabfc4e20 in qmp_marshal_query_acpi_ospm_status (args=<optimized out>, ret=0xffffea4ffe90, errp=0xffffea4ffe88) at qapi/qapi-commands-acpi.c:63
> > > > #3 0x0000aaaaabff8ba0 in do_qmp_dispatch_bh (opaque=0xffffea4ffe98) at ../qapi/qmp-dispatch.c:128
> > > > #4 0x0000aaaaac02e594 in aio_bh_call (bh=0xffffe0004d80) at ../util/async.c:150
> > > > #5 aio_bh_poll (ctx=ctx@entry=0xaaaaad0f6040) at ../util/async.c:178
> > > > #6 0x0000aaaaac00bd40 in aio_dispatch (ctx=ctx@entry=0xaaaaad0f6040) at ../util/aio-posix.c:421
> > > > #7 0x0000aaaaac02e010 in aio_ctx_dispatch (source=0xaaaaad0f6040, callback=<optimized out>, user_data=<optimized out>) at ../util/async.c:320
> > > > #8 0x0000fffff76f6884 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
> > > > #9 0x0000aaaaac0452d4 in glib_pollfds_poll () at ../util/main-loop.c:297
> > > > #10 os_host_main_loop_wait (timeout=0) at ../util/main-loop.c:320
> > > > #11 main_loop_wait (nonblocking=nonblocking@entry=0) at ../util/main-loop.c:596
> > > > #12 0x0000aaaaab5c9e50 in qemu_main_loop () at ../softmmu/runstate.c:734
> > > > #13 0x0000aaaaab185370 in qemu_main (argc=argc@entry=47, argv=argv@entry=0xfffffffff518, envp=envp@entry=0x0) at ../softmmu/main.c:38
> > > > #14 0x0000aaaaab16f99c in main (argc=47, argv=0xfffffffff518) at ../softmmu/main.c:47
> > > >
> > > > Fixes: ebb62075021a ("hw/acpi: Add ACPI Generic Event Device Support")
> > > > Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
> > >
> > > Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> >
> > I notice this doesn't seem to have gone in yet -- whose tree is it
> > going to go via?
>
> I'd guess ARM tree (due to almost sole user virt-arm).
> (there are toy users like microvm and new loongarch)
OK; applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged
@ 2022-09-23 8:58 zhukeqian via
0 siblings, 0 replies; 6+ messages in thread
From: zhukeqian via @ 2022-09-23 8:58 UTC (permalink / raw)
To: Peter Maydell, Igor Mammedov
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
qemu-trivial@nongnu.org, Eric Auger, Peter Xu, Wanghaibin (D)
>> > I notice this doesn't seem to have gone in yet -- whose tree is it
>> > going to go via?
>>
>> I'd guess ARM tree (due to almost sole user virt-arm).
>> (there are toy users like microvm and new loongarch)
>
>OK; applied to target-arm.next, thanks.
Thanks, Peter.
Keqian.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-09-23 9:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 9:49 [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged Keqian Zhu via
2022-08-24 15:04 ` Igor Mammedov
2022-09-20 13:15 ` Peter Maydell
2022-09-21 13:22 ` Igor Mammedov
2022-09-22 11:09 ` Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2022-09-23 8:58 zhukeqian via
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).