All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: kvm@vger.kernel.org
Cc: babu.moger@amd.com
Subject: [PATCH kvm-unit-tests 2/2] access: treat NX as reserved if EFER.NXE=0
Date: Fri, 13 Aug 2021 07:12:25 -0400	[thread overview]
Message-ID: <20210813111225.3603660-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20210813111225.3603660-1-pbonzini@redhat.com>

Cull more tests if EFER.NXE=0.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/access.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/x86/access.c b/x86/access.c
index 6285c8c..4725bbd 100644
--- a/x86/access.c
+++ b/x86/access.c
@@ -324,6 +324,8 @@ static _Bool ac_test_legal(ac_test_t *at)
      */
     reserved = (AC_PDE_BIT51_MASK | AC_PDE_BIT36_MASK | AC_PDE_BIT13_MASK |
 	        AC_PTE_BIT51_MASK | AC_PTE_BIT36_MASK);
+    if (!F(AC_CPU_EFER_NX))
+        reserved |= AC_PDE_NX_MASK | AC_PTE_NX_MASK;
 
     /* Only test one reserved bit at a time.  */
     reserved &= flags;
-- 
2.27.0


  parent reply	other threads:[~2021-08-13 11:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 11:12 [PATCH kvm-unit-tests 0/2] access: cut more execution time on reserved bit tests Paolo Bonzini
2021-08-13 11:12 ` [PATCH kvm-unit-tests 1/2] access: optimize check for multiple reserved bits Paolo Bonzini
2021-08-13 11:12 ` Paolo Bonzini [this message]
2021-08-13 15:32 ` [PATCH kvm-unit-tests 0/2] access: cut more execution time on reserved bit tests Babu Moger

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=20210813111225.3603660-3-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=babu.moger@amd.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.