From b199c682f1f0aaee22b2170a5fb885250057eec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 10 Sep 2020 09:01:31 +0200 Subject: target/i386/kvm: Rename host_tsx_blacklisted() as host_tsx_broken() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to use inclusive terminology, rename host_tsx_blacklisted() as host_tsx_broken(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Acked-by: Paolo Bonzini Message-Id: <20200910070131.435543-7-philmd@redhat.com> Signed-off-by: Laurent Vivier --- target/i386/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target') diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 205b68b..3d640a8 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -302,7 +302,7 @@ static int get_para_features(KVMState *s) return features; } -static bool host_tsx_blacklisted(void) +static bool host_tsx_broken(void) { int family, model, stepping;\ char vendor[CPUID_VENDOR_SZ + 1]; @@ -408,7 +408,7 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function, } else if (function == 6 && reg == R_EAX) { ret |= CPUID_6_EAX_ARAT; /* safe to allow because of emulated APIC */ } else if (function == 7 && index == 0 && reg == R_EBX) { - if (host_tsx_blacklisted()) { + if (host_tsx_broken()) { ret &= ~(CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_HLE); } } else if (function == 7 && index == 0 && reg == R_EDX) { -- cgit v1.1 From 8821e21414468b1810f0ccf38bcbfa5c0bd1d56b Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 11 Sep 2020 14:53:01 +0200 Subject: target/i386/kvm: Add missing fallthrough comment Let's make this file compilable with -Werror=implicit-fallthrough : Looking at the code, it seems like the fallthrough is intended here, so we should add the corresponding "/* fallthrough */" comment here. Signed-off-by: Thomas Huth Acked-by: Paolo Bonzini Message-Id: <20200911125301.413081-1-thuth@redhat.com> Signed-off-by: Laurent Vivier --- target/i386/kvm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'target') diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 3d640a8..d87af57 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1568,6 +1568,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (env->nr_dies < 2) { break; } + /* fallthrough */ case 4: case 0xb: case 0xd: -- cgit v1.1