@@ -2705,8 +2705,7 @@ static void nested_vmx_setup_ctls_msrs(struct vcpu_vmx *vmx)
27052705 SECONDARY_EXEC_APIC_REGISTER_VIRT |
27062706 SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
27072707 SECONDARY_EXEC_WBINVD_EXITING |
2708- SECONDARY_EXEC_XSAVES |
2709- SECONDARY_EXEC_PCOMMIT ;
2708+ SECONDARY_EXEC_XSAVES ;
27102709
27112710 if (enable_ept ) {
27122711 /* nested EPT: emulate EPT also to L1 */
@@ -3268,7 +3267,6 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
32683267 SECONDARY_EXEC_SHADOW_VMCS |
32693268 SECONDARY_EXEC_XSAVES |
32703269 SECONDARY_EXEC_ENABLE_PML |
3271- SECONDARY_EXEC_PCOMMIT |
32723270 SECONDARY_EXEC_TSC_SCALING ;
32733271 if (adjust_vmx_controls (min2 , opt2 ,
32743272 MSR_IA32_VMX_PROCBASED_CTLS2 ,
@@ -4856,9 +4854,6 @@ static u32 vmx_secondary_exec_control(struct vcpu_vmx *vmx)
48564854 if (!enable_pml )
48574855 exec_control &= ~SECONDARY_EXEC_ENABLE_PML ;
48584856
4859- /* Currently, we allow L1 guest to directly run pcommit instruction. */
4860- exec_control &= ~SECONDARY_EXEC_PCOMMIT ;
4861-
48624857 return exec_control ;
48634858}
48644859
@@ -4902,9 +4897,10 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
49024897
49034898 vmcs_write32 (CPU_BASED_VM_EXEC_CONTROL , vmx_exec_control (vmx ));
49044899
4905- if (cpu_has_secondary_exec_ctrls ())
4900+ if (cpu_has_secondary_exec_ctrls ()) {
49064901 vmcs_write32 (SECONDARY_VM_EXEC_CONTROL ,
49074902 vmx_secondary_exec_control (vmx ));
4903+ }
49084904
49094905 if (kvm_vcpu_apicv_active (& vmx -> vcpu )) {
49104906 vmcs_write64 (EOI_EXIT_BITMAP0 , 0 );
@@ -7557,13 +7553,6 @@ static int handle_pml_full(struct kvm_vcpu *vcpu)
75577553 return 1 ;
75587554}
75597555
7560- static int handle_pcommit (struct kvm_vcpu * vcpu )
7561- {
7562- /* we never catch pcommit instruct for L1 guest. */
7563- WARN_ON (1 );
7564- return 1 ;
7565- }
7566-
75677556/*
75687557 * The exit handlers return 1 if the exit was handled fully and guest execution
75697558 * may resume. Otherwise they set the kvm_run parameter to indicate what needs
@@ -7614,7 +7603,6 @@ static int (*const kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = {
76147603 [EXIT_REASON_XSAVES ] = handle_xsaves ,
76157604 [EXIT_REASON_XRSTORS ] = handle_xrstors ,
76167605 [EXIT_REASON_PML_FULL ] = handle_pml_full ,
7617- [EXIT_REASON_PCOMMIT ] = handle_pcommit ,
76187606};
76197607
76207608static const int kvm_vmx_max_exit_handlers =
@@ -7923,8 +7911,6 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
79237911 * the XSS exit bitmap in vmcs12.
79247912 */
79257913 return nested_cpu_has2 (vmcs12 , SECONDARY_EXEC_XSAVES );
7926- case EXIT_REASON_PCOMMIT :
7927- return nested_cpu_has2 (vmcs12 , SECONDARY_EXEC_PCOMMIT );
79287914 default :
79297915 return true;
79307916 }
@@ -9085,15 +9071,6 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
90859071
90869072 if (cpu_has_secondary_exec_ctrls ())
90879073 vmcs_set_secondary_exec_control (secondary_exec_ctl );
9088-
9089- if (static_cpu_has (X86_FEATURE_PCOMMIT ) && nested ) {
9090- if (guest_cpuid_has_pcommit (vcpu ))
9091- vmx -> nested .nested_vmx_secondary_ctls_high |=
9092- SECONDARY_EXEC_PCOMMIT ;
9093- else
9094- vmx -> nested .nested_vmx_secondary_ctls_high &=
9095- ~SECONDARY_EXEC_PCOMMIT ;
9096- }
90979074}
90989075
90999076static void vmx_set_supported_cpuid (u32 func , struct kvm_cpuid_entry2 * entry )
@@ -9706,8 +9683,7 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
97069683 exec_control &= ~(SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
97079684 SECONDARY_EXEC_RDTSCP |
97089685 SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
9709- SECONDARY_EXEC_APIC_REGISTER_VIRT |
9710- SECONDARY_EXEC_PCOMMIT );
9686+ SECONDARY_EXEC_APIC_REGISTER_VIRT );
97119687 if (nested_cpu_has (vmcs12 ,
97129688 CPU_BASED_ACTIVATE_SECONDARY_CONTROLS ))
97139689 exec_control |= vmcs12 -> secondary_vm_exec_control ;
0 commit comments