diff mbox series

[1/9] util/log.c: add LOG_UNSUPP type

Message ID 20220307191553.429236-2-danielhb413@gmail.com (mailing list archive)
State New, archived
Headers show
Series add LOG_UNSUPP log type + mark hcalls as unsupp | expand

Commit Message

Daniel Henrique Barboza March 7, 2022, 7:15 p.m. UTC
The existing log type 'LOG_UNIMP' is being used as a way to indicate
that a certain feature is not implemented, and to indicate that a
feature is unsupported. Most of the time both cases are similar, until
you want to debug a guest that is running a not so common OS (e.g. AIX
guest in a pseries machine).

The result is that you can be overwhelmed with lots of '-d unimp'
messages of hypercalls and have to do code searches to verify  whether a
specific hypercall is something we never considered adding versus
something that we decided to not support. Note that while the first case
is eligible for further investigation the second is already settled. It
would be helpful to able to distinguish between both.

This patch adds a new log type called LOG_UNSUPP to represent this
subset of features that we are aware of and we decided to not support.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 include/qemu/log.h | 3 ++-
 util/log.c         | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/qemu/log.h b/include/qemu/log.h
index 9b80660207..884a81495b 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -14,7 +14,7 @@  typedef struct QemuLogFile {
 extern QemuLogFile *qemu_logfile;
 
 
-/* 
+/*
  * The new API:
  *
  */
@@ -64,6 +64,7 @@  static inline bool qemu_log_separate(void)
 #define CPU_LOG_PLUGIN     (1 << 18)
 /* LOG_STRACE is used for user-mode strace logging. */
 #define LOG_STRACE         (1 << 19)
+#define LOG_UNSUPP         (1 << 20)
 
 /* Lock output for a series of related logs.  Since this is not needed
  * for a single qemu_log / qemu_log_mask / qemu_log_mask_and_addr, we
diff --git a/util/log.c b/util/log.c
index 2ee1500bee..3e19859ab3 100644
--- a/util/log.c
+++ b/util/log.c
@@ -334,6 +334,8 @@  const QEMULogItem qemu_log_items[] = {
 #endif
     { LOG_STRACE, "strace",
       "log every user-mode syscall, its input, and its result" },
+    { LOG_UNSUPP, "unsupp",
+      "log unsupported functionality" },
     { 0, NULL, NULL },
 };