Displaying 3 results from an estimated 3 matches for "vcpu_pause_self".
2007 Feb 14
0
[PATCH 11/12] Allow vcpu to pause self
...375,6 +375,18 @@ void vcpu_pause_nosync(struct vcpu *v)
vcpu_sleep_nosync(v);
}
+/* This is not a code path called from guest, since execution is paused
+ * after next context switch. ACPI PM requires this to pause vcpu0 of
+ * dom0 itself, in case that vcpu not running on cpu 0.
+ */
+void vcpu_pause_self(void)
+{
+ struct vcpu *v = current;
+
+ set_bit(_VCPUF_need_sync, &v->vcpu_flags);
+ vcpu_pause_nosync(v);
+}
+
void vcpu_unpause(struct vcpu *v)
{
int wake;
diff -r f6443af464be xen/common/schedule.c
--- a/xen/common/schedule.c Tue Feb 13 13:37:12 2007 +0800
+++ b/xen/commo...
2007 Jun 27
10
[PATCH 6/10] Allow vcpu to pause self
...4 18:35:31 2007 -0400
+++ b/xen/common/domain.c Mon May 14 20:21:04 2007 -0400
@@ -530,6 +530,17 @@ void vcpu_pause_nosync(struct vcpu *v)
vcpu_sleep_nosync(v);
}
+/* _VPF_need_sync serves not only as flag for sync pause, but also
+ * as hint for other cpu waiting for this pause.
+ */
+void vcpu_pause_self(void)
+{
+ struct vcpu *v = current;
+
+ set_bit(_VPF_need_sync, &v->pause_flags);
+ vcpu_pause_nosync(v);
+}
+
void vcpu_unpause(struct vcpu *v)
{
if ( atomic_dec_and_test(&v->pause_count) )
diff -r d5315422dbc8 xen/common/schedule.c
--- a/xen/common/schedule.c Mon Ma...
2007 Jun 27
1
[PATCH 7/10] SMP support to Xen PM
...cpu0, sleep direclty\n");
+ ret = enter_state(acpi_sinfo.sleep_state);
+ thaw_domains();
+ return ret;
+ }
+
+ pmprintk(XENLOG_INFO, "vcpu0 on cpu%d, pause self and notify
cpu0\n",
+ current->processor);
+ cpu_raise_softirq(0, PM_SOFTIRQ);
+ vcpu_pause_self();
+ /* return value doens''t matter here. */
+ return 0;
}
static int acpi_get_wake_status(void)
@@ -250,6 +314,51 @@ acpi_status asmlinkage acpi_enter_sleep_
/* Wait until we enter sleep state, and spin until we wake */
while (!acpi_get_wake_status());
return_ACPI...