All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lara Lazier <laramglazier@gmail.com>
To: kvm@vger.kernel.org
Cc: Lara Lazier <laramglazier@gmail.com>
Subject: [PATCH kvm-unit-tests] svm: Updated cr4 in test_efer to fix report msg
Date: Fri, 18 Jun 2021 13:31:18 +0200	[thread overview]
Message-ID: <20210618113118.70621-1-laramglazier@gmail.com> (raw)

Updated cr4 so that cr4 and vmcb->save.cr4 are the same
and the report statement prints out the correct cr4.
Moved it to the correct test.

Signed-off-by: Lara Lazier <laramglazier@gmail.com>
---
 x86/svm_tests.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 8387bea..080a1a8 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -2252,7 +2252,6 @@ static void test_efer(void)
 	/*
 	 * EFER.LME and CR0.PG are both set and CR0.PE is zero.
 	 */
-	vmcb->save.cr4 = cr4_saved | X86_CR4_PAE;
 	cr0 &= ~X86_CR0_PE;
 	vmcb->save.cr0 = cr0;
 	report(svm_vmrun() == SVM_EXIT_ERR, "EFER.LME=1 (%lx), "
@@ -2266,6 +2265,8 @@ static void test_efer(void)
 
 	cr0 |= X86_CR0_PE;
 	vmcb->save.cr0 = cr0;
+    cr4 = cr4_saved | X86_CR4_PAE;
+    vmcb->save.cr4 = cr4;
 	cs_attrib = cs_attrib_saved | SVM_SELECTOR_L_MASK |
 	    SVM_SELECTOR_DB_MASK;
 	vmcb->save.cs.attrib = cs_attrib;
-- 
2.25.1


             reply	other threads:[~2021-06-18 11:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 11:31 Lara Lazier [this message]
2021-06-18 18:28 ` [PATCH kvm-unit-tests] svm: Updated cr4 in test_efer to fix report msg Krish Sadhukhan
2021-06-18 19:58   ` Lara Lazier
2021-06-18 20:26     ` Jim Mattson
2021-06-18 20:57       ` Lara Lazier
2021-06-18 21:10         ` Jim Mattson
2021-06-18 21:20           ` Lara Lazier

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=20210618113118.70621-1-laramglazier@gmail.com \
    --to=laramglazier@gmail.com \
    --cc=kvm@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.