Created shutdown.c for the shutdown thread and all the shutdown related
functions.
Signed-off-by: Bruno Alvisio
---
Changesd since v1:
* Updated license to a BSD 3-clause. This license was taken
from the updated original file. (Repo: sysml/mini-os)
---
Makefile | 1 +
include
Signed-off-by: Bruno Alvisio
---
Changed since v1:
* Removed resume/suspend_time() and used init/fini_time() instead
---
arch/x86/time.c | 1 -
kernel.c| 4
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/time.c b/arch/x86/time.c
index 3658142..8077c80
For mini-OS to support suspend and restore, the kernel will have to suspend
different modules such as xenbus, console, irq, etc. During save/restore the
kernel and arch pre_suspend and post_suspend functions will be invoked to
suspend/resume each of the modules.
Signed-off-by: Bruno Alvisio
Performed an additional cleanup to make the file more syntactically consistent.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
include/netfront.h | 8 +-
kernel.c | 8 ++
netfront.c | 309 ++---
3 files
Signed-off-by: Bruno Alvisio
---
Changed since v1:
- Moved suspend/resume _gnttab to arch specific files
---
arch/x86/mm.c| 34 ++
gnttab.c | 10 ++
include/gnttab.h | 4
kernel.c | 4
4 files changed, 52 insertions
Currently the watch path is not saved in the watch struct when it is registered.
During xenbus resume the path is needed so that the watches can be registered
again.
Thus, 'path' field is added to struct watch so that watches can be re-registered
during xenbus resume.
Signed-off
Before suspending the domain the shared_info_page is unmapped and for PVs the
pagetables should be canonicalized. After resume the shared_info_page should be
mapped again.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
Changed since v1:
* Fixed comment
---
arch/x86/setup.c
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
events.c | 5 +
include/events.h | 1 +
kernel.c | 2 ++
3 files changed, 8 insertions(+)
diff --git a/events.c b/events.c
index e8ef8aa..342aead 100644
--- a/events.c
+++ b/events.c
@@ -183,6 +183,11 @@ void
Hi all,
I am sending the second revision for supporting save/restore in Mini-OS PVH.
The
branch can be found at:
https://github.com/balvisio/mini-os/tree/feature/mini-os-suspend-support-submission-2
Feedback would be greatly appreciated.
Cheers,
Bruno
Signed-off-by: Bruno Alvisio
The shutdown thread present in kernel.c was removed and now the thread in
shutdown.c is created instead.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
arch/x86/setup.c | 2 +-
include/kernel.h | 2 +-
kernel.c | 50 ++
3
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
kernel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel.c b/kernel.c
index 1cd40e8..782eb79 100644
--- a/kernel.c
+++ b/kernel.c
@@ -119,12 +119,12 @@ void start_kernel(void* par)
void pre_suspend
Directly using the SHUTDOWN_suspend macro as a parameter for the schedop
hypercall causes an error in the Xen hypercall handler. Also for consistency,
the SHUTDOWN_suspend param is wrapped in the sched_shutdown struct.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
include/x86
functions: trap_init (sets up IDT) and xen_callback_vector (sets the
HVM vector callback). During the post-suspend operations the xen_callback_vector
function will be invoked.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
arch/x86/traps.c | 17 +++--
include/x86/os.h | 3
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
console/console.c | 15 -
console/xenbus.c | 3 +-
console/xencons_ring.c | 83 +++---
include/console.h | 6 +++-
kernel.c | 4 +++
lib/sys.c
This function is necessary as part of the pre-suspend operation.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
Changed since v1:
* Changed HYPERVISOR_shared_info for shared_info
---
arch/x86/setup.c | 12
hypervisor.c | 12
include
operation is needed.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
arch/x86/mm.c | 14 ++
include/x86/arch_mm.h | 3 +++
2 files changed, 17 insertions(+)
diff --git a/arch/x86/mm.c b/arch/x86/mm.c
index 05ad029..1b163ac 100644
--- a/arch/x86/mm.c
+++ b/arch
This function is necessary as part of the pre-suspend operation.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
Changed since v1:
* Changed HYPERVISOR_shared_info for shared_info
---
arch/x86/setup.c | 12
hypervisor.c | 12
include
xenbus_release_wait_for_watch generates a fake event to trigger make
xenbus_wait_for_watch return. This is necessary to wake up waiting threads.
release_xenbus_id additionally checks if the number of requests == 0 to wake
up the 'waiting' suspend xenbus thread.
Signed-off-by: Bru
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
console/console.c | 15 -
console/xenbus.c | 3 +-
console/xencons_ring.c | 83 +++---
include/console.h | 6 +++-
kernel.c | 4 +++
lib/sys.c
operation is needed.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
arch/x86/mm.c | 14 ++
include/x86/arch_mm.h | 3 +++
2 files changed, 17 insertions(+)
diff --git a/arch/x86/mm.c b/arch/x86/mm.c
index 05ad029..1b163ac 100644
--- a/arch/x86/mm.c
+++ b/arch
xenbus_release_wait_for_watch generates a fake event to trigger make
xenbus_wait_for_watch return. This is necessary to wake up waiting threads.
release_xenbus_id additionally checks if the number of requests == 0 to wake
up the 'waiting' suspend xenbus thread.
Signed-off-by: Bru
Directly using the SHUTDOWN_suspend macro as a parameter for the schedop
hypercall causes an error in the Xen hypercall handler. Also for consistency,
the SHUTDOWN_suspend param is wrapped in the sched_shutdown struct.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
include/x86
Hi all,
I am sending the second revision for supporting save/restore in Mini-OS PVH.
The
branch can be found at:
https://github.com/balvisio/mini-os/tree/feature/mini-os-suspend-support-submission-2
Feedback would be greatly appreciated.
Cheers,
Bruno
Signed-off-by: Bruno Alvisio
Signed-off-by: Bruno Alvisio
---
Changed since v1:
* Removed resume/suspend_time() and used init/fini_time() instead
---
arch/x86/time.c | 1 -
kernel.c| 4
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/time.c b/arch/x86/time.c
index 3658142..8077c80
The shutdown thread present in kernel.c was removed and now the thread in
shutdown.c is created instead.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
arch/x86/setup.c | 2 +-
include/kernel.h | 2 +-
kernel.c | 50 ++
3
Created shutdown.c for the shutdown thread and all the shutdown related
functions.
Signed-off-by: Bruno Alvisio
---
Changesd since v1:
* Updated license to a BSD 3-clause. This license was taken
from the updated original file. (Repo: sysml/mini-os)
---
Makefile | 1 +
include
For mini-OS to support suspend and restore, the kernel will have to suspend
different modules such as xenbus, console, irq, etc. During save/restore the
kernel and arch pre_suspend and post_suspend functions will be invoked to
suspend/resume each of the modules.
Signed-off-by: Bruno Alvisio
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
kernel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel.c b/kernel.c
index 1cd40e8..782eb79 100644
--- a/kernel.c
+++ b/kernel.c
@@ -119,12 +119,12 @@ void start_kernel(void* par)
void pre_suspend
functions: trap_init (sets up IDT) and xen_callback_vector (sets the
HVM vector callback). During the post-suspend operations the xen_callback_vector
function will be invoked.
Signed-off-by: Bruno Alvisio
Reviewed-by: Samuel Thibault
---
arch/x86/traps.c | 17 +++--
include/x86/os.h | 3
Hello all,
I am doing some testing with Xen. After some of the guest domains I am
testing crashed, I decided to add some logging to Xen and the tools. After
rebuilding, reinstalling and rebooting the system, Xen seems to create
guest domains (the ones created before reboot) on startup (with no 'xl
On Sun, Dec 31, 2017 at 5:12 PM, Andrew Cooper
wrote:
> On 31/12/2017 15:19, Bruno Alvisio wrote:
>
> Hi all,
>
>
>
> I was trying to create mini-os PVH instances both x86_32 and x86_64. I
> have no issue with x86_32 but when trying to ‘xl create’ x86_64 type I g
Hi all,
I was trying to create mini-os PVH instances both x86_32 and x86_64. I have
no issue with x86_32 but when trying to ‘xl create’ x86_64 type I get the
following error:
root@debianxen:/home/balvisio# xl -vvv create minios_pvh.cfg
Parsing config from minios_pvh.cfg
libxl: debug: libxl_c
appreciated.
Thanks,
Bruno
On Thu, Dec 28, 2017 at 7:18 PM, Andrew Cooper
wrote:
> On 28/12/17 18:33, Bruno Alvisio wrote:
>
> (d360) Bootstrapping...
>
> (XEN) Dom360 callback via changed to Direct Vector 0x20
>
> (d360) Xen Minimal OS (hvm)!
>
> (XEN) d360v0 Triple fa
Hello all,
I am trying to build PVH mini-os with libc support. These are the steps I
have followed so far:
1. Xen repo (master: commit id: d2f86bf604698806d311cc251c1b66fbb752673c)
2. mini-os repo (master: commit id:
0b4b7897e08b967a09bed2028a79fabff82342dd)
3. Made the following modifications i
ops to restore
the domain. The restore is performed by the POST_MIRROR_DISKS phase stream that
is executed later in the restore flow. If no local disks are mirrored the
restore is executed by the DEFAULT phase stream type.
Signed-off-by: Bruno Alvisio
---
tools/libxc/xc_sr_common.h| 1
A new field 'mirror_disks' is added to the libxl struct
libxl__domain_create_state to record if QEMU drives should be mirrored during
migration. This variable is used to setup the sequence of calls and streams in
libxl and libxc.
Signed-off-by: Bruno Alvisio
---
tools/lib
l be resumed using the migrate incoming command
(QMP command: migrate_incoming).
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_internal.h | 11
tools/libxl/libxl_qmp.c | 139 +++
2 files changed, 150 insertions(+)
diff --git a/tools/libxl/
l from the source that the
NBD server has been started it triggers the disks mirroring job. Once it
receives an event from QEMU that the mirroring job is complete, the
POST_MIRROR_DISKS phase stream type is invoked.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_dom_s
The function migrate_fixed_message is going to be used in the libxl create and
save flow for event synchronization during migration. It needs to be accessible
from libxl_create and libxl_dom_save and thus it is moved to libxl_utils.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_utils.c
be resumed
using the QMP 'migrate-incoming' command.
When qemu-xen is started with '-incoming defer' option the initial state of the
instance will be 'inmigrate'. Thus, when either 'running' or 'inmigrate' are
read from xenstore the spawn de
b.com/balvisio/qemu-xen/tree/feature/migration_with_local_disks_mirroring
Any feedback/suggestion is appreciated.
Cheers,
Bruno
Signed-off-by: Bruno Alvisio
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
cuting QMP "migrate-incoming" command
11. domcreate_devmodel_started
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl.h | 6 +++
tools/libxl/libxl_create.c | 117 +--
tools/libxl/libxl_internal.h | 2 +
3 files changed, 120 insert
with the name of the host where the QEMU drives will be mirrored to.
libxl_domain_suspend takes a 'recv_fd' param that is used for receving messages
from destination during migration.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl.h | 4 +-
tools/libxl/lib
POST_MIRROR_DISKS libxl stream.
Signed-off-by: Bruno Alvisio
---
tools/libxc/include/xenguest.h | 3 +-
tools/libxc/xc_nomigrate.c | 3 +-
tools/libxc/xc_sr_save.c | 3 +-
tools/libxl/libxl_internal.h | 12 +--
tools/libxl/libxl_save_callout.c | 10 --
tools/libxl
)
libxl__xc_mirror_disks_restore_returned is the callback function in the
libxl_read_stream that is registered for the return of libxc_mirror_disks
stream.
Signed-off-by: Bruno Alvisio
---
tools/libxc/include/xenguest.h | 3 ++-
tools/libxc/xc_nomigrate.c | 3 ++-
tools/libxc/xc_sr_restore.c | 3
==
XC_PRE_MIRROR_DISKS_STREAM_PHASE only the pre_mirror_disks op is executed as
part of the save(). In all other libxc phase types, the original flow is
executed.
Signed-off-by: Bruno Alvisio
---
tools/libxc/xc_sr_common.h | 11
tools/libxc/xc_sr_save.c | 24 +++--
tools/libxc
vent. This code adds
support to register handlers when QMP events are received.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_qmp.c | 58 +
1 file changed, 58 insertions(+)
diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c
ind
Hi all,
I was understanding the code in tools/libxc/xc_sr_save_x86_pv.c and found
this comment to the normalise_pagetable:
/*
* Normalise a pagetable for the migration stream. Performs pfn->mfn
* conversions on the ptes.
*/
static int normalise_pagetable(struct xc_sr_context *ctx, const uint6
This function is necessary as part of the pre-suspend operation.
Signed-off-by: Bruno Alvisio
---
arch/x86/setup.c | 12
hypervisor.c | 12
include/hypervisor.h | 1 +
3 files changed, 25 insertions(+)
diff --git a/arch/x86/setup.c b/arch/x86/setup.c
Directly using the SHUTDOWN_suspend macro as a parameter for the schedop
hypercall causes an error in the Xen hypercall handler. Also for consistency,
the SHUTDOWN_suspend param is wrapped in the sched_shutdown struct.
Signed-off-by: Bruno Alvisio
---
include/x86/x86_32/hypercall-x86_32.h | 4
Currently the watch path is not saved in the watch struct when it is registered.
During xenbus resume the path is needed so that the watches can be registered
again.
Thus, 'path' field is added to struct watch so that watches can be re-registered
during xenbus resume.
Signed-off
xenbus_release_wait_for_watch generates a fake event to trigger make
xenbus_wait_for_watch return. This is necessary to wake up waiting threads.
Signed-off-by: Bruno Alvisio
---
include/xenbus.h | 1 +
xenbus/xenbus.c | 10 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff
Signed-off-by: Bruno Alvisio
---
console/console.c | 15 ++-
console/xenbus.c | 3 +--
console/xencons_ring.c | 41 +++--
include/console.h | 6 +-
kernel.c | 4
lib/sys.c | 2 +-
6 files
Performed an additional cleanup to make the file more syntactically consistent.
Signed-off-by: Bruno Alvisio
---
include/netfront.h | 8 +-
kernel.c | 8 ++
netfront.c | 242 +
3 files changed, 204 insertions(+), 54
Signed-off-by: Bruno Alvisio
---
kernel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel.c b/kernel.c
index 1cd40e8..782eb79 100644
--- a/kernel.c
+++ b/kernel.c
@@ -119,12 +119,12 @@ void start_kernel(void* par)
void pre_suspend(void
For mini-OS to support suspend and restore, the kernel will have to suspend
different modules such as xenbus, console, irq, etc. During save/restore the
kernel and arch pre_suspend and post_suspend functions will be invoked to
suspend/resume each of the modules.
Signed-off-by: Bruno Alvisio
functions: trap_init (sets up IDT) and xen_callback_vector (sets the
HVM vector callback). During the post-suspend operations the xen_callback_vector
function will be invoked.
Signed-off-by: Bruno Alvisio
---
arch/x86/traps.c | 17 +++--
include/x86/os.h | 3 +++
2 files changed, 14
The shutdown thread present in kernel.c was removed and now the thread in
shutdown.c is created instead.
Signed-off-by: Bruno Alvisio
---
arch/x86/setup.c | 2 +-
include/kernel.h | 2 +-
kernel.c | 50 ++
3 files changed, 8 insertions
Before suspending the domain the shared_info_page is unmapped and for PVs the
pagetables should be canonicalized. After resume the shared_info_page should be
mapped again.
Signed-off-by: Bruno Alvisio
---
arch/x86/setup.c | 51 +++
1 file changed
operation is needed.
Signed-off-by: Bruno Alvisio
---
arch/x86/mm.c | 14 ++
include/x86/arch_mm.h | 3 +++
2 files changed, 17 insertions(+)
diff --git a/arch/x86/mm.c b/arch/x86/mm.c
index 05ad029..1b163ac 100644
--- a/arch/x86/mm.c
+++ b/arch/x86/mm.c
@@ -848,6 +848,20
Signed-off-by: Bruno Alvisio
---
gnttab.c | 33 +
include/gnttab.h | 2 ++
kernel.c | 4
3 files changed, 39 insertions(+)
diff --git a/gnttab.c b/gnttab.c
index 3f0e35f..a91c2e1 100644
--- a/gnttab.c
+++ b/gnttab.c
@@ -194,3 +194,36
Signed-off-by: Bruno Alvisio
---
arch/x86/time.c | 13 +
include/time.h | 2 ++
kernel.c| 4
3 files changed, 19 insertions(+)
diff --git a/arch/x86/time.c b/arch/x86/time.c
index 3658142..8f79d69 100644
--- a/arch/x86/time.c
+++ b/arch/x86/time.c
@@ -244,3 +244,16
Signed-off-by: Bruno Alvisio
---
events.c | 5 +
include/events.h | 1 +
kernel.c | 2 ++
3 files changed, 8 insertions(+)
diff --git a/events.c b/events.c
index e8ef8aa..342aead 100644
--- a/events.c
+++ b/events.c
@@ -183,6 +183,11 @@ void fini_events(void
Hi all,
I have been working on supporting save/restore for mini-os PVH. Some parts of
the implementation were taken from the sysml/mini-os repository. The branch can
be found at:
https://github.com/balvisio/mini-os/tree/feature/mini-os-suspend-support
Any feedback would be greatly appreciated.
Created shutdown.c for the shutdown thread and all the shutdown related
functions.
Signed-off-by: Bruno Alvisio
---
Makefile | 1 +
include/shutdown.h | 11
shutdown.c | 188 +
3 files changed, 200 insertions
l be resumed using the migrate incoming command
(QMP command: migrate_incoming).
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_internal.h | 11
tools/libxl/libxl_qmp.c | 139 +++
2 files changed, 150 insertions(+)
diff --git a/tools/libxl/
ops to restore
the domain. The restore is performed by the POST_MIRROR_DISKS phase stream that
is executed later in the restore flow. If no local disks are mirrored the
restore is executed by the DEFAULT phase stream type.
Signed-off-by: Bruno Alvisio
---
tools/libxc/xc_sr_common.h| 1
==
XC_PRE_MIRROR_DISKS_STREAM_PHASE only the pre_mirror_disks op is executed as
part of the save(). In all other libxc phase types, the original flow is
executed.
Signed-off-by: Bruno Alvisio
---
tools/libxc/xc_sr_common.h | 11
tools/libxc/xc_sr_save.c | 24 +++--
tools/libxc
A new field 'mirror_disks' is added to the libxl struct
libxl__domain_create_state to record if QEMU drives should be mirrored during
migration. This variable is used to setup the sequence of calls and streams in
libxl and libxc.
Signed-off-by: Bruno Alvisio
---
tools/lib
l from the source that the
NBD server has been started it triggers the disks mirroring job. Once it
receives an event from QEMU that the mirroring job is complete, the
POST_MIRROR_DISKS phase stream type is invoked.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_dom_s
cuting QMP "migrate-incoming" command
11. domcreate_devmodel_started
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl.h | 6 +++
tools/libxl/libxl_create.c | 117 +--
tools/libxl/libxl_internal.h | 2 +
3 files changed, 120 insert
)
libxl__xc_mirror_disks_restore_returned is the callback function in the
libxl_read_stream that is registered for the return of libxc_mirror_disks
stream.
Signed-off-by: Bruno Alvisio
---
tools/libxc/include/xenguest.h | 3 ++-
tools/libxc/xc_nomigrate.c | 3 ++-
tools/libxc/xc_sr_restore.c | 3
://github.com/balvisio/qemu-xen/tree/feature/migration_with_local_disks_mirroring
Any feedback/suggestion is appreciated.
Cheers,
Bruno
Signed-off-by: Bruno Alvisio
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
POST_MIRROR_DISKS libxl stream.
Signed-off-by: Bruno Alvisio
---
tools/libxc/include/xenguest.h | 3 +-
tools/libxc/xc_nomigrate.c | 3 +-
tools/libxc/xc_sr_save.c | 3 +-
tools/libxl/libxl_internal.h | 12 +--
tools/libxl/libxl_save_callout.c | 10 --
tools/libxl
vent. This code adds
support to register handlers when QMP events are received.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_qmp.c | 58 +
1 file changed, 58 insertions(+)
diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c
ind
The function migrate_fixed_message is going to be used in the libxl create and
save flow for event synchronization during migration. It needs to be accessible
from libxl_create and libxl_dom_save and thus it is moved to libxl_utils.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl_utils.c
be resumed
using the QMP 'migrate-incoming' command.
When qemu-xen is started with '-incoming defer' option the initial state of the
instance will be 'inmigrate'. Thus, when either 'running' or 'inmigrate' are
read from xenstore the spawn de
with the name of the host where the QEMU drives will be mirrored to.
libxl_domain_suspend takes a 'recv_fd' param that is used for receving messages
from destination during migration.
Signed-off-by: Bruno Alvisio
---
tools/libxl/libxl.h | 4 +-
tools/libxl/lib
78 matches
Mail list logo