mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
xen/riscv: implement sbi_remote_hfence_gvma()
Instruct the remote harts to execute one or more HFENCE.GVMA instructions, covering the range of guest physical addresses between start_addr and start_addr + size for all VMIDs. The remote fence operation applies to the entire address space if either: - start_addr and size are both 0, or - size is equal to 2^XLEN-1. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
1db7829e56
commit
f64ee2f615
2 files changed
+26
No files matched your search
@@ -89,6 +89,25 @@ bool sbi_has_rfence(void);
|
||||
int sbi_remote_sfence_vma(const cpumask_t *cpu_mask, vaddr_t start,
|
||||
size_t size);
|
||||
|
||||
/*
|
||||
* Instruct the remote harts to execute one or more HFENCE.GVMA
|
||||
* instructions, covering the range of guest physical addresses
|
||||
* in [start_addr, start_addr + size) for all VMIDs.
|
||||
*
|
||||
* Returns 0 if IPI was sent to all the targeted harts successfully
|
||||
* or negative value if start_addr or size is not valid.
|
||||
*
|
||||
* The remote fence operation applies to the entire address space if either:
|
||||
* - start_addr and size are both 0, or
|
||||
* - size is equal to 2^XLEN-1.
|
||||
*
|
||||
* @cpu_mask a cpu mask containing all the target CPUs (in Xen space).
|
||||
* @param start virtual address start
|
||||
* @param size virtual address range size
|
||||
*/
|
||||
int sbi_remote_hfence_gvma(const cpumask_t *cpu_mask, vaddr_t start,
|
||||
size_t size);
|
||||
|
||||
/*
|
||||
* Initialize SBI library
|
||||
*
|
||||
|
||||
@@ -258,6 +258,13 @@ int sbi_remote_sfence_vma(const cpumask_t *cpu_mask, vaddr_t start,
|
||||
cpu_mask, start, size, 0, 0);
|
||||
}
|
||||
|
||||
int sbi_remote_hfence_gvma(const cpumask_t *cpu_mask, vaddr_t start,
|
||||
size_t size)
|
||||
{
|
||||
return sbi_rfence(SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
|
||||
cpu_mask, start, size, 0, 0);
|
||||
}
|
||||
|
||||
/* This function must always succeed. */
|
||||
#define sbi_get_spec_version() \
|
||||
sbi_ext_base_func(SBI_EXT_BASE_GET_SPEC_VERSION)
|
||||
|
||||