x-consistent-cache property is a compatibility option that defaults to
"true". For old machines, it is set to "false" to maintain the (legacy)
inconsistent cache model for Intel CPUs.
In fact, such wrong and inconsistent cache model should be treated as
buggy "hardware", so that there is no valid use case for users to
manually disable this property.
Therefore, mark it as internal-only via OBJ_PROP_FLAG_INTERNAL flag,
and prohibit all external settings.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
target/i386/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 3766d453157b..c2f99b98014a 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -10541,7 +10541,8 @@ static const Property x86_cpu_properties[] = {
* own cache information (see x86_cpu_load_def()).
*/
DEFINE_PROP_BOOL("legacy-cache", X86CPU, legacy_cache, true),
- DEFINE_PROP_BOOL("x-consistent-cache", X86CPU, consistent_cache, true),
+ DEFINE_PROP_BOOL("x-consistent-cache", X86CPU, consistent_cache, true,
+ .flags = OBJ_PROP_FLAG_INTERNAL),
DEFINE_PROP_BOOL("legacy-multi-node", X86CPU, legacy_multi_node, false),
DEFINE_PROP_BOOL("xen-vapic", X86CPU, xen_vapic, false),
--
2.34.1