|
@@ -190,6 +190,36 @@ void __hyp_text __sysreg32_restore_state(struct kvm_vcpu *vcpu)
|
|
|
write_sysreg(sysreg[DBGVCR32_EL2], dbgvcr32_el2);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * kvm_vcpu_load_sysregs - Load guest system registers to the physical CPU
|
|
|
+ *
|
|
|
+ * @vcpu: The VCPU pointer
|
|
|
+ *
|
|
|
+ * Load system registers that do not affect the host's execution, for
|
|
|
+ * example EL1 system registers on a VHE system where the host kernel
|
|
|
+ * runs at EL2. This function is called from KVM's vcpu_load() function
|
|
|
+ * and loading system register state early avoids having to load them on
|
|
|
+ * every entry to the VM.
|
|
|
+ */
|
|
|
+void kvm_vcpu_load_sysregs(struct kvm_vcpu *vcpu)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * kvm_vcpu_put_sysregs - Restore host system registers to the physical CPU
|
|
|
+ *
|
|
|
+ * @vcpu: The VCPU pointer
|
|
|
+ *
|
|
|
+ * Save guest system registers that do not affect the host's execution, for
|
|
|
+ * example EL1 system registers on a VHE system where the host kernel
|
|
|
+ * runs at EL2. This function is called from KVM's vcpu_put() function
|
|
|
+ * and deferring saving system register state until we're no longer running the
|
|
|
+ * VCPU avoids having to save them on every exit from the VM.
|
|
|
+ */
|
|
|
+void kvm_vcpu_put_sysregs(struct kvm_vcpu *vcpu)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
void __hyp_text __kvm_set_tpidr_el2(u64 tpidr_el2)
|
|
|
{
|
|
|
asm("msr tpidr_el2, %0": : "r" (tpidr_el2));
|