From: "SU Hang" <darcy.sh@antgroup.com>
To: seanjc@google.com, kvm@vger.kernel.org
Cc: "Lai Jiangshan" <jiangshan.ljs@antgroup.com>,
"SU Hang" <darcy.sh@antgroup.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] KVM: x86: Replace magic number with readable macro
Date: Tue, 29 Mar 2022 11:01:05 +0800 [thread overview]
Message-ID: <20220329030108.97341-1-darcy.sh@antgroup.com> (raw)
Replace magic number 0x180 with `EPT_VIOLATION_GVA_IS_VALID | EPT_VIOLATION_GVA_TRANSLATED`
in arch/x86/kvm/mmu/paging_tmpl.h
Similarly, replace `(pte_access & 0x7) << 3` with
`(pte_access & VMX_EPT_RWX_MASK) << EPT_VIOLATION_RWX_SHIFT`.
v1 -> v2: https://lore.kernel.org/kvm/20220321094203.109546-1-darcy.sh@antgroup.com/
- Rename `EPT_VIOLATION_GVA_VALIDATION` to `EPT_VIOLATION_GVA_IS_VALID`. [Sean]
- Using new added `VMX_EPT_RWX_MASK` to replace magic number 0x7 and so on,
to avoid using branch statement in hotpath. [Sean]
SU Hang (1):
KVM: VMX: replace 0x180 with EPT_VIOLATION_* definition
Sean Christopherson (1):
KVM: x86/mmu: Derive EPT violation RWX bits from EPTE RWX bits
arch/x86/include/asm/vmx.h | 9 +++------
arch/x86/kvm/mmu/paging_tmpl.h | 11 +++++++++--
arch/x86/kvm/vmx/vmx.c | 4 +---
3 files changed, 13 insertions(+), 11 deletions(-)
--
2.32.0.3.g01195cf9f
next reply other threads:[~2022-03-29 3:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 3:01 SU Hang [this message]
2022-03-29 3:01 ` [PATCH v2 1/2] KVM: VMX: replace 0x180 with EPT_VIOLATION_* definition SU Hang
2022-03-29 16:00 ` Sean Christopherson
2022-03-29 3:01 ` [PATCH v2 2/2] KVM: x86/mmu: Derive EPT violation RWX bits from EPTE RWX bits SU Hang
2022-04-08 21:11 ` Isaku Yamahata
2022-04-08 21:32 ` Sean Christopherson
2022-04-08 16:48 ` [PATCH v2 0/2] KVM: x86: Replace magic number with readable macro 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=20220329030108.97341-1-darcy.sh@antgroup.com \
--to=darcy.sh@antgroup.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jiangshan.ljs@antgroup.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®