All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Matlack <dmatlack@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Ben Gardon <bgardon@google.com>,
	Sean Christopherson <seanjc@google.com>,
	Oliver Upton <oupton@google.com>, Peter Xu <peterx@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Andrew Jones <drjones@redhat.com>,
	"open list:KERNEL VIRTUAL MACHINE (KVM)" <kvm@vger.kernel.org>,
	David Matlack <dmatlack@google.com>
Subject: [PATCH v2 05/10] KVM: selftests: Move VMX_EPT_VPID_CAP_AD_BITS to vmx.h
Date: Tue, 17 May 2022 19:05:19 +0000	[thread overview]
Message-ID: <20220517190524.2202762-6-dmatlack@google.com> (raw)
In-Reply-To: <20220517190524.2202762-1-dmatlack@google.com>

This is a VMX-related macro so move it to vmx.h. While here, open code
the mask like the rest of the VMX bitmask macros.

No functional change intended.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Matlack <dmatlack@google.com>
---
 tools/testing/selftests/kvm/include/x86_64/processor.h | 3 ---
 tools/testing/selftests/kvm/include/x86_64/vmx.h       | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
index 434a4f60f4d9..04f1d540bcb2 100644
--- a/tools/testing/selftests/kvm/include/x86_64/processor.h
+++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
@@ -494,9 +494,6 @@ void __virt_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr, int level)
 #define X86_CR0_CD          (1UL<<30) /* Cache Disable */
 #define X86_CR0_PG          (1UL<<31) /* Paging */
 
-/* VMX_EPT_VPID_CAP bits */
-#define VMX_EPT_VPID_CAP_AD_BITS       (1ULL << 21)
-
 #define XSTATE_XTILE_CFG_BIT		17
 #define XSTATE_XTILE_DATA_BIT		18
 
diff --git a/tools/testing/selftests/kvm/include/x86_64/vmx.h b/tools/testing/selftests/kvm/include/x86_64/vmx.h
index 583ceb0d1457..3b1794baa97c 100644
--- a/tools/testing/selftests/kvm/include/x86_64/vmx.h
+++ b/tools/testing/selftests/kvm/include/x86_64/vmx.h
@@ -96,6 +96,8 @@
 #define VMX_MISC_PREEMPTION_TIMER_RATE_MASK	0x0000001f
 #define VMX_MISC_SAVE_EFER_LMA			0x00000020
 
+#define VMX_EPT_VPID_CAP_AD_BITS		0x00200000
+
 #define EXIT_REASON_FAILED_VMENTRY	0x80000000
 #define EXIT_REASON_EXCEPTION_NMI	0
 #define EXIT_REASON_EXTERNAL_INTERRUPT	1
-- 
2.36.0.550.gb090851708-goog


  parent reply	other threads:[~2022-05-17 19:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 19:05 [PATCH v2 00/10] KVM: selftests: Add nested support to dirty_log_perf_test David Matlack
2022-05-17 19:05 ` [PATCH v2 01/10] KVM: selftests: Replace x86_page_size with PG_LEVEL_XX David Matlack
2022-05-17 20:26   ` Peter Xu
2022-05-17 19:05 ` [PATCH v2 02/10] KVM: selftests: Add option to create 2M and 1G EPT mappings David Matlack
2022-05-17 20:27   ` Peter Xu
2022-05-17 19:05 ` [PATCH v2 03/10] KVM: selftests: Drop stale function parameter comment for nested_map() David Matlack
2022-05-17 19:05 ` [PATCH v2 04/10] KVM: selftests: Refactor nested_map() to specify target level David Matlack
2022-05-17 19:05 ` David Matlack [this message]
2022-05-17 19:05 ` [PATCH v2 06/10] KVM: selftests: Add a helper to check EPT/VPID capabilities David Matlack
2022-05-17 19:05 ` [PATCH v2 07/10] KVM: selftests: Link selftests directly with lib object files David Matlack
2022-05-17 19:05 ` [PATCH v2 08/10] KVM: selftests: Drop unnecessary rule for $(LIBKVM_OBJS) David Matlack
2022-05-17 20:21   ` Peter Xu
2022-05-18 17:18     ` David Matlack
2022-05-17 19:05 ` [PATCH v2 09/10] KVM: selftests: Clean up LIBKVM files in Makefile David Matlack
2022-05-17 19:05 ` [PATCH v2 10/10] KVM: selftests: Add option to run dirty_log_perf_test vCPUs in L2 David Matlack
2022-05-17 20:20   ` Peter Xu
2022-05-18 13:51     ` Peter Xu
2022-05-18 15:24       ` Sean Christopherson
2022-05-18 16:12         ` David Matlack
2022-05-18 16:37           ` Sean Christopherson
2022-05-20 22:01             ` David Matlack
2022-05-20 22:49               ` David Matlack

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=20220517190524.2202762-6-dmatlack@google.com \
    --to=dmatlack@google.com \
    --cc=bgardon@google.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=oupton@google.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@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 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.