dst->nfeatures = 0;
for (i = 0; i < src->nfeatures; i++) {
- if (filter && !filter(src->features[i].name, opaque))
+ if (filter && !filter(src->features[i].name, src->features[i].policy, opaque))
continue;
n = dst->nfeatures++;
size_t i = 0;
while (i < cpu->nfeatures) {
- if (filter(cpu->features[i].name, opaque)) {
+ if (filter(cpu->features[i].name, cpu->features[i].policy, opaque)) {
i++;
continue;
}
*features = NULL;
for (i = 0; i < cpu->nfeatures; i++) {
- if (filter(cpu->features[i].name, opaque)) {
+ if (filter(cpu->features[i].name, cpu->features[i].policy, opaque)) {
if (virStringListAdd(&list, cpu->features[i].name) < 0)
return -1;
n++;
* Returns true if feature @name should copied, false otherwise.
*/
typedef bool (*virCPUDefFeatureFilter)(const char *name,
+ virCPUFeaturePolicy policy,
void *opaque);
int
}
+static bool
+x86FeatureFilterMigratable(const char *name,
+ virCPUFeaturePolicy policy G_GNUC_UNUSED,
+ void *cpu_map)
+{
+ return x86FeatureIsMigratable(name, cpu_map);
+}
+
+
static virCPUDefPtr
virCPUx86CopyMigratable(virCPUDefPtr cpu)
{
return NULL;
if (virCPUDefCopyModelFilter(copy, cpu, false,
- x86FeatureIsMigratable, map) < 0)
+ x86FeatureFilterMigratable, map) < 0)
goto error;
return copy;
*/
bool
virCPUx86FeatureFilterSelectMSR(const char *name,
+ virCPUFeaturePolicy policy G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED)
{
return virCPUx86FeatureIsMSR(name);
*/
bool
virCPUx86FeatureFilterDropMSR(const char *name,
+ virCPUFeaturePolicy policy G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED)
{
return !virCPUx86FeatureIsMSR(name);
const char *vendor);
bool virCPUx86FeatureFilterSelectMSR(const char *name,
+ virCPUFeaturePolicy policy,
void *opaque);
bool virCPUx86FeatureFilterDropMSR(const char *name,
+ virCPUFeaturePolicy policy,
void *opaque);
*/
bool
virQEMUCapsCPUFilterFeatures(const char *name,
+ virCPUFeaturePolicy policy G_GNUC_UNUSED,
void *opaque)
{
virArch *arch = opaque;
virArch guest);
bool virQEMUCapsCPUFilterFeatures(const char *name,
+ virCPUFeaturePolicy policy,
void *opaque);
const char *