Re: [PATCH] KVM: introduce vm's max_halt_poll_ns to debugfs

From: cheng.lin130
Date: Wed May 15 2024 - 00:03:55 EST


> > > Yes, but _why_? I know _what_ a debugs knob allows, but you have yet to explain
> > > why this
> > I think that if such an interface is provided, it can be used to check the source of
> > vm's max_halt_poll_ns, general module parameter or per-vm configuration.
> > When configured through per-vm, such an interface can be used to monitor this
> > configuration. If there is an error in the setting through KVMCAP_HALL_POLL, such
> > an interface can be used to fix or reset it dynamicly.
> But again, that argument can be made for myriad settings in KVM. And unlike many
> settings, a "bad" max_halt_poll_ns can be fixed simply by redoing KVM_CAP_HALL_POLL.
Yes, Whether it is convenient to redo it will depend on the userspace.
> It's not KVM's responsibility to police userspace for bugs/errors, and IMO a
> backdoor into max_halt_poll_ns isn't justified.
Yes, It's not KVM's responsibility to police userspace. In addition to depend on userspace
redo, it can be seen as a planB to ensure that the VM works as expected.