Message ID | 20200806093720.2355692-1-liangpeng10@huawei.com (mailing list archive) |
---|---|
Headers | show |
Series | log: Add logs for some modules | expand |
On 06/08/2020 11.37, Peng Liang wrote: > Add logs for vm start and destroy. > > Signed-off-by: Peng Liang <liangpeng10@huawei.com> > --- > hw/acpi/core.c | 3 +++ > hw/core/reset.c | 2 ++ > softmmu/vl.c | 8 ++++++++ > 3 files changed, 13 insertions(+) > > diff --git a/hw/acpi/core.c b/hw/acpi/core.c > index ac06db3450..0a24f018cf 100644 > --- a/hw/acpi/core.c > +++ b/hw/acpi/core.c > @@ -560,13 +560,16 @@ static void acpi_pm1_cnt_write(ACPIREGS *ar, uint16_t val) > uint16_t sus_typ = (val >> 10) & 7; > switch(sus_typ) { > case 0: /* soft power off */ > + info_report("VM will be soft power off"); > qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); > break; > case 1: > + info_report("VM will be suspend state"); > qemu_system_suspend_request(); > break; > default: > if (sus_typ == ar->pm1.cnt.s4_val) { /* S4 request */ > + info_report("VM will be S4 state"); > qapi_event_send_suspend_disk(); > qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); > } There is already a trace point in qemu_system_shutdown_request(), so this can already be used instead. Thomas