"scsi-generic",
"scsi-generic.bootindex", /* 145 */
+ "mem-merge",
);
struct _virQEMUCaps {
return 0;
}
+struct virQEMUCapsCommandLineProps {
+ const char *option;
+ const char *param;
+ int flag;
+};
+
+static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
+ { "machine", "mem-merge", QEMU_CAPS_MEM_MERGE },
+};
+
+static int
+virQEMUCapsProbeQMPCommandLine(virQEMUCapsPtr qemuCaps,
+ qemuMonitorPtr mon)
+{
+ int nvalues;
+ char **values;
+ size_t i, j;
+
+ for (i = 0; i < ARRAY_CARDINALITY(virQEMUCapsCommandLine); i++) {
+ if ((nvalues = qemuMonitorGetCommandLineOptionParameters(mon,
+ virQEMUCapsCommandLine[i].option,
+ &values)) < 0)
+ return -1;
+ for (j = 0; j < nvalues; j++) {
+ if (STREQ(virQEMUCapsCommandLine[i].param, values[j])) {
+ virQEMUCapsSet(qemuCaps, virQEMUCapsCommandLine[i].flag);
+ break;
+ }
+ }
+ virStringFreeList(values);
+ }
+
+ return 0;
+}
int virQEMUCapsProbeQMP(virQEMUCapsPtr qemuCaps,
qemuMonitorPtr mon)
goto cleanup;
if (virQEMUCapsProbeQMPTPM(qemuCaps, mon) < 0)
goto cleanup;
+ if (virQEMUCapsProbeQMPCommandLine(qemuCaps, mon) < 0)
+ goto cleanup;
ret = 0;
QEMU_CAPS_VFIO_PCI_BOOTINDEX = 143, /* bootindex param for vfio-pci device */
QEMU_CAPS_DEVICE_SCSI_GENERIC = 144, /* -device scsi-generic */
QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX = 145, /* -device scsi-generic.bootindex */
+ QEMU_CAPS_MEM_MERGE = 146, /* -machine mem-merge */
QEMU_CAPS_LAST, /* this must always be the last item */
};