diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-06-06 17:33:48 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-06-15 09:24:27 +0530 |
commit | e2c3f01af4329aa7e9009edee13b7cfdf379071f (patch) | |
tree | 9b4b0d6ecd076ef0f14c514433a251a8bb64487d /include | |
parent | 32f87e5a8668445097473d4ad3ab5a0de7b1dd6f (diff) |
lib: Fix __sbi_hfence_gvma_vmid_gpa() and __sbi_hfence_vvma_asid_va()
The arguments/parameters of __sbi_hfence_gvma_vmid_gpa() and
__sbi_hfence_vvma_asid_va() functions are swapped so we fix it.
Currently, we did not face any issues because QEMU does a full
TLB flush for all HFENCE instructions.
We also improve documentation of HFENCE.GVMA and HFENCE.VVMA
instruction encoding.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_hfence.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/sbi/sbi_hfence.h b/include/sbi/sbi_hfence.h index 824a8d6..4420f27 100644 --- a/include/sbi/sbi_hfence.h +++ b/include/sbi/sbi_hfence.h @@ -10,8 +10,9 @@ #ifndef __SBI_FENCE_H__ #define __SBI_FENCE_H__ + /** Invalidate Stage2 TLBs for given VMID and guest physical address */ -void __sbi_hfence_gvma_vmid_gpa(unsigned long vmid, unsigned long gpa); +void __sbi_hfence_gvma_vmid_gpa(unsigned long gpa, unsigned long vmid); /** Invalidate Stage2 TLBs for given VMID */ void __sbi_hfence_gvma_vmid(unsigned long vmid); @@ -23,7 +24,7 @@ void __sbi_hfence_gvma_gpa(unsigned long gpa); void __sbi_hfence_gvma_all(void); /** Invalidate unified TLB entries for given asid and guest virtual address */ -void __sbi_hfence_vvma_asid_va(unsigned long asid, unsigned long va); +void __sbi_hfence_vvma_asid_va(unsigned long va, unsigned long asid); /** Invalidate unified TLB entries for given ASID for a guest*/ void __sbi_hfence_vvma_asid(unsigned long asid); @@ -33,4 +34,5 @@ void __sbi_hfence_vvma_va(unsigned long va); /** Invalidate all possible Stage2 TLBs */ void __sbi_hfence_vvma_all(void); + #endif |