aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorNadav Har'El <nyh@il.ibm.com>2013-08-05 04:07:20 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2013-08-07 09:57:44 -0400
commitf5c4368f8514e092556cb95172024cab92d00859 (patch)
tree352fd33541c4e66c250bf77cbdd712fbd2f0a6fc /arch/x86/kvm
parent2b1be677413b63e2464ec18b998524482eb42bcf (diff)
nEPT: Miscelleneous cleanups
Some trivial code cleanups not really related to nested EPT. Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Nadav Har'El <nyh@il.ibm.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Xinhao Xu <xinhao.xu@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 66af929bfb9d..5b6f2a86826b 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -716,7 +716,6 @@ static unsigned long nested_ept_get_cr3(struct kvm_vcpu *vcpu);
716static u64 construct_eptp(unsigned long root_hpa); 716static u64 construct_eptp(unsigned long root_hpa);
717static void kvm_cpu_vmxon(u64 addr); 717static void kvm_cpu_vmxon(u64 addr);
718static void kvm_cpu_vmxoff(void); 718static void kvm_cpu_vmxoff(void);
719static void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3);
720static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr); 719static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr);
721static void vmx_set_segment(struct kvm_vcpu *vcpu, 720static void vmx_set_segment(struct kvm_vcpu *vcpu,
722 struct kvm_segment *var, int seg); 721 struct kvm_segment *var, int seg);
@@ -1041,8 +1040,7 @@ static inline bool nested_cpu_has2(struct vmcs12 *vmcs12, u32 bit)
1041 (vmcs12->secondary_vm_exec_control & bit); 1040 (vmcs12->secondary_vm_exec_control & bit);
1042} 1041}
1043 1042
1044static inline bool nested_cpu_has_virtual_nmis(struct vmcs12 *vmcs12, 1043static inline bool nested_cpu_has_virtual_nmis(struct vmcs12 *vmcs12)
1045 struct kvm_vcpu *vcpu)
1046{ 1044{
1047 return vmcs12->pin_based_vm_exec_control & PIN_BASED_VIRTUAL_NMIS; 1045 return vmcs12->pin_based_vm_exec_control & PIN_BASED_VIRTUAL_NMIS;
1048} 1046}
@@ -6770,7 +6768,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
6770 6768
6771 if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked && 6769 if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked &&
6772 !(is_guest_mode(vcpu) && nested_cpu_has_virtual_nmis( 6770 !(is_guest_mode(vcpu) && nested_cpu_has_virtual_nmis(
6773 get_vmcs12(vcpu), vcpu)))) { 6771 get_vmcs12(vcpu))))) {
6774 if (vmx_interrupt_allowed(vcpu)) { 6772 if (vmx_interrupt_allowed(vcpu)) {
6775 vmx->soft_vnmi_blocked = 0; 6773 vmx->soft_vnmi_blocked = 0;
6776 } else if (vmx->vnmi_blocked_time > 1000000000LL && 6774 } else if (vmx->vnmi_blocked_time > 1000000000LL &&