记录下 x86.c 的内容
- x86.c : mmio / pio 的处理
x86.c overview
- VMCS 的 IO
- timer pvclock tsc
-
ioctl
- pio mmio 和 一般的 IO 的模拟
- emulate
- debugfs
static struct kmem_cache *x86_fpu_cache; static struct kmem_cache *x86_emulator_cache; - kvm_on_user_return :
- user return ?
- share msr
-
exception_type
- payload
提供了很多函数访问设置 vcpu,比如 kvm_get_msr 之类的
- 谁调用 <- vmx.c 吧 !
- 实现的方法 : 将其放在 vmcs 中, 从 vmcs 中间读取 : 当想要访问的时候,
- vmcs 是内存区域,还会放在 CPU 中间,用 指令读写的内容
kvm_steal_time_set_preempted
details
vmx_vcpu_run
vmx_exit_handlers_fastpath : 通过 omit what 来 fast
kvm_read_guest_virt_helper
内核读取 guest 的内存,因为 guest 的使用地址空间是 用户态的,所以
- gva_to_gpa 的地址切换 gpa_t gpa = vcpu->arch.walk_mmu->gva_to_gpa(vcpu, addr, access,
- kvm_vcpu_read_guest_page : copy_to_user 而已
event injection
在 ./nested.md 中的同名 section 中间
kvm_vcpu_flush_tlb_all
static void kvm_vcpu_flush_tlb_all(struct kvm_vcpu *vcpu)
{
++vcpu->stat.tlb_flush;
kvm_x86_ops.tlb_flush_all(vcpu);
}
本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。