Re: [PATCH v2] KVM: nVMX: Fix loss of pending IRQ/NMI before entering L2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/09/2018 16:19, Nikita Leshenko wrote:
>> @@ -12702,7 +12724,8 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
>>  	 * by event injection, halt vcpu.
>>  	 */
>>  	if ((vmcs12->guest_activity_state == GUEST_ACTIVITY_HLT) &&
>> -	    !(vmcs12->vm_entry_intr_info_field & INTR_INFO_VALID_MASK)) {
>> +	    !(vmcs12->vm_entry_intr_info_field & INTR_INFO_VALID_MASK) &&
>> +	    !kvm_test_request(KVM_REQ_EVENT, vcpu)) {
>>  		vmx->nested.nested_run_pending = 0;
>>  		return kvm_vcpu_halt(vcpu);
>>  	}
>>
>> and the test doesn't pass even if I add this hunk.
>> (The v1 patch works, but it is a much bigger hammer).  Anybody has time
>> to take a look?
> 
> I tried to reproduce the failure - I ran both linked tests on Linux master
> (a83f87c1d2a93) but they pass.
> 
> Can you post your failure log?
> 
> Upstream kernel on an Ubuntu 18.04 with QEMU 2.11.1. The tests I ran:
> - vmx_pending_event_test
> - vmx_pending_event_hlt_test

My failure log is the following:

Test suite: vmx_pending_event_test
FAIL: x86/vmx_tests.c:2133: Assertion failed: (expected) == (actual)
	LHS: 0x0000000000000001 - 0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0001 - 1
	RHS: 0x0000000000000012 - 0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0000'0001'0010 - 18
Expected VMX_EXTINT, got VMX_VMCALL.
	STACK: 40579c 405919 4059a3 401d4e 4038ee 400312
SUMMARY: 7 tests, 1 unexpected failures

This is on a Haswell-EP (Xeon E5 v3) machine.  I can try tomorrow on a Kaby Lake
laptop too (I'm not very well equipped to do kernel development there so I'd
rather wait for Fedora's 4.19-rc5 kernel to be available).

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux