Message ID | e105cd9e381fd4ae121952aae2a79cd6ebc612a8.1622479161.git.huangy81@chinatelecom.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | support dirtyrate at the granualrity of vcpu | expand |
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index c7ec538850..2e96b77b31 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2293,6 +2293,11 @@ bool kvm_vcpu_id_is_valid(int vcpu_id) return vcpu_id >= 0 && vcpu_id < kvm_max_vcpu_id(s); } +bool kvm_dirty_ring_enabled(void) +{ + return kvm_state->kvm_dirty_ring_size ? true : false; +} + static int kvm_init(MachineState *ms) { MachineClass *mc = MACHINE_GET_CLASS(ms); diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index a1ab1ee12d..7b22aeb6ae 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -547,4 +547,5 @@ bool kvm_cpu_check_are_resettable(void); bool kvm_arch_cpu_check_are_resettable(void); +bool kvm_dirty_ring_enabled(void); #endif