History

KVM: Support dirty ring in conjunction with bitmap

ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is enabled. It's conflicting with that ring-based dirty page tracking always requires a running VCPU context. Introduce a new flavor of dirty ring that requires the use of both VCPU dirty rings and a dirty bitmap. The expectation is that for non-VCPU sources of dirty memory (such as the VGIC/ITS on arm64), KVM writes to the dirty bitmap. Userspace should scan the dirty bitmap before migrating the VM to the target. Use an additional capability to advertise this behavior. The newly added capability (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) can't be enabled before KVM_CAP_DIRTY_LOG_RING_ACQ_REL on ARM64. In this way, the newly added capability is treated as an extension of KVM_CAP_DIRTY_LOG_RING_ACQ_REL.

Gavin Shan committed 4 years ago

Commit 86bdf3e1 parent e8a18568 files · +112 −17Browse files

Showing the changes to include/uapi (1 of 8 files). Show all

Unified · Split

include/uapi/linux/kvm.h+1−0
@@ -1178,6 +1178,7 @@ struct kvm_ppc_resize_hpt { · 1177 unmodified lines
11781178 #define KVM_CAP_S390_ZPCI_OP 221
11791179 #define KVM_CAP_S390_CPU_TOPOLOGY 222
11801180 #define KVM_CAP_DIRTY_LOG_RING_ACQ_REL 223
1181+#define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 224
11811182
11821183 #ifdef KVM_CAP_IRQ_ROUTING
11831184

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t