mbox series

[kvmtool,v2,0/4] Add --loglevel argument

Message ID 20230707151119.81208-1-alexandru.elisei@arm.com (mailing list archive)
Headers show
Series Add --loglevel argument | expand

Message

Alexandru Elisei July 7, 2023, 3:11 p.m. UTC
kvmtool can be unnecessarily verbose at times, and Will proposed in a chat
we had a while ago to add a --loglevel command line argument to choose
which type of messages to silence. This is me taking a stab at it.

Build tested for all arches and run tested lightly on a rockpro64 and my
x86 machine.

Base commit is 3b1cdcf9e78f ("virtio/vhost: Clear VIRTIO_F_ACCESS_PLATFORM").

Changelog in each patch.

Alexandru Elisei (4):
  util: Make pr_err() return void
  Replace printf/fprintf with pr_* macros
  util: Use __pr_debug() instead of pr_info() to print debug messages
  Add --loglevel argument for the run command

 arm/gic.c            |  5 ++--
 builtin-run.c        | 69 ++++++++++++++++++++++++++++++--------------
 builtin-setup.c      | 16 +++++-----
 guest_compat.c       |  2 +-
 include/kvm/util.h   | 14 ++++++---
 kvm-cpu.c            | 12 ++++----
 mmio.c               |  2 +-
 util/parse-options.c | 28 ++++++++++--------
 util/util.c          | 27 +++++++++++++++--
 9 files changed, 116 insertions(+), 59 deletions(-)

Comments

Anup Patel July 10, 2023, 6:56 a.m. UTC | #1
On Fri, Jul 7, 2023 at 8:41 PM Alexandru Elisei
<alexandru.elisei@arm.com> wrote:
>
> kvmtool can be unnecessarily verbose at times, and Will proposed in a chat
> we had a while ago to add a --loglevel command line argument to choose
> which type of messages to silence. This is me taking a stab at it.
>
> Build tested for all arches and run tested lightly on a rockpro64 and my
> x86 machine.
>
> Base commit is 3b1cdcf9e78f ("virtio/vhost: Clear VIRTIO_F_ACCESS_PLATFORM").
>
> Changelog in each patch.
>
> Alexandru Elisei (4):
>   util: Make pr_err() return void
>   Replace printf/fprintf with pr_* macros
>   util: Use __pr_debug() instead of pr_info() to print debug messages
>   Add --loglevel argument for the run command

Looks good for KVMTOOL RISC-V.

Reviewed-by: Anup Patel <anup@brainfault.org>

Regards,
Anup

>
>  arm/gic.c            |  5 ++--
>  builtin-run.c        | 69 ++++++++++++++++++++++++++++++--------------
>  builtin-setup.c      | 16 +++++-----
>  guest_compat.c       |  2 +-
>  include/kvm/util.h   | 14 ++++++---
>  kvm-cpu.c            | 12 ++++----
>  mmio.c               |  2 +-
>  util/parse-options.c | 28 ++++++++++--------
>  util/util.c          | 27 +++++++++++++++--
>  9 files changed, 116 insertions(+), 59 deletions(-)
>
> --
> 2.41.0
>
Will Deacon July 12, 2023, 4:17 p.m. UTC | #2
On Fri, 7 Jul 2023 16:11:15 +0100, Alexandru Elisei wrote:
> kvmtool can be unnecessarily verbose at times, and Will proposed in a chat
> we had a while ago to add a --loglevel command line argument to choose
> which type of messages to silence. This is me taking a stab at it.
> 
> Build tested for all arches and run tested lightly on a rockpro64 and my
> x86 machine.
> 
> [...]

Applied to kvmtool (master), thanks!

[1/4] util: Make pr_err() return void
      https://git.kernel.org/will/kvmtool/c/2cc4929cc6b9
[2/4] Replace printf/fprintf with pr_* macros
      https://git.kernel.org/will/kvmtool/c/72e13944777a
[3/4] util: Use __pr_debug() instead of pr_info() to print debug messages
      https://git.kernel.org/will/kvmtool/c/fc184a682a21
[4/4] Add --loglevel argument for the run command
      https://git.kernel.org/will/kvmtool/c/bd4ba57156da

Cheers,