qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] system/runstate.c: Add a newline character to correctly log guest errors
@ 2025-10-04 17:47 Alexander Gryanko
  2025-10-05 18:58 ` [PATCH v2] " Alexander Gryanko
  2025-10-05 22:21 ` xpahos
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Gryanko @ 2025-10-04 17:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial,
	Александр Грянко

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>



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-05 22:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).