Re: [PATCH v11 44/46] KVM: selftests: evmcs_test: Introduce L2 TLB flush test

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

 



Sean Christopherson <seanjc@xxxxxxxxxx> writes:

> On Tue, Oct 04, 2022, Vitaly Kuznetsov wrote:

...

>>  
>> +	/* L2 TLB flush setup */
>> +	current_evmcs->partition_assist_page = hv_pages->partition_assist_gpa;
>> +	current_evmcs->hv_enlightenments_control.nested_flush_hypercall = 1;
>> +	current_evmcs->hv_vm_id = 1;
>> +	current_evmcs->hv_vp_id = 1;
>> +	current_vp_assist->nested_control.features.directhypercall = 1;
>> +	*(u32 *)(hv_pages->partition_assist) = 0;
>> +
>>  	GUEST_ASSERT(!vmlaunch());
>
> Pre-existing code, but would it make sense to add an assert here to verify L2
> exited due to an NMI?  Feel free to ignore this for now if it's not straightforward,
> this series is plenty big :-)
>

Well, simple

+       GUEST_ASSERT_EQ(vmreadz(VM_EXIT_REASON), EXIT_REASON_EXCEPTION_NMI);
+       GUEST_ASSERT_EQ((vmreadz(VM_EXIT_INTR_INFO) & 0xff), NMI_VECTOR);

seems to be working (passing) so why not :-)

-- 
Vitaly




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux