The hint was introduced a long time ago when broken TSX implementation
was found in Haswell and Broadwell CPUs. Since then many more CPUs with
TSX were introduced and and disabled due to TAA vulnerability.
Thus the hint is not very useful and I think removing it is a better
choice then updating it to cover all current noTSX models.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu/cpu_x86.c | 42 ++++++------------------------------------
1 file changed, 6 insertions(+), 36 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index ce15bb0454..eeb16c2763 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -1937,7 +1937,6 @@ virCPUx86Compare(virCPUDefPtr host,
bool failIncompatible)
{
virCPUCompareResult ret = VIR_CPU_COMPARE_ERROR;
- virCPUx86MapPtr map;
virCPUx86ModelPtr model = NULL;
char *message = NULL;
@@ -1954,41 +1953,12 @@ virCPUx86Compare(virCPUDefPtr host,
ret = x86Compute(host, cpu, NULL, &message);
- if (ret == VIR_CPU_COMPARE_INCOMPATIBLE) {
- bool noTSX = false;
-
- if (STREQ_NULLABLE(cpu->model, "Haswell") ||
- STREQ_NULLABLE(cpu->model, "Broadwell")) {
- if (!(map = virCPUx86GetMap()))
- goto cleanup;
-
- if (!(model = x86ModelFromCPU(cpu, map, -1)))
- goto cleanup;
-
- noTSX = !x86FeatureInData("hle", &model->data, map) ||
- !x86FeatureInData("rtm", &model->data, map);
- }
-
- if (failIncompatible) {
- ret = VIR_CPU_COMPARE_ERROR;
- if (message) {
- if (noTSX) {
- virReportError(VIR_ERR_CPU_INCOMPATIBLE,
- _("%s; try using '%s-noTSX' CPU
model"),
- message, cpu->model);
- } else {
- virReportError(VIR_ERR_CPU_INCOMPATIBLE, "%s", message);
- }
- } else {
- if (noTSX) {
- virReportError(VIR_ERR_CPU_INCOMPATIBLE,
- _("try using '%s-noTSX' CPU
model"),
- cpu->model);
- } else {
- virReportError(VIR_ERR_CPU_INCOMPATIBLE, NULL);
- }
- }
- }
+ if (ret == VIR_CPU_COMPARE_INCOMPATIBLE && failIncompatible) {
+ ret = VIR_CPU_COMPARE_ERROR;
+ if (message)
+ virReportError(VIR_ERR_CPU_INCOMPATIBLE, "%s", message);
+ else
+ virReportError(VIR_ERR_CPU_INCOMPATIBLE, NULL);
}
cleanup:
--
2.26.0