public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Cathy Avery <cavery@redhat.com>
To: kvm@vger.kernel.org, pbonzini@redhat.com
Subject: [PATCH kvm-unit-tests] svm: Fixed error code comparison in test npt_rsvd_pfwalk
Date: Thu,  3 Oct 2019 08:38:45 -0400	[thread overview]
Message-ID: <20191003123845.2895-1-cavery@redhat.com> (raw)

According to the AMD64 spec Bit 3 (RSV) in exitinfo1 should be set
to 1 if reserved bits were set in the corresponding nested page
table entry. Exitinfo1 should be checking against error code
0x20000000eULL not 0x200000006ULL.

Signed-off-by: Cathy Avery <cavery@redhat.com>
---
 x86/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/svm.c b/x86/svm.c
index bc74e7c..bb39934 100644
--- a/x86/svm.c
+++ b/x86/svm.c
@@ -1066,7 +1066,7 @@ static bool npt_rsvd_pfwalk_check(struct test *test)
     pdpe[0] &= ~(1ULL << 8);
 
     return (test->vmcb->control.exit_code == SVM_EXIT_NPF)
-            && (test->vmcb->control.exit_info_1 == 0x200000006ULL);
+            && (test->vmcb->control.exit_info_1 == 0x20000000eULL);
 }
 
 static void npt_l1mmio_prepare(struct test *test)
-- 
2.20.1


             reply	other threads:[~2019-10-03 12:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 12:38 Cathy Avery [this message]
2019-10-03 15:23 ` [PATCH kvm-unit-tests] svm: Fixed error code comparison in test npt_rsvd_pfwalk Paolo Bonzini

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=20191003123845.2895-1-cavery@redhat.com \
    --to=cavery@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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