From: Sean Christopherson <seanjc@google.com>
To: Manali Shukla <manali.shukla@amd.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org, aaronlewis@google.com
Subject: Re: [kvm-unit-tests PATCH v2 4/4] x86: nSVM: Move part of #NM test to exception test framework
Date: Wed, 5 Oct 2022 21:17:55 +0000 [thread overview]
Message-ID: <Yz30g71onyicnu0Y@google.com> (raw)
In-Reply-To: <20220810052313.7630-1-manali.shukla@amd.com>
On Wed, Aug 10, 2022, Manali Shukla wrote:
> static void svm_nm_test(void)
IMO, this should be renamed to svm_no_nm_test().
> {
> handle_exception(NM_VECTOR, guest_test_nm_handler);
> write_cr0(read_cr0() & ~X86_CR0_TS);
> test_set_guest(svm_nm_test_guest);
>
> - vmcb->save.cr0 = vmcb->save.cr0 | X86_CR0_TS;
> - report(svm_vmrun() == SVM_EXIT_VMMCALL && nm_test_counter == 1,
> - "fnop with CR0.TS set in L2, #NM is triggered");
> -
> - vmcb->save.cr0 = (vmcb->save.cr0 & ~X86_CR0_TS) | X86_CR0_EM;
> - report(svm_vmrun() == SVM_EXIT_VMMCALL && nm_test_counter == 2,
> - "fnop with CR0.EM set in L2, #NM is triggered");
> -
> vmcb->save.cr0 = vmcb->save.cr0 & ~(X86_CR0_TS | X86_CR0_EM);
> - report(svm_vmrun() == SVM_EXIT_VMMCALL && nm_test_counter == 2,
> + report(svm_vmrun() == SVM_EXIT_VMMCALL && nm_test_counter == 0,
> "fnop with CR0.TS and CR0.EM unset no #NM excpetion");
No need to keep the #NM handler, just rely on the VMMCAL assertion and the fact
that an unexpected #NM will also cause a test failure.
next prev parent reply other threads:[~2022-10-05 21:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 5:07 [kvm-unit-tests PATCH v2 0/4] x86: nSVM: Add testing for routing L2 exceptions Manali Shukla
2022-08-10 5:20 ` [kvm-unit-tests PATCH v2 1/4] x86: nSVM: Add an exception test framework and tests Manali Shukla
2022-10-05 21:16 ` Sean Christopherson
2022-08-10 5:21 ` [kvm-unit-tests PATCH v2 2/4] x86: nSVM: Move #BP test to exception test framework Manali Shukla
2022-08-10 5:22 ` [kvm-unit-tests PATCH v2 3/4] x86: nSVM: Move #OF " Manali Shukla
2022-08-10 5:23 ` [kvm-unit-tests PATCH v2 4/4] x86: nSVM: Move part of #NM " Manali Shukla
2022-10-05 21:17 ` Sean Christopherson [this message]
2022-08-29 4:11 ` [kvm-unit-tests PATCH v2 0/4] x86: nSVM: Add testing for routing L2 exceptions Manali Shukla
2022-09-19 4:41 ` Manali Shukla
2022-09-26 4:34 ` Manali Shukla
2022-10-03 4:15 ` Manali Shukla
2022-10-03 7:07 ` Maxim Levitsky
2022-10-05 21:14 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yz30g71onyicnu0Y@google.com \
--to=seanjc@google.com \
--cc=aaronlewis@google.com \
--cc=kvm@vger.kernel.org \
--cc=manali.shukla@amd.com \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox