Bug 216725

Summary: VMXON with CR0 bit 5 cleared should #GP, got '6'
Product: Virtualization Reporter: Yang Lixiao (lixiao.yang)
Component: kvmAssignee: virtualization_kvm
Status: NEW ---    
Severity: normal CC: gordon.jin, xudong.hao, yu.c.zhang
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 6.1.0-rc4 Subsystem:
Regression: No Bisected commit-id:
Attachments: vmx failure log

Description Yang Lixiao 2022-11-22 04:49:23 UTC
Created attachment 303260 [details]
vmx failure log

Environment:
CPU Architecture: x86_64
Host OS: Red Hat Enterprise Linux 8.4 (Ootpa)
Host kernel: 6.1.0-rc4
gcc: gcc version 8.4.1
Host kernel source: https://git.kernel.org/pub/scm/virt/kvm/kvm.git
Branch: next
Commit: d72cf8ff

Qemu source: https://git.qemu.org/git/qemu.git
Branch: master
Commit: 6d71357a

kvm-unit-tests source: https://gitlab.com/kvm-unit-tests/kvm-unit-tests.git
Branch: master
Commit: 952cf19c9143e307fe229af8bf909016a02fcc6c

Bug Detailed Description:
kvm-unit-tests vmx fails on the latest kvm. 
SUMMARY: 430115 tests, 1 unexpected failures, 2 expected failures, 5 skipped. 
The one unexpected failure is:
FAIL: VMXON with CR0 bit 5 cleared should #GP, got '6'

Reproducing Steps:
rmmod kvm_intel
modprobe kvm_intel nested=Y
git clone https://gitlab.com/kvm-unit-tests/kvm-unit-tests.git
cd kvm-unit-tests
./configure
make standalone
cd tests
./vmx -cpu host

Actual Result:
...
SUMMARY: 430115 tests, 1 unexpected failures, 2 expected failures, 5 skipped
FAIL vmx (430115 tests, 1 unexpected failures, 2 expected failures, 5 skipped)

Expected Result:
...
SUMMARY: 430115 tests, 2 expected failures, 4 skipped)
PASS vmx (430115 tests, 2 expected failures, 4 skipped)
Comment 1 Yu Zhang 2022-11-22 10:16:27 UTC
Well, IIUC, the case was added by Sean (https://lore.kernel.org/all/20220608235238.3881916-1-seanjc@google.com/), to test his fix for nVMX (https://lore.kernel.org/lkml/Yz7zB7Lxt2DHa4nT@google.com/T/). 

But the KVM patch has not been queued in next branch yet. Maybe we can just wait...
Comment 2 Yang Lixiao 2022-11-23 01:07:17 UTC
(In reply to Yu Zhang from comment #1)
> Well, IIUC, the case was added by Sean
> (https://lore.kernel.org/all/20220608235238.3881916-1-seanjc@google.com/),
> to test his fix for nVMX
> (https://lore.kernel.org/lkml/Yz7zB7Lxt2DHa4nT@google.com/T/). 
> 
> But the KVM patch has not been queued in next branch yet. Maybe we can just
> wait...

Sure. Thanks for your notice!