>>> On 26.06.18 at 16:21, <[email protected]> wrote: > When SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS is set, > vmx_vcpu_update_eptp() __vmwrites() EPTP_INDEX in > altp2m_vcpu_destroy(). This means that when disabling altp2m on a > domain after xc_altp2m_set_vcpu_enable_notify() has been > successfully called, EPTP_INDEX ends up being stored as > INVALID_ALTP2M. This makes it possible for vmx_vmexit_handler() > to __vmread() the stale value after a subsequent call to > xc_altp2m_set_vcpu_enable_notify(), and BUG_ON(idx >= MAX_ALTP2M).
I'm fine with the code change now, but I think this 3rd approach of addressing the issue needs the description to be changed. Already on v2 it wouldn't have become clear to me what the issue was from just reading the description. In particular you now want to point out why the change is correct / necessary also for the other invocation of altp2m_vcpu_update_vmfunc_ve(). It would also be helpful to have a statement on why other altp2m_vcpu_update_p2m() invocations don't need to be prefixed (now: replaced) by altp2m_vcpu_update_vmfunc_ve(). In the end it might well be that folding the two hooks into one is the best course of action. Jan _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
