Lines Matching +full:cross +full:- +full:arm64 +full:- +full:user

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012,2013 - ARM Ltd
7 * Copyright (C) 2012 - Virtual Open Systems and Columbia University
14 #include <linux/arm-smccc.h>
42 #define KVM_VCPU_VALID_FEATURES (BIT(KVM_VCPU_MAX_FEATURES) - 1)
60 * Mode of operation configurable with kvm-arm.mode early param.
61 * See Documentation/admin-guide/kernel-parameters.txt for more information.
92 *p = mc->head; in push_hyp_memcache()
93 mc->head = to_pa(p); in push_hyp_memcache()
94 mc->nr_pages++; in push_hyp_memcache()
100 phys_addr_t *p = to_va(mc->head); in pop_hyp_memcache()
102 if (!mc->nr_pages) in pop_hyp_memcache()
105 mc->head = *p; in pop_hyp_memcache()
106 mc->nr_pages--; in pop_hyp_memcache()
117 while (mc->nr_pages < min_pages) { in __topup_hyp_memcache()
121 return -ENOMEM; in __topup_hyp_memcache()
133 while (mc->nr_pages) in __free_hyp_memcache()
152 * translation regime that isn't affected by its own stage-2
153 * translation, such as a non-VHE hypervisor running at vEL2, or
155 * canonical stage-2 page tables.
173 * Protected by kvm->slots_lock.
219 /* Protects VM-scoped configuration data */
224 * information, report this to user space. User space can (and
247 /* VM-wide vCPU feature set */
251 * VM-wide PMU filter, implemented as a bitmap and big enough for
268 * These emulated idregs are VM-wide, but accessed from the context of a vCPU.
271 #define IDREG_IDX(id) (((sys_reg_CRm(id) - 1) << 3) | sys_reg_Op2(id))
272 #define IDREG(kvm, id) ((kvm)->arch.id_regs[IDREG_IDX(id)])
310 TPIDR_EL0, /* Thread ID, User R/W */
311 TPIDRRO_EL0, /* Thread ID, User R/O */
324 PMEVCNTR0_EL0, /* Event Counter Register (0-30) */
327 PMEVTYPER0_EL0, /* Event Type Register (0-30) */
333 PMUSERENR_EL0, /* User Enable Register */
370 FPEXC32_EL2, /* Floating-Point Exception Control Register */
402 CNTHCTL_EL2, /* Counter-timer Hypervisor Control register */
546 /* Self-hosted trace */
589 /* Per-vcpu CCSIDR override or NULL */
594 * Each 'flag' is composed of a comma-separated triplet:
596 * - the flag-set it belongs to in the vcpu->arch structure
597 * - the value for that flag
598 * - the mask for that flag
600 * __vcpu_single_flag() builds such a triplet for a single-bit flag.
611 typeof(v->arch.flagset) *_fset; \
623 READ_ONCE(v->arch.flagset) & (m); \
627 * Note that the set/clear accessors must be preempt-safe in order to
631 /* the nVHE hypervisor is always non-preemptible */
641 typeof(v->arch.flagset) *fset; \
645 fset = &v->arch.flagset; \
655 typeof(v->arch.flagset) *fset; \
659 fset = &v->arch.flagset; \
727 /* Software step state is Active-pending */
736 #define vcpu_sve_pffr(vcpu) (kern_hyp_va((vcpu)->arch.sve_state) + \
737 sve_ffr_offset((vcpu)->arch.sve_max_vl))
739 #define vcpu_sve_max_vq(vcpu) sve_vq_from_vl((vcpu)->arch.sve_max_vl)
745 if (WARN_ON(!sve_vl_valid((vcpu)->arch.sve_max_vl))) { \
781 #define vcpu_gp_regs(v) (&(v)->arch.ctxt.regs)
790 #define __ctxt_sys_reg(c,r) (&(c)->sys_regs[(r)])
794 #define __vcpu_sys_reg(v,r) (ctxt_sys_reg(&(v)->arch.ctxt, (r)))
810 * thread when emulating cross-VCPU communication. in __vcpu_read_sys_reg_from_cpu()
922 #define vcpu_has_run_once(vcpu) !!rcu_access_pointer((vcpu)->pid)
998 * arrived in guest context. For arm64, any event that arrives while a vCPU is
1026 vcpu_arch->steal.base = INVALID_GPA; in kvm_arm_pvtime_vcpu_init()
1031 return (vcpu_arch->steal.base != INVALID_GPA); in kvm_arm_is_pvtime_enabled()
1085 return (!has_vhe() && attr->exclude_host); in kvm_pmu_counter_deferred()
1129 test_bit(KVM_ARCH_FLAG_MTE_ENABLED, &(kvm)->arch.flags))
1136 (test_bit(KVM_ARCH_FLAG_HAS_RAN_ONCE, &(kvm)->arch.flags))