KVM: VMX: Drop hv_timer_armed from 'struct loaded_vmcs'
... now that it is fully redundant with the pin controls shadow. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Родитель
469debdb8b
Коммит
9d99cc49a4
|
@ -2015,7 +2015,6 @@ static void prepare_vmcs02_early(struct vcpu_vmx *vmx, struct vmcs12 *vmcs12)
|
||||||
exec_control |= vmcs12->pin_based_vm_exec_control;
|
exec_control |= vmcs12->pin_based_vm_exec_control;
|
||||||
/* Preemption timer setting is computed directly in vmx_vcpu_run. */
|
/* Preemption timer setting is computed directly in vmx_vcpu_run. */
|
||||||
exec_control &= ~PIN_BASED_VMX_PREEMPTION_TIMER;
|
exec_control &= ~PIN_BASED_VMX_PREEMPTION_TIMER;
|
||||||
vmx->loaded_vmcs->hv_timer_armed = false;
|
|
||||||
|
|
||||||
/* Posted interrupts setting is only taken from vmcs12. */
|
/* Posted interrupts setting is only taken from vmcs12. */
|
||||||
if (nested_cpu_has_posted_intr(vmcs12)) {
|
if (nested_cpu_has_posted_intr(vmcs12)) {
|
||||||
|
|
|
@ -61,7 +61,6 @@ struct loaded_vmcs {
|
||||||
int cpu;
|
int cpu;
|
||||||
bool launched;
|
bool launched;
|
||||||
bool nmi_known_unmasked;
|
bool nmi_known_unmasked;
|
||||||
bool hv_timer_armed;
|
|
||||||
/* Support for vnmi-less CPUs */
|
/* Support for vnmi-less CPUs */
|
||||||
int soft_vnmi_blocked;
|
int soft_vnmi_blocked;
|
||||||
ktime_t entry_time;
|
ktime_t entry_time;
|
||||||
|
|
|
@ -6359,9 +6359,7 @@ static void atomic_switch_perf_msrs(struct vcpu_vmx *vmx)
|
||||||
static void vmx_arm_hv_timer(struct vcpu_vmx *vmx, u32 val)
|
static void vmx_arm_hv_timer(struct vcpu_vmx *vmx, u32 val)
|
||||||
{
|
{
|
||||||
vmcs_write32(VMX_PREEMPTION_TIMER_VALUE, val);
|
vmcs_write32(VMX_PREEMPTION_TIMER_VALUE, val);
|
||||||
if (!vmx->loaded_vmcs->hv_timer_armed)
|
|
||||||
pin_controls_setbit(vmx, PIN_BASED_VMX_PREEMPTION_TIMER);
|
pin_controls_setbit(vmx, PIN_BASED_VMX_PREEMPTION_TIMER);
|
||||||
vmx->loaded_vmcs->hv_timer_armed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vmx_update_hv_timer(struct kvm_vcpu *vcpu)
|
static void vmx_update_hv_timer(struct kvm_vcpu *vcpu)
|
||||||
|
@ -6388,9 +6386,7 @@ static void vmx_update_hv_timer(struct kvm_vcpu *vcpu)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vmx->loaded_vmcs->hv_timer_armed)
|
|
||||||
pin_controls_clearbit(vmx, PIN_BASED_VMX_PREEMPTION_TIMER);
|
pin_controls_clearbit(vmx, PIN_BASED_VMX_PREEMPTION_TIMER);
|
||||||
vmx->loaded_vmcs->hv_timer_armed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp)
|
void vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче