summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/time.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@xensource.com>2007-10-16 20:51:30 +0200
committerJeremy Fitzhardinge <jeremy@goop.org>2007-10-16 20:51:30 +0200
commitf0d733942750c1ee6358c3a4a1a5d7ba73b7122f (patch)
tree32d0802b60078b6a2f43ce19d9019033ada6485d /arch/x86/xen/time.c
parentClean up duplicate includes in arch/i386/xen/ (diff)
downloadlinux-f0d733942750c1ee6358c3a4a1a5d7ba73b7122f.tar.xz
linux-f0d733942750c1ee6358c3a4a1a5d7ba73b7122f.zip
xen: yield to IPI target if necessary
When sending a call-function IPI to a vcpu, yield if the vcpu isn't running. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Diffstat (limited to 'arch/x86/xen/time.c')
-rw-r--r--arch/x86/xen/time.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index dfd6db69ead5..d083ff5ef088 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -105,6 +105,12 @@ static void get_runstate_snapshot(struct vcpu_runstate_info *res)
} while (get64(&state->state_entry_time) != state_time);
}
+/* return true when a vcpu could run but has no real cpu to run on */
+bool xen_vcpu_stolen(int vcpu)
+{
+ return per_cpu(runstate, vcpu).state == RUNSTATE_runnable;
+}
+
static void setup_runstate_info(int cpu)
{
struct vcpu_register_runstate_memory_area area;