[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging-4.9] x86/p2m: missing adjustments after 25f5530fc43b
commit 8d1ee9f2c473fec54b5018c01ad556d7afd62c17 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Dec 3 14:36:24 2019 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Dec 3 14:36:24 2019 +0100 x86/p2m: missing adjustments after 25f5530fc43b There was a piece of code missing in the backport of 183f354e1430 ("x86/vvmx: Fix livelock with XSA-304 fix"), which ought to have been taken from 0cafb89ae632 ("x86/vtx: Allow runtime modification of the exec-sp setting"). Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/mm/p2m.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 25fed08efb..110044b2c4 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -262,17 +262,22 @@ int p2m_is_logdirty_range(struct p2m_domain *p2m, unsigned long start, return 0; } +/* + * May be called with ot = nt = p2m_ram_rw for its side effect of + * recalculating all PTEs in the p2m. + */ void p2m_change_entry_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt) { struct p2m_domain *p2m = p2m_get_hostp2m(d); - ASSERT(ot != nt); ASSERT(p2m_is_changeable(ot) && p2m_is_changeable(nt)); p2m_lock(p2m); p2m->change_entry_type_global(p2m, ot, nt); - p2m->global_logdirty = (nt == p2m_ram_logdirty); + /* Don't allow 'recalculate' operations to change the logdirty state. */ + if ( ot != nt ) + p2m->global_logdirty = (nt == p2m_ram_logdirty); p2m_unlock(p2m); } -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.9 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |