lkml.org 
[lkml]   [2020]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kvm: x86: Print "disabled by bios" only once per host
From
Date
On 18/02/2020 19:48, Sean Christopherson wrote:
[...]
> Fix userspace to only do the "add" on one CPU.
>
> Changing kvm_arch_init() to use pr_err_once() for the disabled_by_bios()
> case "works", but it's effectively a hack to workaround a flawed userspace.

I'll see with the user space tool to sort this out.

I'm also considering how "wrong" is what they do: udevadm trigger is
generating 3500  "uevent add" on my system and I only noticed kvm to
print this noisy message.

So as the print once isn't that "wrong" neither, this simple patch would
avoid polluting the kernel logs.


So my proposal would be

- have this simple patch on the kernel side to avoid having userspace
apps polluting logs

- contacting the udev people to see the rational & fix it too : I'll do that


As you said, once probed, there is no need reprinting the same message
again as the situation cannot have changed.

As we are on the preliminary return code path (to make a EOPNOTSUPP), I
would vote for protecting the print against multiple calls/prints.

The kernel patch isn't impacting anyone (in a regular case) and just
avoid pollution.


Would you agree on that ?

Erwan,

\
 
 \ /
  Last update: 2020-02-19 12:20    [W:0.803 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site