Store current vcpu instead of cpu in tpidr_el2.
This allows us to avoid an extra indirection in the most common paths.
Change-Id: I2ea71ee1a56ee8b94f7f516465081e88e82d8539
diff --git a/inc/hf/cpu.h b/inc/hf/cpu.h
index 809c21e..1d3d640 100644
--- a/inc/hf/cpu.h
+++ b/inc/hf/cpu.h
@@ -45,6 +45,7 @@
struct vcpu {
struct spinlock lock;
enum vcpu_state state;
+ struct cpu *cpu;
struct vm *vm;
struct vcpu *mailbox_next;
struct arch_regs regs;
@@ -55,8 +56,6 @@
/* CPU identifier. Doesn't have to be contiguous. */
size_t id;
- struct vcpu *current;
-
/* Pointer to bottom of the stack. */
void *stack_bottom;