linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Ben Gardon <bgardon@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Maxim Levitsky <mlevitsk@redhat.com>,
	Jim Mattson <jmattson@google.com>,
	Junaid Shahid <junaids@google.com>, Peter Xu <peterx@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, kvm <kvm@vger.kernel.org>
Subject: Re: Writable module parameters in KVM
Date: Wed, 26 May 2021 21:16:58 +0000	[thread overview]
Message-ID: <YK66ymMQQawfgQUD@google.com> (raw)
In-Reply-To: <CANgfPd-wcyP_nNNSuXMcZ0S+fmkcOEpQaPTS_5EUmDsEVguSCw@mail.gmail.com>

On Wed, May 26, 2021, Ben Gardon wrote:
> I don't know if there's a great way to formally encode this distinction, but
> I see two major classes of writable params in terms of complexity:
>
> 1. parameters that are captured on VM creation and follow the life of
> the VM e.g. the TDP MMU
>
> 2. parameters which have an effect on all VMs on the system when
> changed e.g. internally we have sysctls to change NX reclaim
> parameters
> 
> I think class 1 is substantially easier to reason about from a code
> perspective, but might be more confusing to userspace, as the current
> value of the parameter has no bearing on the value captured by the VM.
> Class 2 will probably be more complex to implement, require
> synchronization, and need a better justification.

That assessement isn't universally true, e.g. 'npt' and 'ept' could be snapshotted
and put into (1), but as discussed, the fallout would be spectactular.  And on
the other side, the flush/sync on reuse flag is fully dynamic and falls into (2),
yet is trivial to implement.

That said, I don't think it matters because I don't think classifying params
will change anyone's behavior.  Each param would still need to be justified and
reviewed on a case-by-case basis.

      reply	other threads:[~2021-05-26 21:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANgfPd_Pq2MkRUZiJynh7zkNuKE5oFGRjKeCjmgYP4vwvfMc1g@mail.gmail.com>
2021-05-26 10:49 ` Writable module parameters in KVM Paolo Bonzini
2021-05-26 11:10   ` Maxim Levitsky
2021-05-26 15:44     ` Sean Christopherson
2021-05-26 16:30       ` Paolo Bonzini
2021-05-26 20:09         ` Ben Gardon
2021-05-26 21:16           ` Sean Christopherson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YK66ymMQQawfgQUD@google.com \
    --to=seanjc@google.com \
    --cc=bgardon@google.com \
    --cc=jmattson@google.com \
    --cc=junaids@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).