Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel mode : mmu #7

Open
8 of 14 tasks
Martins3 opened this issue Dec 21, 2020 · 1 comment
Open
8 of 14 tasks

kernel mode : mmu #7

Martins3 opened this issue Dec 21, 2020 · 1 comment

Comments

@Martins3
Copy link
Owner

Martins3 commented Dec 21, 2020

Something related to emualted:

  • mapped and unmapped
    • kvm_mips_gpa_pte_to_gva_unmapped, kvm_mips_gpa_pte_to_gva_mapped
    • kvm_mips_handle_kseg0_tlb_fault <= kvm_trap_emul_gva_fault <= kvm_get_inst <= used by emulate.c
  • kseg0
    • kvm_mips_handle_kseg0_tlb_fault
  • emulated
    • x: kvm_trap_emul_gva_fault
      • x: kvm_get_inst
    • kvm_mips_handle_mapped_seg_tlb_fault : caller is emulate

Boring stuff

  • move mmu notifier to mmu.c
  • kvm_pgd_alloc
  • examine transparent hugepage
  • dune_arch_vcpu_put : some effort to complete the code
  • kvm_mips_handle_commpage_tlb_fault : now that commpage is used for tlb, should dune remove it ?
  • remove kvm_host.c
  • remove dirty bit tracking in mmu.c

vcpu, ept and guest page table

  • A sthread fork will create two guest page table
  • A Linux fork with VM clone will create two
  • A dune_enter doesn't create user space percpu
    • dune_enter create a new vcpu and ept

kvm_memory_slot

  • maybe we should take advantage of it
  • move memory_slot related code into one place
@Martins3
Copy link
Owner Author

Martins3 commented Dec 21, 2020

  • can vz_vm substitude kvm in mmu.c ?
  • it's kvm_flush_remote_tlbs necessary ?
    • vz_vm::tlbs_dirty : why we need it ? (No, only x86 use it, in the paging_tmpl.h)
    • There is no doubt local TLB flush is obligatory
    • flush remote is necessary if ept is shared by multiple vcpu
    • Should dune support remote tlb flush
    • What's the difference between two separate ept and one sharing ept?
      • ept mapping is the same
      • does dune create two ept with fork ? (yes, but shouldn't) vmx_launch -> vmx_create_vcpu -> vmx_init_ept will create new cpu.
      • should dune create a new vcpu for every process?
        • it's possible, but need some efforts like sthread, and set a limitation on two processes where they can't run simultaneously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant