target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)
PATCH 1/1 target/i386: kvm: print info when the kernel doesn't support ioctl(KVM_CAP_GET_MSR_FEATURES)
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.
--- target/i386/kvm.c | 2 ++ 1 file changed, 2 insertions(+)
target/i386/kvm.c +2 -0
@@ -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 ; }
Signature · 1 line
2.17.1
Quoted 1 line · Li Qiang
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)"
Quoted 2 lines
doesn't support this ioctl will sometimes make the user confusion. For example, when we do nested virtualiztion using host-passthrough model
"virtualization"
Quoted 1 line
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"
Quoted 11 lines
Signed-off-by Li Qiang <[email protected]>--- target/i386/kvm.c | 2 ++ 1 file changed, 2 insertions(+)target/i386/kvm.c +0
-0
target/i386/kvm.c static int kvm_get_supported_feature_msrs(KVMState *s) · line 1920
Quoted 5 lines
target/i386/kvm.c +2
-0@@ -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 '.'
Quoted 4 lines
target/i386/kvm.c +0
-0return 0 ; }
Quoted 15 lines · Li Qiang
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 <[email protected]>--- target/i386/kvm.c | 2 ++ 1 file changed, 2 insertions(+)target/i386/kvm.c +0
-0
target/i386/kvm.c static int kvm_get_supported_feature_msrs(KVMState *s) · line 1922
Quoted 7 lines
target/i386/kvm.c +2
-0@@ -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