Re: [PATCH] KVM: nVMX: consult PFER_MASK and PFER_MATCH before nested vmexit if inject #PF
From: Paolo Bonzini
Date: Mon Jul 24 2017 - 10:28:18 EST
On 24/07/2017 15:57, Wanpeng Li wrote:
>
> if (!((vmcs12->exception_bitmap & (1u << nr)) ||
> - (nr == PF_VECTOR && vcpu->arch.exception.nested_apf)))
> + (nr == PF_VECTOR && (vcpu->arch.exception.nested_apf ||
> + nested_vmx_is_page_fault_vmexit(vmcs12,
> vcpu->arch.exception.error_code)))))
> return 0;
No, it would be more like
if (nr == PF_VECTOR
? (vcpu->arch.exception.nested_apf ||
nested_vmx_is_page_fault_vmexit(vmcs12, vcpu->arch.exception.error_code))
: (vmcs12->exception_bitmap & (1u << nr)))
but I've sent an RFC patch that also fixes the exit qualification.
Paolo