qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Li Qiang <liq3ea@163.com>,
	mtosatti@redhat.com, rth@twiddle.net, ehabkost@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)
Date: Tue, 7 Jan 2020 09:24:06 +0100	[thread overview]
Message-ID: <f47bbe07-9ba2-4440-f74c-ff15a2acb816@redhat.com> (raw)
In-Reply-To: <20200103143224.49187-1-liq3ea@163.com>

On 03/01/20 15:32, Li Qiang wrote:
> The ioctl(KVM_CAP_GET_MSR_FEATURES) is quite new. In old platform that
> doesn't support this ioctl will sometimes make the user confusion. For
> example, when we do nested virtualiztion using host-passthrough model
> the VM will has quite different cpu feature with the host.
> 
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  target/i386/kvm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 0b511906e3..9688f7a167 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -1916,6 +1916,8 @@ static int kvm_get_supported_feature_msrs(KVMState *s)
>      }
>  
>      if (!kvm_check_extension(s, KVM_CAP_GET_MSR_FEATURES)) {
> +        info_report("ioctl(KVM_CAP_GET_MSR_FEATURES) is "
> +                    "not supported by this kernel.");
>          return 0;
>      }

Does this matter with host-passthrough?  As long as "-cpu host,+vmx"
works with an old kernel, there's no reason to warn---and even then the
warning should:

1) be restricted to the nested case;

2) be emitted even if MSR features are supported but VMX MSRs are not.

Paolo



      parent reply	other threads:[~2020-01-07 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03 14:32 [PATCH] target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES) Li Qiang
2020-01-03 14:53 ` Philippe Mathieu-Daudé
2020-01-07  8:24 ` 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=f47bbe07-9ba2-4440-f74c-ff15a2acb816@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=liq3ea@163.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).