]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
core/inmates: Rename cell "status" to "state"
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 4 Mar 2014 18:43:24 +0000 (19:43 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Wed, 5 Mar 2014 09:25:54 +0000 (10:25 +0100)
Was called inconsistently in the documentation and the code.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Documentation/hypervisor-interfaces.txt
hypervisor/control.c
hypervisor/include/jailhouse/hypercall.h
inmates/apic-demo.c

index 02d8f21d8b4f87d8769b718a023cb76a82d559a0..bd91ec1c464a71c82b42492509760089f0393d23 100644 (file)
@@ -179,7 +179,7 @@ Communication region layout
         +------------------------------+
         |  Message from Cell (32 bit)  |
         +------------------------------+
-        |     Cell Status (32 bit)     |
+        |     Cell State (32 bit)      |
         +------------------------------+ - higher address
 
 All fields use the native endianness of the system.
@@ -227,10 +227,10 @@ Note: The hypervisor does not request shutdown permission from a cell if that
       "Failed" (see below).
 
 
-Logical Channel "Cell Status"
+Logical Channel "Cell State"
 - - - - - - - - - - - - - - -
 
-The cell status field provides the second logical channel. On cell startup, it
+The cell state field provides the second logical channel. On cell startup, it
 is initialized by the hypervisor to the state "Running". From then on, the
 field becomes conceptually read-only for the hypervisor and will just be
 updated by the cell itself. The following states are defined:
index 1619abf0811ca6f6794ca5a4bf846db935ad344f..cea0b15d9ddd796db5ad1c7a099a43d16b14ce7d 100644 (file)
@@ -249,7 +249,7 @@ err_resume:
 static bool cell_shutdown_ok(struct cell *cell)
 {
        volatile u32 *reply = &cell->comm_page.comm_region.reply_from_cell;
-       volatile u32 *cell_status = &cell->comm_page.comm_region.cell_status;
+       volatile u32 *cell_state = &cell->comm_page.comm_region.cell_state;
 
        if (cell->config->flags & JAILHOUSE_CELL_UNMANAGED_EXIT)
                return true;
@@ -259,8 +259,8 @@ static bool cell_shutdown_ok(struct cell *cell)
 
        while (*reply != JAILHOUSE_MSG_SHUTDOWN_DENIED) {
                if (*reply == JAILHOUSE_MSG_SHUTDOWN_OK ||
-                   *cell_status == JAILHOUSE_CELL_SHUT_DOWN ||
-                   *cell_status == JAILHOUSE_CELL_FAILED)
+                   *cell_state == JAILHOUSE_CELL_SHUT_DOWN ||
+                   *cell_state == JAILHOUSE_CELL_FAILED)
                        return true;
                cpu_relax();
        }
@@ -384,13 +384,13 @@ int cell_get_state(struct per_cpu *cpu_data, unsigned long id)
 
        for_each_cell(cell)
                if (cell->id == id) {
-                       u32 status = cell->comm_page.comm_region.cell_status;
+                       u32 state = cell->comm_page.comm_region.cell_state;
 
-                       switch (status) {
+                       switch (state) {
                        case JAILHOUSE_CELL_RUNNING:
                        case JAILHOUSE_CELL_SHUT_DOWN:
                        case JAILHOUSE_CELL_FAILED:
-                               return status;
+                               return state;
                        default:
                                return -EINVAL;
                        }
index 8a5d9d49d6e22a9f3f3688de61d4993d5f54807e..ac225a5d7611e399e7fe3f20c25ea9cd2d667603 100644 (file)
@@ -27,7 +27,7 @@
 #define JAILHOUSE_MSG_SHUTDOWN_DENIED          1
 #define JAILHOUSE_MSG_SHUTDOWN_OK              2
 
-/* cell status, initialized by hypervisor, updated by cell */
+/* cell state, initialized by hypervisor, updated by cell */
 #define JAILHOUSE_CELL_RUNNING                 0
 #define JAILHOUSE_CELL_SHUT_DOWN               1 /* terminal state */
 #define JAILHOUSE_CELL_FAILED                  2 /* terminal state */
@@ -36,7 +36,7 @@ struct jailhouse_comm_region {
        volatile __u32 msg_to_cell;
        volatile __u32 reply_from_cell;
 
-       volatile __u32 cell_status;
+       volatile __u32 cell_state;
 
        /* errors etc. */
 };
index 67413fba9ffb7c57c6b2ed2327373efa192e2089..e75a1b0d1e459769ed2ed3916634dbb502a4066c 100644 (file)
@@ -144,7 +144,7 @@ void inmate_main(void)
                asm volatile("hlt");
 
        printk("Stopped APIC demo\n");
-       comm_region->cell_status = JAILHOUSE_CELL_SHUT_DOWN;
+       comm_region->cell_state = JAILHOUSE_CELL_SHUT_DOWN;
 
        asm volatile("cli; hlt");
 }