KVM
Functions | Variables
hyp-smp.c File Reference
#include <asm/kvm_asm.h>
#include <asm/kvm_hyp.h>
#include <asm/kvm_mmu.h>
Include dependency graph for hyp-smp.c:

Go to the source code of this file.

Functions

u64 cpu_logical_map (unsigned int cpu)
 
unsigned long __hyp_per_cpu_offset (unsigned int cpu)
 

Variables

u64 __ro_after_init hyp_cpu_logical_map [NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }
 
unsigned long __ro_after_init kvm_arm_hyp_percpu_base [NR_CPUS]
 

Function Documentation

◆ __hyp_per_cpu_offset()

unsigned long __hyp_per_cpu_offset ( unsigned int  cpu)

Definition at line 28 of file hyp-smp.c.

29 {
30  unsigned long *cpu_base_array;
31  unsigned long this_cpu_base;
32  unsigned long elf_base;
33 
34  BUG_ON(cpu >= ARRAY_SIZE(kvm_arm_hyp_percpu_base));
35 
36  cpu_base_array = (unsigned long *)&kvm_arm_hyp_percpu_base;
37  this_cpu_base = kern_hyp_va(cpu_base_array[cpu]);
38  elf_base = (unsigned long)&__per_cpu_start;
39  return this_cpu_base - elf_base;
40 }
unsigned long __ro_after_init kvm_arm_hyp_percpu_base[NR_CPUS]
Definition: hyp-smp.c:26

◆ cpu_logical_map()

u64 cpu_logical_map ( unsigned int  cpu)

Definition at line 19 of file hyp-smp.c.

20 {
21  BUG_ON(cpu >= ARRAY_SIZE(hyp_cpu_logical_map));
22 
23  return hyp_cpu_logical_map[cpu];
24 }
u64 __ro_after_init hyp_cpu_logical_map[NR_CPUS]
Definition: hyp-smp.c:17
Here is the caller graph for this function:

Variable Documentation

◆ hyp_cpu_logical_map

u64 __ro_after_init hyp_cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }

Definition at line 17 of file hyp-smp.c.

◆ kvm_arm_hyp_percpu_base

unsigned long __ro_after_init kvm_arm_hyp_percpu_base[NR_CPUS]

Definition at line 26 of file hyp-smp.c.