Commit 314801b9 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

x86: cpu -- Drop feature bypassing

We fully support xsaves, so no need for noxsaves temporary
option anymore.

This reverts commit ba93feb5f0f017f2ee498f6ee2db58bcaf817501.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: 's avatarDmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent bcdbe22a
......@@ -38,8 +38,3 @@ int cpuinfo_check(void)
{
return -ENOTSUP;
}
int cpu_parse_option(const char *opt)
{
return -ENOTSUP;
}
......@@ -38,8 +38,3 @@ int cpuinfo_check(void)
{
return -ENOTSUP;
}
int cpu_parse_option(const char *opt)
{
return -ENOTSUP;
}
......@@ -140,8 +140,3 @@ int cpuinfo_check(void)
return 0;
}
int cpu_parse_option(const char *opt)
{
return -1;
}
......@@ -156,8 +156,3 @@ int cpuinfo_check(void)
return 1;
return 0;
}
int cpu_parse_option(const char *opt)
{
return -1;
}
......@@ -438,27 +438,3 @@ int cpuinfo_check(void)
return 0;
}
int cpu_parse_option(const char *opt)
{
static struct {
const char *name;
unsigned int feature;
} filters[] = {
{
.name = "noxsaves",
.feature = X86_FEATURE_XSAVES,
},
};
size_t i;
for (i = 0; i < ARRAY_SIZE(filters); i++) {
if (strncmp(opt, filters[i].name, strlen(filters[i].name)))
continue;
compel_cpu_clear_feature(filters[i].feature);
return strlen(filters[i].name);
}
return -1;
}
......@@ -152,11 +152,6 @@ static int parse_cpu_cap(struct cr_options *opts, const char *optarg)
} else if (!strncmp(optarg, "ins", 3)) {
____cpu_set_cap(opts, CPU_CAP_INS, inverse);
optarg += 3;
} else if (!strncmp(optarg, "op=", 3)) {
int pos = cpu_parse_option(&optarg[3]);
if (pos <= 0)
goto Esyntax;
optarg += pos + 3;
} else
goto Esyntax;
}
......
......@@ -8,6 +8,5 @@ extern int cpu_dump_cpuinfo(void);
extern int cpu_validate_cpuinfo(void);
extern int cpuinfo_dump(void);
extern int cpuinfo_check(void);
extern int cpu_parse_option(const char *opt);
#endif /* __CR_CPU_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment