[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 1/6] target/i386: Check kvm_hyperv_expand_features() return va
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v5 1/6] target/i386: Check kvm_hyperv_expand_features() return value |
Date: |
Wed, 13 Sep 2023 11:30:03 +0200 |
In case more code is added after the kvm_hyperv_expand_features()
call, check its return value (since it can fail).
Fixes: 071ce4b03b ("i386: expand Hyper-V features during CPU feature expansion
time")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 24ee67b42d..bd6a932d08 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -7121,8 +7121,8 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
env->cpuid_xlevel2 = env->cpuid_min_xlevel2;
}
- if (kvm_enabled()) {
- kvm_hyperv_expand_features(cpu, errp);
+ if (kvm_enabled() && !kvm_hyperv_expand_features(cpu, errp)) {
+ return;
}
}
--
2.41.0
- [PATCH v5 0/6] target/i386: Restrict system-specific features from user emulation, Philippe Mathieu-Daudé, 2023/09/13
- [PATCH v5 1/6] target/i386: Check kvm_hyperv_expand_features() return value,
Philippe Mathieu-Daudé <=
- [PATCH v5 2/6] target/i386: Drop accel_uses_host_cpuid before x86_cpu_get_supported_cpuid, Philippe Mathieu-Daudé, 2023/09/13
- [PATCH v5 3/6] target/i386: Call accel-agnostic x86_cpu_get_supported_cpuid(), Philippe Mathieu-Daudé, 2023/09/13
- [PATCH v5 4/6] target/i386: Move x86_cpu_get_migratable_flags() around, Philippe Mathieu-Daudé, 2023/09/13
- [RFC PATCH v5 5/6] target/i386: Restrict system-specific code from user emulation, Philippe Mathieu-Daudé, 2023/09/13
- [PATCH v5 6/6] target/i386: Prohibit target specific KVM prototypes on user emulation, Philippe Mathieu-Daudé, 2023/09/13
- Re: [PATCH v5 0/6] target/i386: Restrict system-specific features from user emulation, Paolo Bonzini, 2023/09/13