From: Paolo Bonzini <pbonzini@redhat.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
kvm@vger.kernel.org, x86@kernel.org
Cc: Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Sean Christopherson <seanjc@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>
Subject: Re: [PATCH] x86: kvm Require const tsc for RT
Date: Tue, 1 Mar 2022 18:57:07 +0100 [thread overview]
Message-ID: <13c4ac55-5b08-bdd9-5cfd-71e68c672825@redhat.com> (raw)
In-Reply-To: <Yh5eJSG19S2sjZfy@linutronix.de>
On 3/1/22 18:55, Sebastian Andrzej Siewior wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Sun, 6 Nov 2011 12:26:18 +0100
>
> Non constant TSC is a nightmare on bare metal already, but with
> virtualization it becomes a complete disaster because the workarounds
> are horrible latency wise. That's also a preliminary for running RT in
> a guest on top of a RT host.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> arch/x86/kvm/x86.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 82a9dcd8c67fe..54d2090d04e7a 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -8826,6 +8826,12 @@ int kvm_arch_init(void *opaque)
> goto out;
> }
>
> + if (IS_ENABLED(CONFIG_PREEMPT_RT) && !boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
> + pr_err("RT requires X86_FEATURE_CONSTANT_TSC\n");
> + r = -EOPNOTSUPP;
> + goto out;
> + }
> +
> r = -ENOMEM;
>
> x86_emulator_cache = kvm_alloc_emulator_cache();
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Thanks,
Paolo
next prev parent reply other threads:[~2022-03-01 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 17:55 [PATCH] x86: kvm Require const tsc for RT Sebastian Andrzej Siewior
2022-03-01 17:57 ` Paolo Bonzini [this message]
2022-03-14 9:28 ` Sebastian Andrzej Siewior
2022-03-15 21:07 ` Paolo Bonzini
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=13c4ac55-5b08-bdd9-5cfd-71e68c672825@redhat.com \
--to=pbonzini@redhat.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--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