All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Subject: Re: [PATCH] KVM: x86: believe what KVM says about WAITPKG
Date: Tue, 30 Jun 2020 18:28:00 +0200	[thread overview]
Message-ID: <cf58c020-8009-1c52-2151-84d0d046348e@redhat.com> (raw)
In-Reply-To: <a945de64247435c6066a76dc79f32df1e6cbd0f6.camel@redhat.com>

On 30/06/20 18:07, Maxim Levitsky wrote:
> I think we need to keep some form of this hack, since the kernel doesn't report CPUID_7_0_ECX_WAITPKG via
> KVM_GET_SUPPORTED_CPUID, so for this to work, we need to fix the kernel to report it. 
> But to support older kernels that don't report this bit, we might still need this.
> What do you think?
> 
> Note that kvm_arch_get_supported_cpuid also has a override for what KVM reports about CPUID_EXT_MONITOR
> via KVM_GET_SUPPORTED_CPUID when cpu_pm=on and also does this without checking any conditions,
> and it works because MWAIT is very old feature, and I guess it was the inspiration for the above override
> that we are trying to remove.
> 
> Kernel sadly masks both MWAIT and WAITPKG in KVM_GET_SUPPORTED_CPUID currently
> (it is in kvm_set_cpu_caps)

Right.  We need to use host_cpuid instead of kvm_arch_get_supported_cpuid.

Paolo



      reply	other threads:[~2020-06-30 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 15:11 [PATCH] KVM: x86: believe what KVM says about WAITPKG Paolo Bonzini
2020-06-30 15:37 ` no-reply
2020-06-30 16:07 ` Maxim Levitsky
2020-06-30 16:28   ` Paolo Bonzini [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=cf58c020-8009-1c52-2151-84d0d046348e@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mlevitsk@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.