add dirty ring command

This commit is contained in:
mii
2024-04-22 08:34:21 +00:00
parent 62dbe54c24
commit 1a1ee1de48
7 changed files with 44 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#include "hw/intc/intc.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
bool hmp_handle_error(Monitor *mon, Error *err)
{
@ -443,3 +444,12 @@ void hmp_info_mtree(Monitor *mon, const QDict *qdict)
mtree_info(flatview, dispatch_tree, owner, disabled);
}
void hmp_dirtyring(Monitor *mon, const QDict *qdict)
{
if (kvm_dirty_ring_enabled()) {
printf("Dirty ring enabled.\n");
} else {
printf("Dirty ring disabled.\n");
}
}

View File

@ -209,3 +209,8 @@ static void __attribute__((__constructor__)) monitor_init_qmp_commands(void)
qmp_marshal_qmp_capabilities,
QCO_ALLOW_PRECONFIG, 0);
}
void qmp_dirtyring(Error **errp)
{
printf("Hello, world!\n");
}