From: "Yang, Sheng" <sheng.yang@intel.com>
To: kvm@vger.kernel.org
Subject: [PATCH] KVM: VMX: Flush all VPID tagged TLB when VMXON
Date: Tue, 17 Jun 2008 17:39:58 +0800 [thread overview]
Message-ID: <200806171739.58655.sheng.yang@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
From efba05901f8ffca03208217d075f679f78f3469d Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Tue, 17 Jun 2008 17:41:10 +0800
Subject: [PATCH] KVM: VMX: Flush all VPID tagged TLB when VMXON
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
arch/x86/kvm/vmx.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6e4278d..d6caea3 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -358,6 +358,12 @@ static inline void vpid_sync_vcpu_all(struct
vcpu_vmx *vmx)
__invvpid(VMX_VPID_EXTENT_SINGLE_CONTEXT, vmx->vpid, 0);
}
+static inline void vpid_sync_all(void)
+{
+ if (cpu_has_vmx_vpid())
+ __invvpid(VMX_VPID_EXTENT_ALL_CONTEXT, 0, 0);
+}
+
static inline void ept_sync_global(void)
{
if (cpu_has_vmx_invept_global())
@@ -3292,6 +3298,7 @@ static int __init vmx_init(void)
kvm_mmu_set_nonpresent_ptes(~0xffeull, 0ull);
ept_sync_global();
+ vpid_sync_all();
return 0;
--
1.5.5
[-- Attachment #2: 0001-KVM-VMX-Flush-all-VPID-tagged-TLB-when-VMXON.patch --]
[-- Type: text/x-diff, Size: 1047 bytes --]
From efba05901f8ffca03208217d075f679f78f3469d Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Tue, 17 Jun 2008 17:41:10 +0800
Subject: [PATCH] KVM: VMX: Flush all VPID tagged TLB when VMXON
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
arch/x86/kvm/vmx.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6e4278d..d6caea3 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -358,6 +358,12 @@ static inline void vpid_sync_vcpu_all(struct vcpu_vmx *vmx)
__invvpid(VMX_VPID_EXTENT_SINGLE_CONTEXT, vmx->vpid, 0);
}
+static inline void vpid_sync_all(void)
+{
+ if (cpu_has_vmx_vpid())
+ __invvpid(VMX_VPID_EXTENT_ALL_CONTEXT, 0, 0);
+}
+
static inline void ept_sync_global(void)
{
if (cpu_has_vmx_invept_global())
@@ -3292,6 +3298,7 @@ static int __init vmx_init(void)
kvm_mmu_set_nonpresent_ptes(~0xffeull, 0ull);
ept_sync_global();
+ vpid_sync_all();
return 0;
--
1.5.5
next reply other threads:[~2008-06-17 9:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 9:39 Yang, Sheng [this message]
2008-06-22 7:35 ` [PATCH] KVM: VMX: Flush all VPID tagged TLB when VMXON Avi Kivity
2008-06-23 1:30 ` Yang, Sheng
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=200806171739.58655.sheng.yang@intel.com \
--to=sheng.yang@intel.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.