Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437522
| From | Haozhong Zhang <haozhong.zhang@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running |
| Date | 2016-07-06 10:10 +0200 |
| Message-ID | <rRQ49-6FO-23@gated-at.bofh.it> (permalink) |
| References | <rRNpD-4Ya-9@gated-at.bofh.it> <rRNJ0-563-13@gated-at.bofh.it> <rROc1-5vh-11@gated-at.bofh.it> <rRPKO-6jE-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/06/16 09:46, Paolo Bonzini wrote: > > > On 06/07/2016 08:05, Haozhong Zhang wrote: > >> > > >> > Nested preemption timer is emulated by hrtimer, so it doesn't > >> > influence vmcs02, why this is needed? > > Nested (L2) preemption timer is not affected for sure, and this patch > > is to fix another problem caused by using L1 preemption timer for L1 > > TSC deadline timer. When we use L1 VMX preemption timer for L1 TSC > > deadline timer, we intend to use the pin-based exec config and the VMX > > preemption timer value in vmcs01. However, when L2 guest is running, > > vmcs02 is loaded as the current VMCS so that a different VMX > > preemption timer config is used (i.e. VMX preemption timer is disabled > > in prepare_vmcs02()). If we still use preemption timer for L1 TSC > > deadline timer at this moment, then L1 TSC deadline timer will not be > > able to be triggered when L2 guest is running. > > The right fix then is to set the pin-based controls in prepare_vmcs02, > based on vcpu->arch.hv_deadline_tsc. Then KVM needs to distinguish L1 and L2 VMEXITs for preemption timer (or does KVM already have this?). The current implementation which uses a separate hrtimer for L2 preemption timer can easily distinguish them. Haozhong
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Haozhong Zhang <haozhong.zhang@intel.com> - 2016-07-06 07:20 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Wanpeng Li <kernellwp@gmail.com> - 2016-07-06 07:40 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 08:10 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Haozhong Zhang <haozhong.zhang@intel.com> - 2016-07-06 08:10 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 09:50 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Haozhong Zhang <haozhong.zhang@intel.com> - 2016-07-06 10:10 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Haozhong Zhang <haozhong.zhang@intel.com> - 2016-07-06 10:10 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 10:20 +0200
Re: [PATCH] KVM: VMX: switch to hrtimer for TSC deadline timer when L2 guest is running Haozhong Zhang <haozhong.zhang@intel.com> - 2016-07-06 10:30 +0200
csiph-web