Although EB.PF in vmcs02 is still set by simply "or"ing the EB of vmcs01 and vmcs12, the explanation is obsolete. "enable_ept" being set is not the only reason for L0 to clear its EB.PF. Signed-off-by: Yu Zhang <yu.c.zhang@xxxxxxxxxxxxxxx> --- arch/x86/kvm/vmx/nested.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 778f82015f03..634a7d218048 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -2451,10 +2451,10 @@ static void prepare_vmcs02_rare(struct vcpu_vmx *vmx, struct vmcs12 *vmcs12) * is not easy (if at all possible?) to merge L0 and L1's desires, we * simply ask to exit on each and every L2 page fault. This is done by * setting MASK=MATCH=0 and (see below) EB.PF=1. - * Note that below we don't need special code to set EB.PF beyond the - * "or"ing of the EB of vmcs01 and vmcs12, because when enable_ept, - * vmcs01's EB.PF is 0 so the "or" will take vmcs12's value, and when - * !enable_ept, EB.PF is 1, so the "or" will always be 1. + * Note that EB.PF is set by "or"ing of the EB of vmcs01 and vmcs12, + * because when L0 has no desire to intercept #PF, vmcs01's EB.PF is 0 + * so the "or" will take vmcs12's value, otherwise EB.PF is 1, so the + * "or" will always be 1. */ if (vmx_need_pf_intercept(&vmx->vcpu)) { /* -- 2.25.1