From ff559b80d05fe7a73d132b83f29608761c3e015c Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 28 Jun 2016 11:50:50 +0200 Subject: [PATCH] cpu: Report error for unknown features in x86HasFeature Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 904b59ce95..d0e1a1a77d 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -2653,8 +2653,11 @@ x86HasFeature(const virCPUData *data, return -1; if (!(feature = x86FeatureFind(map, name)) && - !(feature = x86FeatureFindInternal(name))) + !(feature = x86FeatureFindInternal(name))) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("unknown CPU feature %s"), name); goto cleanup; + } ret = x86DataIsSubset(&data->data.x86, &feature->data) ? 1 : 0;