Lines Matching +full:pch +full:- +full:pic +full:- +full:1

1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020-2023 Loongson Technology Corporation Limited
43 * function to set the flag to 1 (SW_GCSR) or 2 (HW_GCSR) if the
202 context = per_cpu_ptr(vcpu->kvm->arch.vmcs, cpu); in kvm_update_vpid()
203 vpid = context->vpid_cache + 1; in kvm_update_vpid()
207 vpid = vpid_mask + 1; in kvm_update_vpid()
215 context->vpid_cache = vpid; in kvm_update_vpid()
216 vcpu->arch.vpid = vpid; in kvm_update_vpid()
231 context = per_cpu_ptr(vcpu->kvm->arch.vmcs, cpu); in kvm_check_vpid()
232 migrated = (vcpu->cpu != cpu); in kvm_check_vpid()
241 ver = vcpu->arch.vpid & ~vpid_mask; in kvm_check_vpid()
242 old = context->vpid_cache & ~vpid_mask; in kvm_check_vpid()
245 trace_kvm_vpid_change(vcpu, vcpu->arch.vpid); in kvm_check_vpid()
246 vcpu->cpu = cpu; in kvm_check_vpid()
269 vpid = (vcpu->arch.vpid & vpid_mask) << CSR_GSTAT_GID_SHIFT; in kvm_check_vpid()
275 kvm->arch.vmcs = vmcs; in kvm_init_vmcs()
281 return -ENOIOCTLCMD; in kvm_arch_dev_ioctl()
301 * CACTRL=1: Root control cache. in kvm_arch_enable_virtualization_cpu()
325 this_cpu_ptr(vmcs)->last_vcpu = NULL; in kvm_arch_enable_virtualization_cpu()
350 return -ENOMEM; in kvm_loongarch_env_init()
357 return -ENOMEM; in kvm_loongarch_env_init()
375 return -ENOMEM; in kvm_loongarch_env_init()
381 kvm_loongarch_ops->exc_entry = addr; in kvm_loongarch_env_init()
382 kvm_loongarch_ops->enter_guest = addr + kvm_exception_size; in kvm_loongarch_env_init()
383 kvm_loongarch_ops->page_order = order; in kvm_loongarch_env_init()
388 vpid_mask = GENMASK(vpid_mask - 1, 0); in kvm_loongarch_env_init()
392 context->vpid_cache = vpid_mask + 1; in kvm_loongarch_env_init()
393 context->last_vcpu = NULL; in kvm_loongarch_env_init()
408 /* Register LoongArch PCH-PIC interrupt controller interface. */ in kvm_loongarch_env_init()
422 if (kvm_loongarch_ops->exc_entry) { in kvm_loongarch_env_exit()
423 addr = (unsigned long)kvm_loongarch_ops->exc_entry; in kvm_loongarch_env_exit()
424 free_pages(addr, kvm_loongarch_ops->page_order); in kvm_loongarch_env_exit()
436 return -ENODEV; in kvm_loongarch_init()