* [PATCH] x86/HVM: avoid memory_type_changed() invocations when possible
@ 2018-07-16 16:45 Jan Beulich
2018-07-16 17:08 ` Andrew Cooper
2018-07-17 11:07 ` Roger Pau Monné
0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2018-07-16 16:45 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper
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@suse.com>
--- 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 dom
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;
}
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/HVM: avoid memory_type_changed() invocations when possible
2018-07-16 16:45 [PATCH] x86/HVM: avoid memory_type_changed() invocations when possible Jan Beulich
@ 2018-07-16 17:08 ` Andrew Cooper
2018-07-17 11:07 ` Roger Pau Monné
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2018-07-16 17:08 UTC (permalink / raw)
To: Jan Beulich, xen-devel
On 16/07/18 17:45, Jan Beulich wrote:
> 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@suse.com>
There is still far more room improve here, but this is a start.
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/HVM: avoid memory_type_changed() invocations when possible
2018-07-16 16:45 [PATCH] x86/HVM: avoid memory_type_changed() invocations when possible Jan Beulich
2018-07-16 17:08 ` Andrew Cooper
@ 2018-07-17 11:07 ` Roger Pau Monné
1 sibling, 0 replies; 3+ messages in thread
From: Roger Pau Monné @ 2018-07-17 11:07 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Andrew Cooper
On Mon, Jul 16, 2018 at 10:45:41AM -0600, Jan Beulich wrote:
> 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@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-17 11:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-16 16:45 [PATCH] x86/HVM: avoid memory_type_changed() invocations when possible Jan Beulich
2018-07-16 17:08 ` Andrew Cooper
2018-07-17 11:07 ` Roger Pau Monné
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).