Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102103350
D43765.id133929.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1023 B
Referenced Files
None
Subscribers
None
D43765.id133929.diff
View Options
diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
--- a/sys/x86/x86/mp_x86.c
+++ b/sys/x86/x86/mp_x86.c
@@ -1594,6 +1594,23 @@
mtx_assert(&smp_ipi_mtx, MA_NOTOWNED);
cpu = PCPU_GET(cpuid);
+
+#ifdef XENHVM
+ /*
+ * Some Xen guest types (PVH) expose a very minimal set of ACPI tables,
+ * and for example have no support for SCI. That leads to the suspend
+ * stacks not being allocated, and hence when attempting to perform a
+ * Xen triggered suspension FreeBSD will hit a #PF. Avoid saving the
+ * CPU and FPU contexts if the stacks are not allocated, as the
+ * hypervisor will already take care of this. Note that we could even
+ * do this for Xen triggered suspensions on guests that have full ACPI
+ * support, but doing so would introduce extra complexity.
+ */
+ if (susppcbs == NULL) {
+ CPU_SET_ATOMIC(cpu, &suspended_cpus);
+ CPU_SET_ATOMIC(cpu, &resuming_cpus);
+ } else
+#endif
if (savectx(&susppcbs[cpu]->sp_pcb)) {
#ifdef __amd64__
fpususpend(susppcbs[cpu]->sp_fpususpend);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 3:54 PM (20 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14537984
Default Alt Text
D43765.id133929.diff (1023 B)
Attached To
Mode
D43765: x86/xen: fix migration when ACPI suspend is not available
Attached
Detach File
Event Timeline
Log In to Comment