From: xpahos@gmail.com
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, qemu-trivial@nongnu.org,
Alexander Gryanko <xpahos@gmail.com>
Subject: [PATCH v2] system/runstate.c: Add a newline character to correctly log guest errors
Date: Mon, 6 Oct 2025 01:21:27 +0300 [thread overview]
Message-ID: <20251004-add-newline-guest-error-log-v1-1-a61df1599936@gmail.com> (raw)
In-Reply-To: <32D0DF37-A1B3-4532-B350-082E19E4EABB@gmail.com>
From: Alexander Gryanko <xpahos@gmail.com>
The pvpanic handler calls the qemu_system_guest_panicked
function with a NULL parameter, which results in the absence
of a newline character in the guest error log.
The qemu_system_guest_crashloaded function has no additional
logic, but also omits the newline character.
The qemu_system_guest_pvshutdown has no reporting in the
guest error log.
Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
---
system/runstate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/system/runstate.c b/system/runstate.c
index 6178b0091a..8b4bf75cd6 100644
--- a/system/runstate.c
+++ b/system/runstate.c
@@ -674,18 +674,21 @@ void qemu_system_guest_panicked(GuestPanicInformation *info)
}
qapi_free_GuestPanicInformation(info);
+ } else {
+ qemu_log_mask(LOG_GUEST_ERROR, "\n");
}
}
void qemu_system_guest_crashloaded(GuestPanicInformation *info)
{
- qemu_log_mask(LOG_GUEST_ERROR, "Guest crash loaded");
+ qemu_log_mask(LOG_GUEST_ERROR, "Guest crash loaded\n");
qapi_event_send_guest_crashloaded(GUEST_PANIC_ACTION_RUN, info);
qapi_free_GuestPanicInformation(info);
}
void qemu_system_guest_pvshutdown(void)
{
+ qemu_log_mask(LOG_GUEST_ERROR, "Guest shutdown requested\n");
qapi_event_send_guest_pvshutdown();
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
}
---
base-commit: 81e3121bef89bcd3ccb261899e5a36246199065d
change-id: 20251004-add-newline-guest-error-log-62d68638b28c
Best regards,
--
Alexander Gryanko <xpahos@gmail.com>
prev parent reply other threads:[~2025-10-05 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-04 17:47 [PATCH] system/runstate.c: Add a newline character to correctly log guest errors Alexander Gryanko
2025-10-05 18:58 ` [PATCH v2] " Alexander Gryanko
2025-10-05 22:21 ` xpahos [this message]
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=20251004-add-newline-guest-error-log-v1-1-a61df1599936@gmail.com \
--to=xpahos@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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).