| bool_entry "dump_guest_core"
| str_entry "stdio_handler"
| int_entry "max_threads_per_process"
+ | str_entry "sched_core"
let device_entry = bool_entry "mac_filter"
| bool_entry "relaxed_acs_check"
# DO NOT use in production.
#
#deprecation_behavior = "none"
+
+# If this is set then QEMU and its threads will run in a separate scheduling
+# group meaning no other process will share Hyper Threads of a single core with
+# QEMU. Each QEMU has its own group.
+#
+# Possible options are:
+# "none" - (default) neither QEMU or any of its helper processes are placed
+# into separate scheduling group
+# "vcpus" - only QEMU vCPU threads are placed into a separate scheduling group,
+# emulator threads and helper processes remain outside of the group
+# "emulator" - only QEMU and its threads (emulator + vCPUs) are placed into
+# separate scheduling group, helper proccesses remain outside of
+# the group
+# "full" - both QEMU and its helper processes are placed into separate
+# scheduling group
+#sched_core = "none"
#define QEMU_MIGRATION_PORT_MIN 49152
#define QEMU_MIGRATION_PORT_MAX 49215
+VIR_ENUM_IMPL(virQEMUSchedCore,
+ QEMU_SCHED_CORE_LAST,
+ "none",
+ "vcpus",
+ "emulator",
+ "full");
+
+
static virClass *virQEMUDriverConfigClass;
static void virQEMUDriverConfigDispose(void *obj);
g_auto(GStrv) hugetlbfs = NULL;
g_autofree char *stdioHandler = NULL;
g_autofree char *corestr = NULL;
+ g_autofree char *schedCore = NULL;
size_t i;
if (virConfGetValueStringList(conf, "hugetlbfs_mount", true,
}
}
+ if (virConfGetValueString(conf, "sched_core", &schedCore) < 0)
+ return -1;
+ if (schedCore) {
+ int val = virQEMUSchedCoreTypeFromString(schedCore);
+
+ if (val < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Unknown sched_core value %s"),
+ schedCore);
+ return -1;
+ }
+
+ if (val != QEMU_SCHED_CORE_NONE) {
+ int rv = virProcessSchedCoreAvailable();
+
+ if (rv < 0) {
+ virReportSystemError(errno, "%s",
+ _("Unable to detect SCHED_CORE"));
+ return -1;
+ } else if (rv == 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("SCHED_CORE not supported by kernel"));
+ return -1;
+ }
+ }
+
+ cfg->schedCore = val;
+ }
+
return 0;
}
#define QEMU_DRIVER_NAME "QEMU"
+typedef enum {
+ QEMU_SCHED_CORE_NONE = 0,
+ QEMU_SCHED_CORE_VCPUS,
+ QEMU_SCHED_CORE_EMULATOR,
+ QEMU_SCHED_CORE_FULL,
+
+ QEMU_SCHED_CORE_LAST
+} virQEMUSchedCore;
+
+VIR_ENUM_DECL(virQEMUSchedCore);
+
typedef struct _virQEMUDriver virQEMUDriver;
typedef struct _virQEMUDriverConfig virQEMUDriverConfig;
char **capabilityfilters;
char *deprecationBehavior;
+
+ virQEMUSchedCore schedCore;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virQEMUDriverConfig, virObjectUnref);
{ "1" = "capname" }
}
{ "deprecation_behavior" = "none" }
+{ "sched_core" = "none" }