tools/libxc: Disable CONFIG_MIGRATE in stubdom environments
PATCH 1/1 tools/libxc: Disable CONFIG_MIGRATE in stubdom environments
The legacy save/restore infrastructure requires several function pointers from the toolstack (libxl or Xend in the past) in order to work, and for HVM guests also need to be able to play around in dom0's filesystem to move the device model save record.
Migration v2 changes some of this, but is similarly dependent on toolstack-provided function pointers.
Someone who wishes to re-architect the interaction of moving parts for running a domain might be in a position to re-enabled this, but for now, explicitly fail with ENOSYS (from xc_nomigrate.c) rather than failing with an error about a missing function pointer (or indeed falling over a NULL pointer on certain paths).
--- tools/libxc/Makefile | 5 +++++ 1 file changed, 5 insertions(+)
tools/libxc/Makefile +5 -0
@@ -4,6 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4.5 MINOR = 0 +ifeq ($(CONFIG_LIBXC_MINIOS),y) +# Save/restore of a domain is currently incompatible with a stubdom environment +override CONFIG_MIGRATE := n +endif + CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c
Signature · 1 line
1.7.10.4
Quoted 5 lines · Andrew Cooper
The legacy save/restore infrastructure requires several function pointers from the toolstack (libxl or Xend in the past) in order to work, and for HVM guests also need to be able to play around in dom0's filesystem to move the device model save record.
Quoted 8 lines
Migration v2 changes some of this, but is similarly dependent on toolstack-provided function pointers.
Someone who wishes to re-architect the interaction of moving parts for running a domain might be in a position to re-enabled this, but for now, explicitly fail with ENOSYS (from
xc_nomigrate.c) rather than failing with an error about a missing function pointer (or indeed falling over a NULL pointer on certain paths).
You are talking about a toolstack which is itself running in a stubdom here, right?
As opposed to e.g. an HVM domain using a qemu-stubdom, but being migrated by a normal toolstack in domain 0 (or at least, not in a mini-os based stubdom).
Ian.
Quoted 25 lines
Signed-off-by Andrew Cooper <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>--- tools/libxc/Makefile | 5 +++++ 1 file changed, 5 insertions(+)tools/libxc/Makefile +5
-0@@ -4,6 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4.5 MINOR = 0 +ifeq ($(CONFIG_LIBXC_MINIOS),y) +# Save/restore of a domain is currently incompatible with a stubdom environment +override CONFIG_MIGRATE := n +endif + CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c
Quoted 9 lines · Ian Campbell
Quoted 8 lines · Andrew Cooper
The legacy save/restore infrastructure requires several function pointers from the toolstack (libxl or Xend in the past) in order to work, and for HVM guests also need to be able to play around in dom0's filesystem to move the device model save record.
Migration v2 changes some of this, but is similarly dependent on toolstack-provided function pointers.
Quoted 7 lines
Quoted 5 lines
Someone who wishes to re-architect the interaction of moving parts for running a domain might be in a position to re-enabled this, but for now, explicitly fail with ENOSYS (from
xc_nomigrate.c) rather than failing with an error about a missing function pointer (or indeed falling over a NULL pointer on certain paths).You are talking about a toolstack which is itself running in a stubdom here, right?
The patch here prevents libxenguest, when compiled as part of a minios stub environment, from offering migration capability to the sub environment.
One would need to construct a stub environment with libxl and libxl-save-helper to have a decent stab at making migration of PV guests from a stub environment work.
Quoted 4 lines
As opposed to e.g. an HVM domain using a qemu-stubdom, but being migrated by a normal toolstack in domain 0 (or at least, not in a mini-os based stubdom).
A qemu-stubdom equally cant participate in migrate of its domain (because of the issues in passing the qemu save record), but that is a separate issue.
~Andrew
Quoted 28 lines
Ian.
Quoted 24 lines
Signed-off-by Andrew Cooper <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>CC Wei Liu <[email protected]>--- tools/libxc/Makefile | 5 +++++ 1 file changed, 5 insertions(+)tools/libxc/Makefile +5
-0@@ -4,6 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4.5 MINOR = 0 +ifeq ($(CONFIG_LIBXC_MINIOS),y) +# Save/restore of a domain is currently incompatible with a stubdom environment +override CONFIG_MIGRATE := n +endif + CTRL_SRCS-y := CTRL_SRCS-y += xc_core.c CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c
Quoted 7 lines · Andrew Cooper
Quoted 3 lines
As opposed to e.g. an HVM domain using a qemu-stubdom, but being migrated by a normal toolstack in domain 0 (or at least, not in a mini-os based stubdom).
A qemu-stubdom equally cant participate in migrate of its domain (because of the issues in passing the qemu save record), but that is a separate issue.
This works today AFAIK, I'm afraid I think it needs to keep working for the new migration stuff to land.
Ian.
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Andrew Cooper
Quoted 3 lines
As opposed to e.g. an HVM domain using a qemu-stubdom, but being migrated by a normal toolstack in domain 0 (or at least, not in a mini-os based stubdom).
A qemu-stubdom equally cant participate in migrate of its domain (because of the issues in passing the qemu save record), but that is a separate issue.
This works today AFAIK, I'm afraid I think it needs to keep working for the new migration stuff to land.
Nothing along these lines is (should be) impacted by legacy vs migration-v2. Migration v2 changes the point at which the existing qemu save record infrastructure is called, but does not change its functionality.
But as I say, this point is unrelated to the purpose of the patch.
~Andrew
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Ian Campbell
Quoted 6 lines · Andrew Cooper
Quoted 3 lines
As opposed to e.g. an HVM domain using a qemu-stubdom, but being migrated by a normal toolstack in domain 0 (or at least, not in a mini-os based stubdom).
A qemu-stubdom equally cant participate in migrate of its domain (because of the issues in passing the qemu save record), but that is a separate issue.
Quoted 8 lines
Quoted 2 lines
This works today AFAIK, I'm afraid I think it needs to keep working for the new migration stuff to land.
Nothing along these lines is (should be) impacted by legacy vs migration-v2. Migration v2 changes the point at which the existing qemu save record infrastructure is called, but does not change its functionality.
But as I say, this point is unrelated to the purpose of the patch.
Yes, I wasn't sure why you brought it up given that so I wanted to clarify.
Ian.