arch/mips/include/asm/kvm_host.h

Source file repositories/reference/linux-study-clean/arch/mips/include/asm/kvm_host.h

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/kvm_host.h
Extension
.h
Size
30152 bytes
Lines
898
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

struct kvm_vm_stat {
	struct kvm_vm_stat_generic generic;
};

struct kvm_vcpu_stat {
	struct kvm_vcpu_stat_generic generic;
	u64 wait_exits;
	u64 cache_exits;
	u64 signal_exits;
	u64 int_exits;
	u64 cop_unusable_exits;
	u64 tlbmod_exits;
	u64 tlbmiss_ld_exits;
	u64 tlbmiss_st_exits;
	u64 addrerr_st_exits;
	u64 addrerr_ld_exits;
	u64 syscall_exits;
	u64 resvd_inst_exits;
	u64 break_inst_exits;
	u64 trap_inst_exits;
	u64 msa_fpe_exits;
	u64 fpe_exits;
	u64 msa_disabled_exits;
	u64 flush_dcache_exits;
	u64 vz_gpsi_exits;
	u64 vz_gsfc_exits;
	u64 vz_hc_exits;
	u64 vz_grr_exits;
	u64 vz_gva_exits;
	u64 vz_ghfc_exits;
	u64 vz_gpa_exits;
	u64 vz_resvd_exits;
#ifdef CONFIG_CPU_LOONGSON64
	u64 vz_cpucfg_exits;
#endif
};

struct kvm_arch_memory_slot {
};

#ifdef CONFIG_CPU_LOONGSON64
struct ipi_state {
	uint32_t status;
	uint32_t en;
	uint32_t set;
	uint32_t clear;
	uint64_t buf[4];
};

struct loongson_kvm_ipi;

struct ipi_io_device {
	int node_id;
	struct loongson_kvm_ipi *ipi;
	struct kvm_io_device device;
};

struct loongson_kvm_ipi {
	spinlock_t lock;
	struct kvm *kvm;
	struct ipi_state ipistate[16];
	struct ipi_io_device dev_ipi[4];
};
#endif

struct kvm_arch {
	/* Guest physical mm */
	struct mm_struct gpa_mm;
	/* Mask of CPUs needing GPA ASID flush */
	cpumask_t asid_flush_mask;
#ifdef CONFIG_CPU_LOONGSON64
	struct loongson_kvm_ipi ipi;
#endif
};

#define N_MIPS_COPROC_REGS	32
#define N_MIPS_COPROC_SEL	8

struct mips_coproc {
	unsigned long reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL];
#ifdef CONFIG_KVM_MIPS_DEBUG_COP0_COUNTERS
	unsigned long stat[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL];
#endif
};

/*
 * Coprocessor 0 register names
 */
#define MIPS_CP0_TLB_INDEX	0
#define MIPS_CP0_TLB_RANDOM	1

Annotation

Implementation Notes