struct kvm_world_switch { int (*exc_entry)(void); int (*enter_guest)(struct kvm_run *run, struct kvm_vcpu *vcpu); unsignedlong page_order;
};
#define MAX_PGTABLE_LEVELS 4
/* * Physical CPUID is used for interrupt routing, there are different * definitions about physical cpuid on different hardwares. * * For LOONGARCH_CSR_CPUID register, max CPUID size if 512 * For IPI hardware, max destination CPUID size 1024 * For eiointc interrupt controller, max destination CPUID size is 256 * For msgint interrupt controller, max supported CPUID size is 65536 * * Currently max CPUID is defined as 256 for KVM hypervisor, in future * it will be expanded to 4096, including 16 packages at most. And every * package supports at most 256 vcpus
*/ #define KVM_MAX_PHYID 256
struct kvm_vcpu_arch { /* * Switch pointer-to-function type to unsigned long * for loading the value into register directly.
*/ unsignedlong host_eentry; unsignedlong guest_eentry;
/* Pointers stored here for easy accessing from assembly code */ int (*handle_exit)(struct kvm_run *run, struct kvm_vcpu *vcpu);
/* GPA (=HVA) of PGD for secondary mmu */ unsignedlong kvm_pgd;
/* KVM register to control count timer */
u32 count_ctl; struct hrtimer swtimer;
/* Bitmask of intr that are pending */ unsignedlong irq_pending; /* Bitmask of pending intr to be cleared */ unsignedlong irq_clear;
/* Bitmask of exceptions that are pending */ unsignedlong exception_pending; unsignedint esubcode;
/* Cache for pages needed inside spinlock regions */ struct kvm_mmu_memory_cache mmu_page_cache;
/* vcpu's vpid */
u64 vpid;
gpa_t flush_gpa;
/* Frequency of stable timer in Hz */
u64 timer_mhz;
ktime_t expire;
/* Last CPU the vCPU state was loaded on */ int last_sched_cpu; /* mp state */ struct kvm_mp_state mp_state; /* ipi state */ struct ipi_state ipi_state; /* cpucfg */
u32 cpucfg[KVM_MAX_CPUCFG_REGS];
/* * kvm_is_ifetch_fault() - Find whether a TLBL exception is due to ifetch fault. * @vcpu: Virtual CPU. * * Returns: Whether the TLBL exception was likely due to an instruction * fetch fault rather than a data load fault.
*/ staticinlinebool kvm_is_ifetch_fault(struct kvm_vcpu_arch *arch)
{ return arch->pc == arch->badv;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.