--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
return 0;
}
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+ return false;
+}
+
#endif
#endif
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
return r;
}
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+ return false;
+}
+
#endif /* __KERNEL__ */
#endif /* __POWERPC_KVM_PARA_H__ */
return 0;
}
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+ return false;
+}
+
#endif
#endif /* __S390_KVM_PARA_H */
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#include <asm-generic/kvm_para.h>
extern void kvmclock_init(void);
extern int kvm_register_clock(char *txt);
+#ifdef CONFIG_KVM_CLOCK
+bool kvm_check_and_clear_guest_paused(void);
+#else
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+ return false;
+}
+#endif /* CONFIG_KVMCLOCK */
/* This instruction is vmcall. On non-VT architectures, it will generate a
* trap that we will then rewrite to the appropriate instruction.
#include <asm/msr.h>
#include <asm/apic.h>
#include <linux/percpu.h>
+#include <linux/hardirq.h>
#include <asm/x86_init.h>
#include <asm/reboot.h>
preset_lpj = lpj;
}
+bool kvm_check_and_clear_guest_paused(void)
+{
+ bool ret = false;
+ struct pvclock_vcpu_time_info *src;
+
+ /*
+ * per_cpu() is safe here because this function is only called from
+ * timer functions where preemption is already disabled.
+ */
+ WARN_ON(!in_atomic());
+ src = &__get_cpu_var(hv_clock);
+ if ((src->flags & PVCLOCK_GUEST_STOPPED) != 0) {
+ __this_cpu_and(hv_clock.flags, ~PVCLOCK_GUEST_STOPPED);
+ ret = true;
+ }
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(kvm_check_and_clear_guest_paused);
+
static struct clocksource kvm_clock = {
.name = "kvm-clock",
.read = kvm_clock_get_cycles,
--- /dev/null
+#include <asm-generic/kvm_para.h>
--- /dev/null
+#ifndef _ASM_GENERIC_KVM_PARA_H
+#define _ASM_GENERIC_KVM_PARA_H
+
+
+/*
+ * This function is used by architectures that support kvm to avoid issuing
+ * false soft lockup messages.
+ */
+static inline bool kvm_check_and_clear_guest_paused(void)
+{
+ return false;
+}
+
+#endif