[libvirt] [PATCH v2 3/9] qemu: Add the capabilitie to detect if the qemu binary have the capability to use bps_max and friends

Michal Privoznik mprivozn at redhat.com
Mon Sep 22 11:38:54 UTC 2014


On 22.09.2014 11:39, Matthias Gatto wrote:
> For virQEMUCapsInitQMPMonitor I didn't find other way to check the
> capability than to check the version, and virQEMUCapsComputeCmdFlags
> is not call when qemu use QMP(or I've miss how to call it).
> I don't understand how i should change this patch, can you explain it
> to me please ?
> 

[please don't top-post on technical lists]

Well, grepping qemu.git I've found this:

blockdev.c:658:    qemu_opt_rename(all_opts, "bps_max", "throttling.bps-total-max");

And then, grepping libvirtd.log shows that qemu does report the throttling.bps-total-max. So I guess the diff that you are looking for is:

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 62a1124..af4e067 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2443,6 +2443,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
     { "spice", "disable-agent-file-xfer", QEMU_CAPS_SPICE_FILE_XFER_DISABLE },
     { "msg", "timestamp", QEMU_CAPS_MSG_TIMESTAMP },
     { "numa", NULL, QEMU_CAPS_NUMA },
+    { "drive", "throttling.bps-total-max", QEMU_CAPS_DRIVE_IOTUNE_MAX},
 };
 
 static int

This means, that 'drive' supports 'throttling.bps-total-max' on the command line. Which brings up interesting question - should we use that instead of "bps_max"?

Michal




More information about the libvir-list mailing list