From: Thomas Huth <thuth@redhat.com>
To: Peng Liang <liangpeng10@huawei.com>, qemu-trivial@nongnu.org
Cc: qemu-devel@nongnu.org, zhang.zhanghailiang@huawei.com
Subject: Re: [PATCH 1/5] log: Add logs for vm start and destroy
Date: Thu, 6 Aug 2020 12:07:48 +0200 [thread overview]
Message-ID: <4c171abd-1366-6ff9-f261-a450a3a1783d@redhat.com> (raw)
In-Reply-To: <20200806093720.2355692-2-liangpeng10@huawei.com>
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
next prev parent reply other threads:[~2020-08-06 11:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 9:37 [PATCH 0/5] log: Add logs for some modules Peng Liang
2020-08-06 9:37 ` [PATCH 1/5] log: Add logs for vm start and destroy Peng Liang
2020-08-06 10:07 ` Thomas Huth [this message]
2020-08-06 9:37 ` [PATCH 2/5] log: Add log for each modules Peng Liang
2020-08-06 9:37 ` [PATCH 3/5] log: Add more details to virtio_report in virtqueue_pop Peng Liang
2020-08-06 9:37 ` [PATCH 4/5] log: Add log at boot & cpu init for aarch64 Peng Liang
2020-08-06 9:37 ` [PATCH 5/5] log: Add logs during qemu start Peng Liang
2020-08-06 9:59 ` [PATCH 0/5] log: Add logs for some modules Daniel P. Berrangé
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=4c171abd-1366-6ff9-f261-a450a3a1783d@redhat.com \
--to=thuth@redhat.com \
--cc=liangpeng10@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=zhang.zhanghailiang@huawei.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 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).