mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function
Introduce kvm_dirty_ring_size util function to help calculate dirty ring ful time. Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Acked-by: Peter Xu <peterx@redhat.com> Message-Id: <f9ce1f550bfc0e3a1f711e17b1dbc8f701700e56.1656177590.git.huangy81@chinatelecom.cn> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
cc2b33eab0
commit
4a06a7cc05
3 changed files with 12 additions and 0 deletions
|
@ -2318,6 +2318,11 @@ static void query_stats_cb(StatsResultList **result, StatsTarget target,
|
||||||
strList *names, strList *targets, Error **errp);
|
strList *names, strList *targets, Error **errp);
|
||||||
static void query_stats_schemas_cb(StatsSchemaList **result, Error **errp);
|
static void query_stats_schemas_cb(StatsSchemaList **result, Error **errp);
|
||||||
|
|
||||||
|
uint32_t kvm_dirty_ring_size(void)
|
||||||
|
{
|
||||||
|
return kvm_state->kvm_dirty_ring_size;
|
||||||
|
}
|
||||||
|
|
||||||
static int kvm_init(MachineState *ms)
|
static int kvm_init(MachineState *ms)
|
||||||
{
|
{
|
||||||
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
||||||
|
|
|
@ -148,3 +148,8 @@ bool kvm_dirty_ring_enabled(void)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t kvm_dirty_ring_size(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -582,4 +582,6 @@ bool kvm_cpu_check_are_resettable(void);
|
||||||
bool kvm_arch_cpu_check_are_resettable(void);
|
bool kvm_arch_cpu_check_are_resettable(void);
|
||||||
|
|
||||||
bool kvm_dirty_ring_enabled(void);
|
bool kvm_dirty_ring_enabled(void);
|
||||||
|
|
||||||
|
uint32_t kvm_dirty_ring_size(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue