[REFACTOR] Hafnium style: capitalize CPU, vCPU, and VM.

Change-Id: I6090deee0f52737653f5b18c09a1c64cadd38c8c
diff --git a/inc/hf/arch/cpu.h b/inc/hf/arch/cpu.h
index ac93c4c..a7fe5a8 100644
--- a/inc/hf/arch/cpu.h
+++ b/inc/hf/arch/cpu.h
@@ -34,7 +34,7 @@
 void arch_regs_reset(struct vcpu *vcpu);
 
 /**
- * Updates the given registers so that when a vcpu runs, it starts off at the
+ * Updates the given registers so that when a vCPU runs, it starts off at the
  * given address (pc) with the given argument.
  *
  * This function must only be called on an arch_regs that is known not be in use
diff --git a/src/api.c b/src/api.c
index 7aa573c..d8ced97 100644
--- a/src/api.c
+++ b/src/api.c
@@ -133,7 +133,7 @@
 
 /**
  * Puts the current vCPU in wait for interrupt mode, and returns to the primary
- * vm.
+ * VM.
  */
 struct vcpu *api_wait_for_interrupt(struct vcpu *current)
 {
@@ -539,7 +539,7 @@
 		goto out;
 	}
 
-	/* The requested vcpu must exist. */
+	/* The requested vCPU must exist. */
 	if (vcpu_idx >= vm->vcpu_count) {
 		goto out;
 	}
@@ -571,7 +571,7 @@
 		arch_timer_mask(&vcpu->regs);
 	}
 
