Lines Matching refs:index
161 int index = vaddr >> (vm->page_shift + level * 9) & 0x1ffu; in virt_get_pte() local
163 return &page_table[index]; in virt_get_pte()
252 uint16_t index[4]; in _vm_get_page_table_entry() local
290 index[0] = (vaddr >> 12) & 0x1ffu; in _vm_get_page_table_entry()
291 index[1] = (vaddr >> 21) & 0x1ffu; in _vm_get_page_table_entry()
292 index[2] = (vaddr >> 30) & 0x1ffu; in _vm_get_page_table_entry()
293 index[3] = (vaddr >> 39) & 0x1ffu; in _vm_get_page_table_entry()
296 TEST_ASSERT(pml4e[index[3]] & PTE_PRESENT_MASK, in _vm_get_page_table_entry()
298 TEST_ASSERT((pml4e[index[3]] & (rsvd_mask | PTE_LARGE_MASK)) == 0, in _vm_get_page_table_entry()
301 pdpe = addr_gpa2hva(vm, PTE_GET_PFN(pml4e[index[3]]) * vm->page_size); in _vm_get_page_table_entry()
302 TEST_ASSERT(pdpe[index[2]] & PTE_PRESENT_MASK, in _vm_get_page_table_entry()
304 TEST_ASSERT(!(pdpe[index[2]] & PTE_LARGE_MASK), in _vm_get_page_table_entry()
306 TEST_ASSERT((pdpe[index[2]] & rsvd_mask) == 0, in _vm_get_page_table_entry()
309 pde = addr_gpa2hva(vm, PTE_GET_PFN(pdpe[index[2]]) * vm->page_size); in _vm_get_page_table_entry()
310 TEST_ASSERT(pde[index[1]] & PTE_PRESENT_MASK, in _vm_get_page_table_entry()
312 TEST_ASSERT(!(pde[index[1]] & PTE_LARGE_MASK), in _vm_get_page_table_entry()
314 TEST_ASSERT((pde[index[1]] & rsvd_mask) == 0, in _vm_get_page_table_entry()
317 pte = addr_gpa2hva(vm, PTE_GET_PFN(pde[index[1]]) * vm->page_size); in _vm_get_page_table_entry()
318 TEST_ASSERT(pte[index[0]] & PTE_PRESENT_MASK, in _vm_get_page_table_entry()
321 return &pte[index[0]]; in _vm_get_page_table_entry()
522 uint16_t index[4]; in addr_gva2gpa() local
529 index[0] = (gva >> 12) & 0x1ffu; in addr_gva2gpa()
530 index[1] = (gva >> 21) & 0x1ffu; in addr_gva2gpa()
531 index[2] = (gva >> 30) & 0x1ffu; in addr_gva2gpa()
532 index[3] = (gva >> 39) & 0x1ffu; in addr_gva2gpa()
537 if (!(pml4e[index[3]] & PTE_PRESENT_MASK)) in addr_gva2gpa()
540 pdpe = addr_gpa2hva(vm, PTE_GET_PFN(pml4e[index[3]]) * vm->page_size); in addr_gva2gpa()
541 if (!(pdpe[index[2]] & PTE_PRESENT_MASK)) in addr_gva2gpa()
544 pde = addr_gpa2hva(vm, PTE_GET_PFN(pdpe[index[2]]) * vm->page_size); in addr_gva2gpa()
545 if (!(pde[index[1]] & PTE_PRESENT_MASK)) in addr_gva2gpa()
548 pte = addr_gpa2hva(vm, PTE_GET_PFN(pde[index[1]]) * vm->page_size); in addr_gva2gpa()
549 if (!(pte[index[0]] & PTE_PRESENT_MASK)) in addr_gva2gpa()
552 return (PTE_GET_PFN(pte[index[0]]) * vm->page_size) + (gva & 0xfffu); in addr_gva2gpa()
728 buffer.entry.index = msr_index; in kvm_get_feature_msr()
794 kvm_get_supported_cpuid_index(uint32_t function, uint32_t index) in kvm_get_supported_cpuid_index() argument
803 cpuid->entries[i].index == index) { in kvm_get_supported_cpuid_index()
810 function, index); in kvm_get_supported_cpuid_index()
867 buffer.entry.index = msr_index; in vcpu_get_msr()
903 buffer.entry.index = msr_index; in _vcpu_set_msr()
1106 state->msrs.entries[i].index = list->indices[i]; in vcpu_save_state()
1140 r, r == state->msrs.nmsrs ? -1 : state->msrs.entries[r].index); in vcpu_load_state()
1312 if (cur->function != ent->function || cur->index != ent->index) in set_cpuid()