Mercurial > hvf > hvf
changeset 657:3ede15f57135
cp: keep track of whether or not a guess is "internal"
An internal guest is a guest that is created on the fly to support the
system operation. An example of an internal guest is *LOGIN.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Wed, 31 Jul 2019 12:57:39 -0400 |
parents | fd50605dc3bc |
children | 8575068d8cbd |
files | cp/guest/init.c cp/include/guest.h cp/include/vcpu.h cp/nucleus/init.c |
diffstat | 4 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/cp/guest/init.c Wed Jul 31 12:20:49 2019 -0400 +++ b/cp/guest/init.c Wed Jul 31 12:57:39 2019 -0400 @@ -1,5 +1,5 @@ /* - * (C) Copyright 2007-2012 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> + * (C) Copyright 2007-2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> * * This file is released under the GPLv2. See the COPYING file for more * details. @@ -190,7 +190,8 @@ free_pages(con->bigbuf, 0); } -struct virt_sys *guest_create(char *name, struct device *rcon) +struct virt_sys *guest_create(char *name, struct device *rcon, + int internal_guest) { struct virt_sys *sys; int already_online = 0; @@ -233,6 +234,7 @@ ret = alloc_vcpu(sys); assert(!ret); + sys->internal = internal_guest; sys->print_ts = 1; /* print timestamps */ mutex_lock(&online_users_lock);
--- a/cp/include/guest.h Wed Jul 31 12:20:49 2019 -0400 +++ b/cp/include/guest.h Wed Jul 31 12:57:39 2019 -0400 @@ -4,7 +4,8 @@ #include <vcpu.h> #include <vdevice.h> -extern struct virt_sys *guest_create(char *name, struct device *rcon); +extern struct virt_sys *guest_create(char *name, struct device *rcon, + int internal_guest); extern int guest_ipl_nss(struct virt_sys *sys, char *nssname); extern int guest_begin(struct virt_sys *sys); extern int guest_stop(struct virt_sys *sys);
--- a/cp/include/vcpu.h Wed Jul 31 12:20:49 2019 -0400 +++ b/cp/include/vcpu.h Wed Jul 31 12:57:39 2019 -0400 @@ -1,5 +1,5 @@ /* - * (C) Copyright 2007-2012 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> + * (C) Copyright 2007-2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> * * This file is released under the GPLv2. See the COPYING file for more * details. @@ -78,6 +78,7 @@ struct virt_cons *con; /* convenience pointer to the console struct */ + int internal; /* internal guest */ int print_ts; /* print timestamps */ struct list_head guest_pages; /* list of guest pages */
--- a/cp/nucleus/init.c Wed Jul 31 12:20:49 2019 -0400 +++ b/cp/nucleus/init.c Wed Jul 31 12:57:39 2019 -0400 @@ -129,7 +129,7 @@ * Alright, we have the config, we now need to set up the *LOGIN * guest and attach the operator console rdev to it */ - login = guest_create("*LOGIN", NULL); + login = guest_create("*LOGIN", NULL, 1); if (!login) { err = "failed to create guest"; goto die;