-	/* Switch to the vcpu. */
+	/* Switch to the vCPU. */
 	*next = vcpu;
 
 	/*
@@ -1119,7 +1119,7 @@
 		goto out;
 	}
 
-	/* Switch back to primary vm to block. */
+	/* Switch back to primary VM to block. */
 	{
 		struct spci_value run_return = {
 			.func = SPCI_MSG_WAIT_32,
@@ -1192,7 +1192,7 @@
 		return -1;
 	}
 
-	/* Check if there are outstanding notifications from given vm. */
+	/* Check if there are outstanding notifications from given VM. */
 	locked = vm_lock(vm);
 	entry = api_fetch_waiter(locked);
 	vm_unlock(&locked);
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index bc2b998..65aef52 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -732,7 +732,7 @@
 
 /**
  * Handles EC = 011000, MSR, MRS instruction traps.
- * Returns non-null ONLY if the access failed and the vcpu is changing.
+ * Returns non-null ONLY if the access failed and the vCPU is changing.
  */
 struct vcpu *handle_system_register_access(uintreg_t esr_el2)
 {
diff --git a/src/arch/aarch64/hypervisor/hypervisor_entry.S b/src/arch/aarch64/hypervisor/hypervisor_entry.S
index 5867805..c6fcb62 100644
--- a/src/arch/aarch64/hypervisor/hypervisor_entry.S
+++ b/src/arch/aarch64/hypervisor/hypervisor_entry.S
@@ -27,11 +27,11 @@
 	/* Interpret the registers passed from the loader. */
 	bl plat_boot_flow_hook
 
-	/* Get pointer to first cpu. */
+	/* Get pointer to first CPU. */
 	adrp x28, cpus
 	add x28, x28, :lo12:cpus
 
-	/* Set the ID of this cpu from the affinity bits of mpidr. */
+	/* Set the ID of this CPU from the affinity bits of mpidr. */
 	mrs x30, mpidr_el1
 	ubfx x29, x30, 0, 24
 	ubfx x30, x30, 32, 8
@@ -72,10 +72,10 @@
 	/* Intentional fallthrough. */
 
 cpu_init:
-	/* Call into C code, x0 holds the cpu pointer. */
+	/* Call into C code, x0 holds the CPU pointer. */
 	bl cpu_main
 
-	/* Run the vcpu returned by cpu_main. */
+	/* Run the vCPU returned by cpu_main. */
 	bl vcpu_restore_all_and_run
 
 	/* Loop forever waiting for interrupts. */
diff --git a/src/arch/aarch64/hypervisor/psci_handler.c b/src/arch/aarch64/hypervisor/psci_handler.c
index 0ed0212..1d638e4 100644
--- a/src/arch/aarch64/hypervisor/psci_handler.c
+++ b/src/arch/aarch64/hypervisor/psci_handler.c
@@ -163,10 +163,10 @@
 
 	case PSCI_CPU_SUSPEND: {
 		/*
-		 * Update vcpu state to wake from the provided entry point but
+		 * Update vCPU state to wake from the provided entry point but
 		 * if suspend returns, for example because it failed or was a
 		 * standby power state, the SMC will return and the updated
-		 * vcpu registers will be ignored.
+		 * vCPU registers will be ignored.
 		 */
 		arch_regs_set_pc_arg(&vcpu->regs, ipa_init(arg1), arg2);
 		smc_res = smc64(PSCI_CPU_SUSPEND, arg0, (uintreg_t)&cpu_entry,
diff --git a/src/spci_architected_message.c b/src/spci_architected_message.c
index d427cd2..c17daf4 100644
--- a/src/spci_architected_message.c
+++ b/src/spci_architected_message.c
@@ -350,7 +350,7 @@
 static bool clear_memory(paddr_t begin, paddr_t end, struct mpool *ppool)
 {
 	/*
-	 * TODO: change this to a cpu local single page window rather than a
+	 * TODO: change this to a CPU local single page window rather than a
 	 *       global mapping of the whole range. Such an approach will limit
 	 *       the changes to stage-1 tables and will allow only local
 	 *       invalidation.
diff --git a/src/vcpu.c b/src/vcpu.c
index a637a5a..2f1b5fc 100644
--- a/src/vcpu.c
+++ b/src/vcpu.c
@@ -134,7 +134,7 @@
  * Handles a page fault. It does so by determining if it's a legitimate or
  * spurious fault, and recovering from the latter.
  *
- * Returns true if the caller should resume the current vcpu, or false if its VM
+ * Returns true if the caller should resume the current vCPU, or false if its VM
  * should be aborted.
  */
 bool vcpu_handle_page_fault(const struct vcpu *current,
diff --git a/src/vm.c b/src/vm.c
index 856509f..0f36e21 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -100,7 +100,7 @@
 }
 
 /**
- * Locks the given VM and updates `locked` to hold the newly locked vm.
+ * Locks the given VM and updates `locked` to hold the newly locked VM.
  */
 struct vm_locked vm_lock(struct vm *vm)
 {
diff --git a/test/vmapi/primary_with_secondaries/run_race.c b/test/vmapi/primary_with_secondaries/run_race.c
index c31fa3c..222f17a 100644
--- a/test/vmapi/primary_with_secondaries/run_race.c
+++ b/test/vmapi/primary_with_secondaries/run_race.c
@@ -66,7 +66,7 @@
 
 /**
  * This is the entry point of the additional primary VM vCPU. It just calls
- * the run loop so that two cpus compete for the chance to run a secondary VM.
+ * the run loop so that two CPUs compete for the chance to run a secondary VM.
  */
 static void vm_cpu_entry(uintptr_t arg)
 {
diff --git a/test/vmapi/primary_with_secondaries/spci.c b/test/vmapi/primary_with_secondaries/spci.c
index a3cfbca..6ffc85f 100644
--- a/test/vmapi/primary_with_secondaries/spci.c
+++ b/test/vmapi/primary_with_secondaries/spci.c
@@ -125,7 +125,7 @@
 	struct mailbox_buffers mb = set_up_mailbox();
 	struct spci_value run_res;
 
-	/* Check is performed in secondary vm. */
+	/* Check is performed in secondary VM. */
 	SERVICE_SELECT(SERVICE_VM1, "spci_recv_non_blocking", mb.send);
 	run_res = spci_run(SERVICE_VM1, 0);
 	EXPECT_EQ(run_res.func, SPCI_YIELD_32);