[Xen-devel] Re: [GIT PULL] xen /proc/mtrr implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Beulich
Date: Tuesday, May 19, 2009 - 3:22 am

>>> Ingo Molnar <mingo@elte.hu> 19.05.09 11:59 >>>

But that is *not* the same as using the hypercalls: The hypercall tells Xen
"Change all CPUs' MTRRs with the indicated index to the indicated value",
while the MSR write says "Change the MTRR with the given index on the
physical CPU the current virtual CPU happens to run on to the given value".
A write-base/write-mask pair may happen to get interrupted (preempted)
by the hypervisor, and hence the two writes may happen on different
pCPU-s. Teaching the hypervisor to (correctly!) guess what the guest
meant in that situation isn't trivial, as then it needs to handle all possible
situations (and it can never know whether Dom0 really intended to do
something that may look bogus/inconsistent at the first glance). This is
even more so considering that Linux is not the only OS capable of
running as Dom0.

An apparently relatively simple solution - latch the writes and commit them
only when the global view became consistent again - isn't possible,
since Dom0 may not have a vCPU running on each individual pCPU.

Jan

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Tue May 12, 4:27 pm)
[PATCH 3/6] xen mtrr: Use generic_validate_add_page(), Jeremy Fitzhardinge, (Tue May 12, 4:27 pm)
[PATCH 5/6] xen mtrr: Add xen_{get,set}_mtrr() implementations, Jeremy Fitzhardinge, (Tue May 12, 4:27 pm)
[PATCH 6/6] xen mtrr: Kill some unnecessary includes, Jeremy Fitzhardinge, (Tue May 12, 4:27 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Ingo Molnar, (Wed May 13, 6:30 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Wed May 13, 7:39 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Ingo Molnar, (Fri May 15, 11:27 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Fri May 15, 1:09 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Eric W. Biederman, (Fri May 15, 4:26 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Fri May 15, 4:49 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Jesse Barnes, (Fri May 15, 8:22 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Eric W. Biederman, (Fri May 15, 9:26 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Jesse Barnes, (Sat May 16, 11:22 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Sun May 17, 9:57 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Sun May 17, 10:02 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Ingo Molnar, (Mon May 18, 1:59 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Chris Wright, (Mon May 18, 10:51 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Mon May 18, 11:07 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Ingo Molnar, (Tue May 19, 2:59 am)
[Xen-devel] Re: [GIT PULL] xen /proc/mtrr implementation, Jan Beulich, (Tue May 19, 3:22 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Andi Kleen, (Wed May 20, 1:16 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Wed May 20, 9:12 am)
Re: [Xen-devel] Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Wed May 20, 9:35 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Wed May 20, 9:39 am)
Re: [GIT PULL] xen /proc/mtrr implementation, Jeremy Fitzhardinge, (Wed May 20, 3:49 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, Andi Kleen, (Wed May 20, 3:52 pm)
Re: [GIT PULL] xen /proc/mtrr implementation, H. Peter Anvin, (Wed May 20, 4:03 pm)