real EPT misconfiguration.
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/kvm_host.h | 4 +++
arch/x86/kvm/mmu.c | 5 ---
arch/x86/kvm/mmu.h | 5 +++
arch/x86/kvm/paging_tmpl.h | 26 ++
arch/x86/kvm/vmx.c
From: Nadav Har'El
Some trivial code cleanups not really related to nested EPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
Reviewed-by: Paolo Bonzini
---
arch/x86/kvm/vmx.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --
Move is_rsvd_bits_set() to paging_tmpl.h so that it can be used to check
reserved bits in EPT page table entries as well.
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 8
arch/x86/kvm/paging_tmpl.h | 12 ++--
2 files changed, 10
er role: L0 would only rebuild the shadow EPT table when L1 calls INVEPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/uapi/asm/vmx.h | 1 +
arch/x86/kvm/vmx.c | 83 +
2 files change
e the half-applied feature.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/vmx.h | 2 ++
arch/x86/kvm/vmx.c | 17 +++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/vmx.h
From: Nadav Har'El
Some additional comments to preexisting code:
Explain who (L0 or L1) handles EPT violation and misconfiguration exits.
Don't mention "shadow on either EPT or shadow" as the only two options.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/vmx.c | 30 ++
1 file changed, 30 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index a88432f..b79efd4 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
3()
(as requested in Avi Kivity's review of the original nested VMX patches),
we can't avoid this problem and need to fix it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/x86.c | 11 ---
1 file changed, 11 deletions(-)
PT") which correctly read and write EPT tables.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 5 +
arch/x86/kvm/paging_tmpl.h | 43 +--
2 files changed, 46 insertions(+), 2
From: Nadav Har'El
Since link_shadow_page() is used by a routine in mmu.c, add an
EPT-specific link_shadow_page() in paging_tmp.h, rather than moving
it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/paging_t
ions (defined in the previous patch).
Then, we need to switch back and forth between this nested context and the
regular MMU context when switching between L1 and L2 (when L1 runs this L2
with EPT).
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
From: Nadav Har'El
For preparation, we just move gpte_access() and prefetch_invalid_gpte() from
mmu.c to paging_tmpl.h.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 30 --
ar
vmx_set_efer (which itself sets one of several vmcs02 fields), so we always
support this feature, regardless of whether the host supports it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/vmx.c | 23 ---
1 file cha
real EPT misconfiguration.
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/kvm_host.h | 4 +++
arch/x86/kvm/mmu.c | 5 ---
arch/x86/kvm/mmu.h | 5 +++
arch/x86/kvm/paging_tmpl.h | 26 ++
arch/x86/kvm/vmx.c
Some trivial code cleanups not really related to nested EPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
Reviewed-by: Paolo Bonzini
---
arch/x86/kvm/vmx.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b
Move is_rsvd_bits_set() to paging_tmpl.h so that it can be used to check
reserved bits in EPT page table entries as well.
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 8
arch/x86/kvm/paging_tmpl.h | 12 ++--
2 files changed, 10
build the shadow EPT table when L1 calls INVEPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/uapi/asm/vmx.h | 1 +
arch/x86/kvm/vmx.c | 83 +
2 files changed, 84 insertions(+)
diff -
Some additional comments to preexisting code:
Explain who (L0 or L1) handles EPT violation and misconfiguration exits.
Don't mention "shadow on either EPT or shadow" as the only two options.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao X
.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/vmx.h | 2 ++
arch/x86/kvm/vmx.c | 17 +++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
Kivity's review of the original nested VMX patches),
we can't avoid this problem and need to fix it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/x86.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/x86/
us patch).
Then, we need to switch back and forth between this nested context and the
regular MMU context when switching between L1 and L2 (when L1 runs this L2
with EPT).
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arc
This patch adds this copy.
If L0 isn't controlling cr3 when running L2 (i.e., L0 is using EPT), and
whoever does control cr3 (L1 or L2) is using PAE, the processor might have
saved PDPTEs and we should also save them in vmcs12 (and restore later).
Signed-off-by: Nadav Har'El
Signed-off-b
Since link_shadow_page() is used by a routine in mmu.c, add an
EPT-specific link_shadow_page() in paging_tmp.h, rather than moving
it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/paging_tmpl.h | 20
1 file change
read and write EPT tables.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 5 +
arch/x86/kvm/paging_tmpl.h | 43 +--
2 files changed, 46 insertions(+), 2 deletions(-)
diff --git a
For preparation, we just move gpte_access() and prefetch_invalid_gpte() from
mmu.c to paging_tmpl.h.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 30 --
arch/x86/kvm/paging_tmpl.h
elf sets one of several vmcs02 fields), so we always
support this feature, regardless of whether the host supports it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/vmx.c | 23 ---
1 file changed, 16 insertions(+), 7 dele
real EPT misconfiguration.
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/kvm_host.h | 4 +++
arch/x86/kvm/mmu.c | 5 ---
arch/x86/kvm/mmu.h | 5 +++
arch/x86/kvm/paging_tmpl.h | 26 ++
arch/x86/kvm/vmx.c
Move is_rsvd_bits_set() to paging_tmpl.h so that it can be used to check
reserved bits in EPT page table entries as well.
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 8
arch/x86/kvm/paging_tmpl.h | 12 ++--
2 files changed, 10
Some trivial code cleanups not really related to nested EPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
Reviewed-by: Paolo Bonzini
---
arch/x86/kvm/vmx.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b
build the shadow EPT table when L1 calls INVEPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/uapi/asm/vmx.h | 1 +
arch/x86/kvm/vmx.c | 83 +
2 files changed, 84 insertions(+)
diff -
Some additional comments to preexisting code:
Explain who (L0 or L1) handles EPT violation and misconfiguration exits.
Don't mention "shadow on either EPT or shadow" as the only two options.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao X
.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/vmx.h | 2 ++
arch/x86/kvm/vmx.c | 17 +++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
Kivity's review of the original nested VMX patches),
we can't avoid this problem and need to fix it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/x86.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/x86/
us patch).
Then, we need to switch back and forth between this nested context and the
regular MMU context when switching between L1 and L2 (when L1 runs this L2
with EPT).
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arc
This patch adds this copy.
If L0 isn't controlling cr3 when running L2 (i.e., L0 is using EPT), and
whoever does control cr3 (L1 or L2) is using PAE, the processor might have
saved PDPTEs and we should also save them in vmcs12 (and restore later).
Signed-off-by: Nadav Har'El
Signed-off-b
Since link_shadow_page() is used by a routine in mmu.c, add an
EPT-specific link_shadow_page() in paging_tmp.h, rather than moving
it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/paging_tmpl.h | 20
1 file change
elf sets one of several vmcs02 fields), so we always
support this feature, regardless of whether the host supports it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/vmx.c | 18 ++
1 file changed, 14 insertions(+), 4 deleti
read and write EPT tables.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 5 +
arch/x86/kvm/paging_tmpl.h | 43 +--
2 files changed, 46 insertions(+), 2 deletions(-)
diff --git a
For preparation, we just move gpte_access() and prefetch_invalid_gpte() from
mmu.c to paging_tmpl.h.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 30 --
arch/x86/kvm/paging_tmpl.h
Save [2:0] of exit qualificaiton at EPT violation, and use the information when
injecting EPT violation.
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/paging_tmpl.h | 5 +
arch/x86/kvm/vmx.c | 3 +++
3 files
Some trivial code cleanups not really related to nested EPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/vmx.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c6
Update the documentation to no longer say that nested EPT is not supported.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
Documentation/virtual/kvm/nested-vmx.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Document
build the shadow EPT table when L1 calls INVEPT.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/include/asm/vmx.h | 4 +-
arch/x86/include/uapi/asm/vmx.h | 1 +
arch/x86/kvm/vmx.c | 83 +
.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/vmx.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 66ead51..76df3a8 100644
--- a/arch/x86/kvm/vmx.c
+++ b
Some additional comments to preexisting code:
Explain who (L0 or L1) handles EPT violation and misconfiguration exits.
Don't mention "shadow on either EPT or shadow" as the only two options.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao X
Kivity's review of the original nested VMX patches),
we can't avoid this problem and need to fix it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/x86.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/x86/
This patch adds this copy.
If L0 isn't controlling cr3 when running L2 (i.e., L0 is using EPT), and
whoever does control cr3 (L1 or L2) is using PAE, the processor might have
saved PDPTEs and we should also save them in vmcs12 (and restore later).
Signed-off-by: Nadav Har'El
Signed-off-b
us patch).
Then, we need to switch back and forth between this nested context and the
regular MMU context when switching between L1 and L2 (when L1 runs this L2
with EPT).
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arc
read and write EPT tables.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/mmu.c | 35 ++--
arch/x86/kvm/paging_tmpl.h | 133 ++---
2 files changed, 130 insertions(+), 38 deletions(-)
d
elf sets one of several vmcs02 fields), so we always
support this feature, regardless of whether the host supports it.
Signed-off-by: Nadav Har'El
Signed-off-by: Jun Nakajima
Signed-off-by: Xinhao Xu
---
arch/x86/kvm/vmx.c | 18 ++
1 file changed, 14 insertions(+), 4 deleti
50 matches
Mail list logo