[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wn8tb586.fsf@ovpn-192-65.brq.redhat.com>
Date: Fri, 21 Oct 2022 16:50:49 +0200
From: Vitaly Kuznetsov <vkuznets@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Michael Kelley <mikelley@...rosoft.com>,
Siddharth Chandrasekaran <sidcha@...zon.de>,
Yuan Yao <yuan.yao@...ux.intel.com>,
Maxim Levitsky <mlevitsk@...hat.com>,
linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v11 44/46] KVM: selftests: evmcs_test: Introduce L2 TLB
flush test
Sean Christopherson <seanjc@...gle.com> 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
Powered by blists - more mailing lists