From: Sean Christopherson <seanjc@google.com>
To: lirongqing@baidu.com
Cc: pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, kvm@vger.kernel.org,
x86@kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: Don't create kvm-nx-lpage-re kthread if not itlb_multihit
Date: Thu, 23 Mar 2023 07:20:21 -0700 [thread overview]
Message-ID: <ZBxf+ewCimtHY2XO@google.com> (raw)
In-Reply-To: <1679555884-32544-1-git-send-email-lirongqing@baidu.com>
On Thu, Mar 23, 2023, lirongqing@baidu.com wrote:
> From: Li RongQing <lirongqing@baidu.com>
>
> if CPU has not X86_BUG_ITLB_MULTIHIT bug, kvm-nx-lpage-re kthread
> is not needed to create
Unless userspace forces the mitigation to be enabled, which can be done while KVM
is running. I agree that spinning up a kthread that is unlikely to be used is
less than ideal, but the ~8KiB or so overhead is per-VM and not really all that
notable, e.g. KVM's page tables easily exceed that.
The kthread could be spun up on demand, but that adds a non-trivial amount of
complexity due to the kthread being per-VM, and KVM and userspace would have to
deal with potential errors in a path that really shouldn't fail.
If we really want to avoid the overhead, one idea would be to add a "never" option
to the module param and make it sticky.
next prev parent reply other threads:[~2023-03-23 14:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 7:18 [PATCH] KVM: x86/mmu: Don't create kvm-nx-lpage-re kthread if not itlb_multihit lirongqing
2023-03-23 14:20 ` Sean Christopherson [this message]
2023-03-23 22:32 ` Huang, Kai
2023-03-23 22:40 ` Sean Christopherson
2023-03-23 23:16 ` Huang, Kai
2023-03-30 8:18 ` Li,Rongqing
2023-03-30 19:19 ` Sean Christopherson
2023-05-02 2:07 ` Robert Hoo
2023-05-05 12:42 ` zhuangel570
2023-05-05 17:44 ` Sean Christopherson
2023-05-06 7:12 ` zhuangel570
2023-05-06 14:59 ` Robert Hoo
2023-05-06 15:30 ` zhuangel570
2023-05-06 14:49 ` Robert Hoo
2023-05-07 1:18 ` Robert Hoo
2023-05-05 17:56 ` Jim Mattson
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=ZBxf+ewCimtHY2XO@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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).