summaryrefslogtreecommitdiff
path: root/arch/riscv/include/uapi/asm/kvm.h
diff options
context:
space:
mode:
authorQuan Zhou <zhouquan@iscas.ac.cn>2025-06-13 19:29:57 +0800
committerAnup Patel <anup@brainfault.org>2025-07-28 22:28:22 +0530
commitf55ffaf89636877c269ca28399b30d48898c62f3 (patch)
tree9ca21e08ae79b04fff4242b4c3d532f59f1a96c3 /arch/riscv/include/uapi/asm/kvm.h
parent7826c8f37220daabf90c09fcd9a835d6763f1372 (diff)
RISC-V: KVM: Enable ring-based dirty memory tracking
Enable ring-based dirty memory tracking on riscv: - Enable CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL as riscv is weakly ordered. - Set KVM_DIRTY_LOG_PAGE_OFFSET for the ring buffer's physical page offset. - Add a check to kvm_vcpu_kvm_riscv_check_vcpu_requests for checking whether the dirty ring is soft full. To handle vCPU requests that cause exits to userspace, modified the `kvm_riscv_check_vcpu_requests` to return a value (currently only returns 0 or 1). Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20e116efb1f7aff211dd8e3cf8990c5521ed5f34.1749810735.git.zhouquan@iscas.ac.cn Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/include/uapi/asm/kvm.h')
-rw-r--r--arch/riscv/include/uapi/asm/kvm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h
index 5f59fd226cc5..ef27d4289da1 100644
--- a/arch/riscv/include/uapi/asm/kvm.h
+++ b/arch/riscv/include/uapi/asm/kvm.h
@@ -18,6 +18,7 @@
#define __KVM_HAVE_IRQ_LINE
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
+#define KVM_DIRTY_LOG_PAGE_OFFSET 64
#define KVM_INTERRUPT_SET -1U
#define KVM_INTERRUPT_UNSET -2U