Re: [PATCH v3 13/13] nEPT: Inject EPT violation/misconfigration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 19/05/2013 06:52, Jun Nakajima ha scritto:
> @@ -7441,10 +7443,81 @@ static void nested_ept_inject_page_fault(struct kvm_vcpu *vcpu,
>  	 * Note no need to set vmcs12->vm_exit_reason as it is already copied
>  	 * from vmcs02 in nested_vmx_vmexit() above, i.e., EPT_VIOLATION.
>  	 */

This comment is now wrong.

> -	vmcs12->exit_qualification = fault->error_code;

And this shows that patch 5 ("nEPT: MMU context for nested EPT") was
wrong in this respect.  Perhaps this patch should be moved earlier in
the series, so that the exit qualification is "bisectably" ok.

1) the updating of exit_qualification in walk_addr_generic should be
split out and moved before patch 5;

2) the changes to handle_ept_violation and nested_ept_inject_page_fault
(plus fixing the above comment) should also be split out, this time to
squash them in patch 5.  These two changes ensure that patch 5 can
already use the right exit qualification.

3) if needed to make the series bisectable, squash patch 12 into patch 2
and make is_rsvd_bits_set always return 0 in patch 3; then the rest of
the handling of reserved bits (including the introduction of
check_tdp_pte) will remain here. Otherwise, just squash what's left of
this patch into patch 12 and again change the subject.   In either case
the subject will have to change.

Paolo

> +	if (fault->error_code & PFERR_RSVD_MASK)
> +		vmcs12->vm_exit_reason = EXIT_REASON_EPT_MISCONFIG;
> +	else
> +		vmcs12->vm_exit_reason = EXIT_REASON_EPT_VIOLATION;
> +
> +	vmcs12->exit_qualification = vcpu->arch.exit_qualification;
>  	vmcs12->guest_physical_address = fault->address;
>  }
>  

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux