From: Haiwei Li
Add compile-time assertions in vmcs_check32() to disallow accesses to
64-bit and 64-bit high fields via vmcs_{read,write}32(). Upper level KVM
code should never do partial accesses to VMCS fields. KVM handles the
split accesses automatically in vmcs_{read,write}64() when running
From: Haiwei Li
vmcs_check32 misses the check for 64-bit and 64-bit high.
Signed-off-by: Haiwei Li
---
arch/x86/kvm/vmx/vmx_ops.h | 4
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kvm/vmx/vmx_ops.h b/arch/x86/kvm/vmx/vmx_ops.h
index 692b0c3..164b64f 100644
--- a/arch/x86/kvm/vmx
From: Haiwei Li
According to IA-32 SDM Vol.3D "A.1 BASIC VMX INFORMATION", two inspections
are missing.
* Bit 31 is always 0. Earlier versions of this manual specified that the
VMCS revision identifier was a 32-bit field in bits 31:0 of this MSR. For
all processors produced prior to this change,
From: Haiwei Li
kvm_msr_ignored_check function never uses vcpu argument. Clean up the
function and invokers.
Signed-off-by: Haiwei Li
---
arch/x86/kvm/x86.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 012d5df..27e9e
From: Haiwei Li
In my test environment, advance_expire_delta is frequently greater than
the fixed LAPIC_TIMER_ADVANCE_ADJUST_MAX. And this will hinder the
adjustment.
Adding module parameters for LAPIC_TIMER_ADVANCE_ADJUST_MAX/MIN, so they
can be dynamically adjusted.
Signed-off-by: Haiwei Li
From: Haiwei Li
Both 'kvm_send_ipi_mask_allbutself' and 'kvm_flush_tlb_others' are using
per-cpu __pv_cpu_mask. Init pv ipi ops only if the allocation succeeds and
check the cpumask in 'kvm_flush_tlb_others'.
Thanks to Vitaly Kuznetsov's tireless advice.
Suggested-by: Vitaly Kuznetsov
Signed-o
From: Haiwei Li
check the allocation of per-cpu __pv_cpu_mask. Init
'send_IPI_mask_allbutself' only when successful and check the allocation
of __pv_cpu_mask in 'kvm_flush_tlb_others'.
Suggested-by: Vitaly Kuznetsov
Signed-off-by: Haiwei Li
---
v1 -> v2:
* add CONFIG_SMP for kvm_send_ipi_mask
From: Haiwei Li
When vmexit occurs caused by accessing dr, there is no tracepoint to track
this action. Add tracepoint for this on x86 kvm.
Signed-off-by: Haiwei Li
---
v1 -> v2:
* Improve the changelog
arch/x86/kvm/svm/svm.c | 2 ++
arch/x86/kvm/trace.h | 27 +++
From: Haiwei Li
Add tracepoint trace_kvm_dr_write/trace_kvm_dr_read for x86 kvm.
Signed-off-by: Haiwei Li
---
arch/x86/kvm/svm/svm.c | 2 ++
arch/x86/kvm/trace.h | 27 +++
arch/x86/kvm/vmx/vmx.c | 10 --
arch/x86/kvm/x86.c | 1 +
4 files changed, 38 inse
From: Haiwei Li
check the allocation of per-cpu __pv_cpu_mask.
Suggested-by: Vitaly Kuznetsov
Signed-off-by: Haiwei Li
---
v1 -> v2:
* add CONFIG_SMP for kvm_send_ipi_mask_allbutself to prevent build error
v2 -> v3:
* always check the allocation of __pv_cpu_mask in kvm_flush_tlb_others
arc
From: Haiwei Li
Use __GFP_ZERO while alloc_page().
Signed-off-by: Haiwei Li
---
arch/x86/kvm/svm/avic.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
index ac830cd50830..f73f84d56452 100644
--- a/arch/x86/kvm/svm/avi
From: Haiwei Li
'exit_fastpath' isn't used anywhere else, so remove it.
Suggested-by: Krish Sadhukhan
Signed-off-by: Haiwei Li
---
arch/x86/kvm/svm/svm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index c44f3e9..6e886
From: Haiwei Li
Without this patch, kvm_flush_tlb_others is not called. We can always check
if __pv_cpu_mask was allocated and revert back to the architectural path if
not.
Suggested-by: Vitaly Kuznetsov
Signed-off-by: Haiwei Li
---
arch/x86/kernel/kvm.c | 8 ++--
1 file changed, 6 insert
From: Haiwei Li
Hi,
There is a old version patch of 'KVM: Check the allocation of pv cpu mask'
in upstream. The v2 and what is discussed is in url:
https://lore.kernel.org/kvm/87o8mlooki@vitty.brq.redhat.com/
In this patch, i fix the build error and make changes as suggested.
Haiwei Li (2
From: Haiwei Li
When CONFIG_SMP is not set, an build error occurs with message "error:
use of undeclared identifier 'kvm_send_ipi_mask_allbutself'"
Fixes: 0f990222108d ("KVM: Check the allocation of pv cpu mask", 2020-09-01)
Reported-by: kernel test robot
Signed-off-by: Haiwei Li
---
arch/x86
15 matches
Mail list logo