shadow_if
static struct shadow_if *get_shadow_if(void)
return this_cpu_ptr(&shadow_if);
struct shadow_if *shadow_if;
shadow_if = container_of(s_cpu_if, struct shadow_if, cpuif);
shadow_if->lr_map = 0;
s_cpu_if->vgic_lr[hweight16(shadow_if->lr_map)] = lr;
shadow_if->lr_map |= BIT(i);
s_cpu_if->used_lrs = hweight16(shadow_if->lr_map);
struct shadow_if *shadow_if = get_shadow_if();
for_each_set_bit(i, &shadow_if->lr_map, kvm_vgic_global_state.nr_lr) {
host_lr = __gic_v3_get_lr(lr_map_idx_to_shadow_idx(shadow_if, i));
struct shadow_if *shadow_if = get_shadow_if();
struct vgic_v3_cpu_if *cpu_if = &shadow_if->cpuif;
struct shadow_if *shadow_if = get_shadow_if();
struct vgic_v3_cpu_if *s_cpu_if = &shadow_if->cpuif;
static DEFINE_PER_CPU(struct shadow_if, shadow_if);
static int lr_map_idx_to_shadow_idx(struct shadow_if *shadow_if, int idx)
return hweight16(shadow_if->lr_map & (BIT(idx) - 1));