Skip to content
Snippets Groups Projects
Select Git revision
  • 1085fdc68c6097244627a02a56bd2d8fe58a1a9c
  • openEuler-1.0-LTS default protected
  • openEuler-22.09
  • OLK-5.10
  • openEuler-22.03-LTS
  • openEuler-22.03-LTS-Ascend
  • master
  • openEuler-22.03-LTS-LoongArch-NW
  • openEuler-22.09-HCK
  • openEuler-20.03-LTS-SP3
  • openEuler-21.09
  • openEuler-21.03
  • openEuler-20.09
  • 4.19.90-2210.5.0
  • 5.10.0-123.0.0
  • 5.10.0-60.63.0
  • 5.10.0-60.62.0
  • 4.19.90-2210.4.0
  • 5.10.0-121.0.0
  • 5.10.0-60.61.0
  • 4.19.90-2210.3.0
  • 5.10.0-60.60.0
  • 5.10.0-120.0.0
  • 5.10.0-60.59.0
  • 5.10.0-119.0.0
  • 4.19.90-2210.2.0
  • 4.19.90-2210.1.0
  • 5.10.0-118.0.0
  • 5.10.0-106.19.0
  • 5.10.0-60.58.0
  • 4.19.90-2209.6.0
  • 5.10.0-106.18.0
  • 5.10.0-106.17.0
33 results

arm.c

Blame
  • arm.c 30.92 KiB
    /*
     * Copyright (C) 2012 - Virtual Open Systems and Columbia University
     * Author: Christoffer Dall <c.dall@virtualopensystems.com>
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License, version 2, as
     * published by the Free Software Foundation.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     */
    
    #include <linux/cpu_pm.h>
    #include <linux/errno.h>
    #include <linux/err.h>
    #include <linux/kvm_host.h>
    #include <linux/list.h>
    #include <linux/module.h>
    #include <linux/vmalloc.h>
    #include <linux/fs.h>
    #include <linux/mman.h>
    #include <linux/sched.h>
    #include <linux/kvm.h>
    #include <trace/events/kvm.h>
    #include <kvm/arm_pmu.h>
    
    #define CREATE_TRACE_POINTS
    #include "trace.h"
    
    #include <asm/uaccess.h>
    #include <asm/ptrace.h>
    #include <asm/mman.h>
    #include <asm/tlbflush.h>
    #include <asm/cacheflush.h>
    #include <asm/virt.h>
    #include <asm/kvm_arm.h>
    #include <asm/kvm_asm.h>
    #include <asm/kvm_mmu.h>
    #include <asm/kvm_emulate.h>
    #include <asm/kvm_coproc.h>
    #include <asm/kvm_psci.h>
    #include <asm/sections.h>
    
    #ifdef REQUIRES_VIRT
    __asm__(".arch_extension	virt");
    #endif
    
    static DEFINE_PER_CPU(unsigned long, kvm_arm_hyp_stack_page);
    static kvm_cpu_context_t __percpu *kvm_host_cpu_state;
    static unsigned long hyp_default_vectors;
    
    /* Per-CPU variable containing the currently running vcpu. */
    static DEFINE_PER_CPU(struct kvm_vcpu *, kvm_arm_running_vcpu);
    
    /* The VMID used in the VTTBR */
    static atomic64_t kvm_vmid_gen = ATOMIC64_INIT(1);
    static u32 kvm_next_vmid;
    static unsigned int kvm_vmid_bits __read_mostly;
    static DEFINE_SPINLOCK(kvm_vmid_lock);
    
    static bool vgic_present;
    
    static DEFINE_PER_CPU(unsigned char, kvm_arm_hardware_enabled);