Lines Matching refs:val
162 void kvm_pmu_set_counter_value(struct kvm_vcpu *vcpu, u64 select_idx, u64 val) in kvm_pmu_set_counter_value() argument
168 __vcpu_sys_reg(vcpu, reg) += (s64)val - kvm_pmu_get_counter_value(vcpu, select_idx); in kvm_pmu_set_counter_value()
196 u64 counter, reg, val; in kvm_pmu_stop_counter() local
206 val = counter; in kvm_pmu_stop_counter()
209 val = lower_32_bits(counter); in kvm_pmu_stop_counter()
212 __vcpu_sys_reg(vcpu, reg) = val; in kvm_pmu_stop_counter()
266 u64 val = __vcpu_sys_reg(vcpu, PMCR_EL0) >> ARMV8_PMU_PMCR_N_SHIFT; in kvm_pmu_valid_counter_mask() local
268 val &= ARMV8_PMU_PMCR_N_MASK; in kvm_pmu_valid_counter_mask()
269 if (val == 0) in kvm_pmu_valid_counter_mask()
272 return GENMASK(val - 1, 0) | BIT(ARMV8_PMU_CYCLE_IDX); in kvm_pmu_valid_counter_mask()
282 void kvm_pmu_enable_counter_mask(struct kvm_vcpu *vcpu, u64 val) in kvm_pmu_enable_counter_mask() argument
288 if (!(__vcpu_sys_reg(vcpu, PMCR_EL0) & ARMV8_PMU_PMCR_E) || !val) in kvm_pmu_enable_counter_mask()
292 if (!(val & BIT(i))) in kvm_pmu_enable_counter_mask()
323 void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val) in kvm_pmu_disable_counter_mask() argument
329 if (!val) in kvm_pmu_disable_counter_mask()
333 if (!(val & BIT(i))) in kvm_pmu_disable_counter_mask()
481 void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) in kvm_pmu_software_increment() argument
490 val &= __vcpu_sys_reg(vcpu, PMCNTENSET_EL0); in kvm_pmu_software_increment()
495 if (!(val & BIT(i))) in kvm_pmu_software_increment()
531 void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) in kvm_pmu_handle_pmcr() argument
537 if (val & ARMV8_PMU_PMCR_E) { in kvm_pmu_handle_pmcr()
544 if (val & ARMV8_PMU_PMCR_C) in kvm_pmu_handle_pmcr()
547 if (val & ARMV8_PMU_PMCR_P) { in kvm_pmu_handle_pmcr()