Files
xen/xl-save-pc.patch

167 lines
5.7 KiB
Diff
Raw Permalink Normal View History

- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
References: bug#1176189
Usage of xl save -p|-c will suspend the domU.
As a result the monitoring xl process with get a LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN/LIBXL_SHUTDOWN_REASON_SUSPEND event.
This will cause it to exit because it does not know the -p/-c flags were used to keep the domU active.
As a result the final shutdown will not destroy the domU.
Write a flag to xenstore to let the monitoring process know about the usage of -p/-c.
Remove the flag once the suspend is done.
Recognize the flag in the monitoring process.
Keep going if the flag is seen.
Watch again for @releaseDomain events.
Keep going if the event type and shutdown reason remains the same.
---
- Update to Xen 4.18.0 FCS release (jsc#PED-4984) xen-4.18.0-testing-src.tar.bz2 * Repurpose command line gnttab_max_{maptrack_,}frames options so they don't cap toolstack provided values. * Ignore VCPUOP_set_singleshot_timer's VCPU_SSHOTTMR_future flag. The only known user doesn't use it properly, leading to in-guest breakage. * The "dom0" option is now supported on Arm and "sve=" sub-option can be used to enable dom0 guest to use SVE/SVE2 instructions. * Physical CPU Hotplug downgraded to Experimental and renamed "ACPI CPU Hotplug" for clarity * On x86, support for features new in Intel Sapphire Rapids CPUs: - PKS (Protection Key Supervisor) available to HVM/PVH guests. - VM-Notify used by Xen to mitigate certain micro-architectural pipeline livelocks, instead of crashing the entire server. - Bus-lock detection, used by Xen to mitigate (by rate-limiting) the system wide impact of a guest misusing atomic instructions. * xl/libxl can customize SMBIOS strings for HVM guests. * Add support for AVX512-FP16 on x86. * On Arm, Xen supports guests running SVE/SVE2 instructions. (Tech Preview) * On Arm, add suport for Firmware Framework for Arm A-profile (FF-A) Mediator (Tech Preview) * Add Intel Hardware P-States (HWP) cpufreq driver. * On Arm, experimental support for dynamic addition/removal of Xen device tree nodes using a device tree overlay binary (.dtbo). * Introduce two new hypercalls to map the vCPU runstate and time areas by physical rather than linear/virtual addresses. * On x86, support for enforcing system-wide operation in Data Operand Independent Timing Mode. * The project has now officially adopted 6 directives and 65 rules of MISRA-C. * On x86, the "pku" command line option has been removed. It has never OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=820
2023-11-15 16:36:59 +00:00
tools/xl/Makefile | 3 ++-
tools/xl/xl.h | 1 +
tools/xl/xl_saverestore.c | 15 ++++++++++++
tools/xl/xl_vmcontrol.c | 48 +++++++++++++++++++++++++++++++++++++++
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
4 files changed, 66 insertions(+), 1 deletion(-)
--- a/tools/xl/Makefile
+++ b/tools/xl/Makefile
- Update to Xen 4.21.0 FCS release * The minimum toolchain requirements have increased for some architectures: - For x86, GCC 5.1 and Binutils 2.25, or Clang/LLVM 11 - For ARM32 and ARM64, GCC 5.1 and Binutils 2.25 - For RISC-V, GCC 12.2 and Binutils 2.39 * Debian Trixie added to CI. Debian Bullseye retired from CI for RISC-V due to the baseline change. * Linux based device model stubdomains are now fully supported. * New dependency on library json-c 0.15 or later, the toolstack will prefer it to `YAJL` when available. * Introduce libxenmanage as a stable library, replacing xenstored's dependency on unstable libraries. * Introduce new PDX compression algorithm to cope with Intel Sierra Forest and Granite Rapids having sparse memory maps. * Support of qemu-traditional has been removed. * The in-tree oxenstored is deprecated and will be removed in a future version of Xen. It is moving into the Xapi project https://github.com/xapi-project/oxenstored so it can be maintained in line with the other Ocaml projects in the Xen ecosystem. * On x86: - Restrict the cache flushing done as a result of guest physical memory map manipulations and memory type changes. - Allow controlling the MTRR cache attribute of the Xen platform PCI device BAR for HVM guests, to improve performance of guests using it to map the grant table or foreign memory. - Allow configuring the number of altp2m tables per domain via vm.cfg. - Option to attempt to fixup p2m page-faults on PVH dom0. - Resizable BARs is supported for PVH dom0. - Support PCI passthrough for HVM domUs when dom0 is PVH (note SR-IOV capability usage is not yet supported on PVH dom0). OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=903
2025-11-19 18:50:34 +00:00
@@ -26,6 +26,7 @@ XL_OBJS += xl_vmcontrol.o xl_saverestore
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
XL_OBJS += xl_vdispl.o xl_vsnd.o xl_vkb.o
$(XL_OBJS): CFLAGS += $(CFLAGS_libxentoollog)
+$(XL_OBJS): CFLAGS += $(CFLAGS_libxenstore)
$(XL_OBJS): CFLAGS += $(CFLAGS_XL)
$(XL_OBJS): CFLAGS += -include $(XEN_ROOT)/tools/config.h # libxl_json.h needs it.
--- a/tools/xl/xl.h
+++ b/tools/xl/xl.h
@@ -306,6 +306,7 @@ typedef enum {
DOMAIN_RESTART_SUSPENDED, /* Domain suspended - keep looping */
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
} domain_restart_type;
+#define XL_SAVE_PAUSE_CHECKPOINT "suse-xl-save-pc"
extern void printf_info_sexp(int domid, libxl_domain_config *d_config, FILE *fh);
extern void apply_global_affinity_masks(libxl_domain_type type,
libxl_bitmap *vcpu_affinity_array,
--- a/tools/xl/xl_saverestore.c
+++ b/tools/xl/xl_saverestore.c
@@ -21,6 +21,7 @@
#include <time.h>
#include <unistd.h>
+#include <xenstore.h>
#include <libxl.h>
#include <libxl_utils.h>
#include <libxlutil.h>
@@ -127,6 +128,8 @@ static int save_domain(uint32_t domid, i
const char *filename, int checkpoint,
int leavepaused, const char *override_config_file)
{
+ struct xs_handle *xsh = NULL;
+ char path[80];
int fd;
uint8_t *config_data;
int config_len;
@@ -143,12 +146,24 @@ static int save_domain(uint32_t domid, i
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
fprintf(stderr, "Failed to open temp file %s for writing\n", filename);
exit(EXIT_FAILURE);
}
+ if (leavepaused || checkpoint)
+ {
+ snprintf(path, sizeof(path), "/libxl/%u/" XL_SAVE_PAUSE_CHECKPOINT, domid);
+ xsh = xs_open(0);
+ if (xsh)
+ xs_write(xsh, XBT_NULL, path, leavepaused ? "p" : "c", 1);
+ }
save_domain_core_writeconfig(fd, filename, config_data, config_len);
int rc = libxl_domain_suspend(ctx, domid, fd, 0, NULL);
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
close(fd);
+ if (xsh) {
+ xs_rm(xsh, XBT_NULL, path);
+ xs_close(xsh);
+ }
+
if (rc < 0) {
fprintf(stderr, "Failed to save domain, resuming domain\n");
libxl_domain_resume(ctx, domid, 1, 0);
--- a/tools/xl/xl_vmcontrol.c
+++ b/tools/xl/xl_vmcontrol.c
@@ -22,6 +22,7 @@
#include <time.h>
#include <unistd.h>
+#include <xenstore.h>
#include <libxl.h>
#include <libxl_utils.h>
#include <libxlutil.h>
@@ -706,6 +707,10 @@ int create_domain(struct domain_create *
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
int migrate_fd = dom_info->migrate_fd;
bool config_in_json;
+ libxl_event_type type = 0;
+ uint8_t shutdown_reason = 0;
+ bool is_in_suspend = false;
+
int i;
int need_daemon = daemonize;
int ret, rc;
@@ -1073,6 +1078,24 @@ start:
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
ret = domain_wait_event(domid, &event);
if (ret) goto out;
+ if (is_in_suspend) {
+ if ( type == event->type && event->u.domain_shutdown.shutdown_reason == shutdown_reason) {
+ struct timespec req = { .tv_nsec = 123456789, };
+ libxl_evdisable_domain_death(ctx, deathw);
+ deathw = NULL;
+ ret = libxl_evenable_domain_death(ctx, domid, 0, &deathw);
+ if (ret) goto out;
+ libxl_event_free(ctx, event);
+ LOG("Domain %u still suspended", domid);
+ nanosleep(&req, NULL);
+ continue;
+ }
+ is_in_suspend = false;
+ LOG("Domain %u left suspend state", domid);
+ }
+ type = event->type;
+ shutdown_reason = event->u.domain_shutdown.shutdown_reason;
+
switch (event->type) {
case LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN:
@@ -1134,10 +1157,34 @@ start:
- Update to Xen 4.15.1 bug fix release xen-4.15.1-testing-src.tar.bz2 - Drop patches contained in new tarball 60631c38-VT-d-QI-restore-flush-hooks.patch 60700077-x86-vpt-avoid-pt_migrate-rwlock.patch 60787714-revert-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-avoid-legacy-replacement-mode.patch 60787714-x86-HPET-factor-legacy-replacement-mode-enabling.patch 608676f2-VT-d-register-based-invalidation-optional.patch 60a27288-x86emul-gas-2-36-test-harness-build.patch 60af933d-x86-gcc11-hypervisor-build.patch 60afe616-x86-CPUID-rework-HLE-and-RTM-handling.patch 60afe617-x86-TSX-minor-cleanup-and-improvements.patch 60afe618-x86-TSX-deprecate-vpmu=rtm-abort.patch 60be0e24-credit2-pick-runnable-unit.patch 60be0e42-credit2-per-entity-load-tracking-when-continuing.patch 60be3097-x86-CPUID-fix-HLE-and-RTM-handling-again.patch 60bf9e19-Arm-create-dom0less-domUs-earlier.patch 60bf9e1a-Arm-boot-modules-scrubbing.patch 60bf9e1b-VT-d-size-qinval-queue-dynamically.patch 60bf9e1c-AMD-IOMMU-size-command-buffer-dynamically.patch 60bf9e1d-VT-d-eliminate-flush-related-timeouts.patch 60bf9e1e-x86-spec-ctrl-protect-against-SCSB.patch 60bf9e1f-x86-spec-ctrl-mitigate-TAA-after-S3.patch 60bfa904-AMD-IOMMU-wait-for-command-slot.patch 60bfa906-AMD-IOMMU-drop-command-completion-timeout.patch 60c0bf86-x86-TSX-cope-with-deprecation.patch 60c8a7ac-x86-vpt-fully-init-timers-before-enlisting.patch 60c8de6e-osdep_xenforeignmemory_map-prototype.patch 60d49689-VT-d-undo-device-mappings-upon-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=748
2021-09-10 20:39:41 +00:00
goto start;
case DOMAIN_RESTART_NONE:
+ {
+ struct xs_handle *xsh = xs_open(0);
+
+ if (xsh) {
+ char path[80];
+ unsigned int len = 0;
+ char *val;
+
+ snprintf(path, sizeof(path), "/libxl/%u/" XL_SAVE_PAUSE_CHECKPOINT, domid);
+ val = xs_read(xsh, XBT_NULL, path, &len);
+ xs_close(xsh);
+ LOG("Got %p '%s' from %s, len %u", val, val ?:"", path, len);
+ free(val);
+ if (val)
+ {
+ is_in_suspend = true;
+ libxl_evdisable_domain_death(ctx, deathw);
+ deathw = NULL;
+ ret = libxl_evenable_domain_death(ctx, domid, 0, &deathw);
+ if (ret) goto out;
+ break;
+ }
+ }
LOG("Done. Exiting now");
libxl_event_free(ctx, event);
ret = 0;
goto out;
+ }
case DOMAIN_RESTART_SUSPENDED:
LOG("Continue waiting for domain %u", domid);