Cc: Virtualization Mailing List <virtualization@...>, Linux Kernel Mailing List <linux-kernel@...>, Andi Kleen <ak@...>, Zachary Amsden <zach@...>, Avi Kivity <avi@...>, Anthony Liguori <anthony@...>, Glauber de Oliveira Costa <glommer@...>, Nakajima, Jun <jun.nakajima@...>
On Mon, 2007-10-01 at 23:29 -0700, Jeremy Fitzhardinge wrote:
No, they're helpers. eg:
static void lguest_exit_lazy(enum paravirt_lazy_mode mode)
{
paravirt_exit_lazy(mode);
lguest_flush_hcalls();
}
Probably overkill (I was trying to avoid the branch for the case where
we don't need to flush, as that's always what happens).
So just expose a flush hook:
static inline void arch_flush_lazy_cpu_mode(void)
{
PVOP_VCALL1(flush_lazy_mode, PARAVIRT_LAZY_CPU);
}
....
static void lguest_flush_lazy_mode(enum paravirt_lazy_mode mode)
{
if (unlikely(x86_read_percpu(paravirt_lazy_mode) == mode)) {
lguest_lazy_cpu_leave();
lguest_lazy_cpu_enter();
}
}
Cheers,
Rusty.
-