* [PATCH v2 kvm-unit-tests] svm: Updated cr4 in test_efer to fix report msg
@ 2021-06-21 15:39 Lara Lazier
2021-06-22 12:38 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Lara Lazier @ 2021-06-21 15:39 UTC (permalink / raw
To: kvm; +Cc: Lara Lazier
Updated cr4 so that cr4 and vmcb->save.cr4 are the same
and the report statement prints out the correct cr4.
v1->v2: moved the assignment to vmcb->save.cr4 back to the previous test
as described in the comment.
Signed-off-by: Lara Lazier <laramglazier@gmail.com>
---
x86/svm_tests.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 8387bea..824c856 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -2251,8 +2251,12 @@ static void test_efer(void)
/*
* EFER.LME and CR0.PG are both set and CR0.PE is zero.
+ * CR4.PAE needs to be set as we otherwise cannot
+ * determine if CR4.PAE=0 or CR0.PE=0 triggered the
+ * SVM_EXIT_ERR.
*/
- vmcb->save.cr4 = cr4_saved | X86_CR4_PAE;
+ cr4 = cr4_saved | X86_CR4_PAE;
+ vmcb->save.cr4 = cr4;
cr0 &= ~X86_CR0_PE;
vmcb->save.cr0 = cr0;
report(svm_vmrun() == SVM_EXIT_ERR, "EFER.LME=1 (%lx), "
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 kvm-unit-tests] svm: Updated cr4 in test_efer to fix report msg
2021-06-21 15:39 [PATCH v2 kvm-unit-tests] svm: Updated cr4 in test_efer to fix report msg Lara Lazier
@ 2021-06-22 12:38 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2021-06-22 12:38 UTC (permalink / raw
To: kvm, Lara Lazier
On Mon, 21 Jun 2021 17:39:25 +0200, Lara Lazier wrote:
> Updated cr4 so that cr4 and vmcb->save.cr4 are the same
> and the report statement prints out the correct cr4.
>
> v1->v2: moved the assignment to vmcb->save.cr4 back to the previous test
> as described in the comment.
Applied, thanks!
[1/1] svm: Updated cr4 in test_efer to fix report msg
commit: fc050452b8c37729c2348e7c63075cc2a9ae3738
Best regards,
--
Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-22 12:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-21 15:39 [PATCH v2 kvm-unit-tests] svm: Updated cr4 in test_efer to fix report msg Lara Lazier
2021-06-22 12:38 ` Paolo Bonzini
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.