is '0'), the
preemption timer would trigger immediate VMExit, so the host timer would
be handled in the preemption timer handler.
Thanks!
Zhimin
在 2021/2/9 上午2:13, Konrad Rzeszutek Wilk 写道:
On Fri, Feb 05, 2021 at 06:03:08PM +0800, Zhimin Feng wrote:
The main motivation for this patch
Hi tglx
This question is very nice, we should be considered to judge whether
the current active device is the tsc deadline timer. I will fix this in V2.
Thanks
Zhimin
在 2021/2/6 上午2:11, Thomas Gleixner 写道:
On Fri, Feb 05 2021 at 18:03, Zhimin Feng wrote:
@@ -520,6 +521,24 @@ struct
| 411766.67|
-
Avg.Latency|0.99483 | 1.24294 |
=
Zhimin Feng (9):
KVM: vmx: hook set_next_event for getting the host tscd
KVM: vmx
Use preemption timer to handle host timer
Signed-off-by: Zhimin Feng
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx/vmx.c | 54 +
arch/x86/kvm/x86.c | 1 +
3 files changed, 56 insertions(+)
diff --git a/arch/x86
Allow Guest to write tscdeadline msr directly.
Signed-off-by: Zhimin Feng
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/lapic.c| 9 +++
arch/x86/kvm/vmx/vmx.c | 56 +
3 files changed, 68 insertions(+)
diff --git
In order to get the host tscd value,
we need to hook set_next_event function
Signed-off-by: Zhimin Feng
---
arch/x86/include/asm/kvm_host.h | 21 +
arch/x86/kvm/vmx/vmx.c | 51 +
arch/x86/kvm/x86.c | 1 +
kernel/time
Switch the guest timer to software timer when the
VCPU is scheduled.
Signed-off-by: Zhimin Feng
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx/vmx.c | 65 +
arch/x86/kvm/x86.c | 12 ++--
3 files changed, 76
ust equal tsc_offset and vmcs
tsc offset filed equal 0, so the vm execute rdtsc the result like this:
rdtsc = host_tsc + tsc_adjust + 0
the tsc_deadline_msr value will equal tsc stampcounter msr and
the irq will trigger success.
Signed-off-by: Zhimin Feng
---
arch/x86/include/asm/kvm_host.h |
query the state of timer passthrough of specific vm
Signed-off-by: Zhimin Feng
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx/vmx.c | 11 +++
arch/x86/kvm/x86.c | 6 ++
include/uapi/linux/kvm.h| 1 +
tools/include/uapi/linux/kvm.h | 1
preemption timer is default disabled
timer passthrough is default enabled
Signed-off-by: Zhimin Feng
---
arch/x86/kvm/vmx/vmx.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 44b2fd59587e..a12da3cef86d 100644
Timer passthrough is default disabled
Signed-off-by: Zhimin Feng
---
arch/x86/include/asm/kvm_host.h | 3 +--
arch/x86/kvm/lapic.c| 10 +---
arch/x86/kvm/vmx/vmx.c | 52 +
arch/x86/kvm/x86.c | 6 +
include/linux
Record the host tscd value.
Signed-off-by: Zhimin Feng
---
arch/x86/kvm/vmx/vmx.c | 4
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index a12da3cef86d..98eca70d4251 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -251,8
12 matches
Mail list logo