Commit f55ffaf
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>1 parent 7826c8f commit f55ffaf
4 files changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8373 | 8373 | | |
8374 | 8374 | | |
8375 | 8375 | | |
8376 | | - | |
| 8376 | + | |
8377 | 8377 | | |
8378 | 8378 | | |
8379 | 8379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
686 | 693 | | |
687 | 694 | | |
688 | 695 | | |
| |||
723 | 730 | | |
724 | 731 | | |
725 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
726 | 736 | | |
| 737 | + | |
| 738 | + | |
727 | 739 | | |
728 | 740 | | |
729 | 741 | | |
| |||
905 | 917 | | |
906 | 918 | | |
907 | 919 | | |
908 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
909 | 923 | | |
910 | 924 | | |
911 | 925 | | |
| |||
0 commit comments