if (!VALID_PAGE(kvm_arch->hv_root_tdp)) {
nr_unique_valid_roots = 0;
/* * Flush all valid roots, and see if all vCPUs have converged * on a common root, in which case future flushes can skip the * loop and flush the common root.
*/
kvm_for_each_vcpu(i, vcpu, kvm) {
root = vcpu->arch.hv_root_tdp; if (!VALID_PAGE(root) || root == kvm_arch->hv_root_tdp) continue;
/* * Set the tracked root to the first valid root. Keep * this root for the entirety of the loop even if more * roots are encountered as a low effort optimization * to avoid flushing the same (first) root again.
*/ if (++nr_unique_valid_roots == 1)
kvm_arch->hv_root_tdp = root;
if (!ret)
ret = hv_remote_flush_root_tdp(root, range);
/* * Stop processing roots if a failure occurred and * multiple valid roots have already been detected.
*/ if (ret && nr_unique_valid_roots > 1) break;
}
/* * The optimized flush of a single root can't be used if there * are multiple valid roots (obviously).
*/ if (nr_unique_valid_roots > 1)
kvm_arch->hv_root_tdp = INVALID_PAGE;
} else {
ret = hv_remote_flush_root_tdp(kvm_arch->hv_root_tdp, range);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.