* [PATCH] target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)
@ 2020-01-03 14:32 Li Qiang
2020-01-03 14:53 ` Philippe Mathieu-Daudé
2020-01-07 8:24 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Li Qiang @ 2020-01-03 14:32 UTC (permalink / raw)
To: pbonzini, mtosatti, rth, ehabkost; +Cc: Li Qiang, qemu-devel
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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)
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
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-03 14:53 UTC (permalink / raw)
To: Li Qiang, pbonzini, mtosatti, rth, ehabkost; +Cc: qemu-devel
On 1/3/20 3:32 PM, Li Qiang wrote:
> The ioctl(KVM_CAP_GET_MSR_FEATURES) is quite new. In old platform that
Can you refer to the kernel version? "is quite new (introduced in vX.Y)"
> doesn't support this ioctl will sometimes make the user confusion. For
> example, when we do nested virtualiztion using host-passthrough model
"virtualization"
> the VM will has quite different cpu feature with the host.
I'm not native English speaking but I'd use:
"... will have quite different features than 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.");
Please remove the trailing '.'
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)
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
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-01-07 8:24 UTC (permalink / raw)
To: Li Qiang, mtosatti, rth, ehabkost; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-07 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.