Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: 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>,
	Paolo Bonzini <pbonzini@redhat.com>,
	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: Mon, 14 Mar 2022 10:28:05 +0100	[thread overview]
Message-ID: <Yi8KpReL9UfO0dEb@linutronix.de> (raw)
In-Reply-To: <Yh5eJSG19S2sjZfy@linutronix.de>

On 2022-03-01 18:55:51 [+0100], To kvm@vger.kernel.org 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>

ping.

> ---
>  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();
> -- 
> 2.35.1
> 

  parent reply	other threads:[~2022-03-14  9:28 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
2022-03-14  9:28 ` Sebastian Andrzej Siewior [this message]
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=Yi8KpReL9UfO0dEb@linutronix.de \
    --to=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=pbonzini@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