On 09/24/2009 11:03 AM, Gleb Natapov wrote:
The new rule is: Synchronize the states before accessing registers (or
in-kernel devices) the first time after a vmexit to user space.
No, the rule is: synchronize state before accessing registers.
Extra synchronization is cheap, while missing synchronization is
very expensive.
So should we stick cpu_synchronize_state() before each register
accesses? I think it is reasonable to omit it if all callers do it
already.
If the callee is static we can and should avoid it. If the function is
exported then we shouldn't rely on callers.
IOW, it's fine to depend on local details (which a reader can easily
gain), but better to avoid depending on global details.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html