Lines Matching refs:prot

97 static bool host_stage2_force_pte_cb(u64 addr, u64 end, enum kvm_pgtable_prot prot);
231 enum kvm_pgtable_prot prot) in __host_stage2_idmap() argument
234 prot, &host_s2_pool); in __host_stage2_idmap()
295 enum kvm_pgtable_prot prot) in host_stage2_idmap_locked() argument
299 return host_stage2_try(__host_stage2_idmap, addr, addr + size, prot); in host_stage2_idmap_locked()
310 static bool host_stage2_force_pte_cb(u64 addr, u64 end, enum kvm_pgtable_prot prot) in host_stage2_force_pte_cb() argument
327 return prot != PKVM_HOST_MEM_PROT; in host_stage2_force_pte_cb()
329 return prot != PKVM_HOST_MMIO_PROT; in host_stage2_force_pte_cb()
336 enum kvm_pgtable_prot prot; in host_stage2_idmap() local
339 prot = is_memory ? PKVM_HOST_MEM_PROT : PKVM_HOST_MMIO_PROT; in host_stage2_idmap()
346 ret = host_stage2_idmap_locked(range.start, range.end - range.start, prot); in host_stage2_idmap()
353 static inline bool check_prot(enum kvm_pgtable_prot prot, in check_prot() argument
357 return (prot & (required | denied)) == required; in check_prot()
363 enum kvm_pgtable_prot prot, cur; in __pkvm_host_share_hyp() local
388 prot = pkvm_mkstate(0, PKVM_PAGE_SHARED_BORROWED); in __pkvm_host_share_hyp()
389 if (!check_prot(cur, PKVM_HOST_MEM_PROT, prot)) { in __pkvm_host_share_hyp()
416 prot = pkvm_mkstate(PAGE_HYP, PKVM_PAGE_SHARED_BORROWED); in __pkvm_host_share_hyp()
417 if (!check_prot(cur, prot, ~prot)) in __pkvm_host_share_hyp()
426 prot = pkvm_mkstate(PAGE_HYP, PKVM_PAGE_SHARED_BORROWED); in __pkvm_host_share_hyp()
427 ret = pkvm_create_mappings_locked(virt, virt + PAGE_SIZE, prot); in __pkvm_host_share_hyp()
430 prot = pkvm_mkstate(PKVM_HOST_MEM_PROT, PKVM_PAGE_SHARED_OWNED); in __pkvm_host_share_hyp()
431 ret = host_stage2_idmap_locked(addr, PAGE_SIZE, prot); in __pkvm_host_share_hyp()