[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/HVM: avoid memory_type_changed() invocations when possible
commit 4e34e0586f77aafd1cb85142de9c5e7ceaff84ee Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Wed Jul 18 10:36:40 2018 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Jul 18 10:36:40 2018 +0200 x86/HVM: avoid memory_type_changed() invocations when possible They're expensive, and nothing changes if MTRRs are disabled and any of the ranges gets changed, or if fixed range MTRRs are disabled and any of them gets changed. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/hvm/mtrr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index eb86cbacb4..c502dda693 100644 --- a/xen/arch/x86/hvm/mtrr.c +++ b/xen/arch/x86/hvm/mtrr.c @@ -472,7 +472,9 @@ bool_t mtrr_fix_range_msr_set(struct domain *d, struct mtrr_state *m, return 0; fixed_range_base[row] = msr_content; - memory_type_changed(d); + + if ( m->enabled && m->fixed_enabled ) + memory_type_changed(d); } return 1; @@ -515,7 +517,8 @@ bool_t mtrr_var_range_msr_set( m->overlapped = is_var_mtrr_overlapped(m); - memory_type_changed(d); + if ( m->enabled ) + memory_type_changed(d); return 1; } -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |