[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/32] target/i386/kvm: Improve KVM_EXIT_NOTIFY warnings
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 06/32] target/i386/kvm: Improve KVM_EXIT_NOTIFY warnings |
Date: |
Tue, 4 Jun 2024 11:55:42 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20240412073346.458116-28-richard.henderson@linaro.org>
[PMD: Fixed typo reported by Peter Maydell]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/i386/kvm/kvm.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 6c864e4611..82ebddada1 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -5329,7 +5329,6 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run
*run)
uint64_t code;
int ret;
bool ctx_invalid;
- char str[256];
KVMState *state;
switch (run->exit_reason) {
@@ -5389,15 +5388,15 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run
*run)
case KVM_EXIT_NOTIFY:
ctx_invalid = !!(run->notify.flags & KVM_NOTIFY_CONTEXT_INVALID);
state = KVM_STATE(current_accel());
- sprintf(str, "Encounter a notify exit with %svalid context in"
- " guest. There can be possible misbehaves in guest."
- " Please have a look.", ctx_invalid ? "in" : "");
if (ctx_invalid ||
state->notify_vmexit == NOTIFY_VMEXIT_OPTION_INTERNAL_ERROR) {
- warn_report("KVM internal error: %s", str);
+ warn_report("KVM internal error: Encountered a notify exit "
+ "with invalid context in guest.");
ret = -1;
} else {
- warn_report_once("KVM: %s", str);
+ warn_report_once("KVM: Encountered a notify exit with valid "
+ "context in guest. "
+ "The guest could be misbehaving.");
ret = 0;
}
break;
--
2.41.0
- [PULL 00/32] Misc HW / accel patches, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 01/32] target/riscv: Remove unused 'instmap.h' header in translate.c, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 02/32] target/riscv: Restrict 'rv128' machine to TCG accelerator, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 03/32] target/riscv: Restrict riscv_cpu_do_interrupt() to sysemu, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 04/32] target/mips: Remove unused 'hw/misc/mips_itu.h' header, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 05/32] target/arm: Replace sprintf() by snprintf(), Philippe Mathieu-Daudé, 2024/06/04
- [PULL 06/32] target/i386/kvm: Improve KVM_EXIT_NOTIFY warnings,
Philippe Mathieu-Daudé <=
- [PULL 07/32] disas/m68k: Replace sprintf() by snprintf(), Philippe Mathieu-Daudé, 2024/06/04
- [PULL 08/32] disas/microblaze: Replace sprintf() by snprintf(), Philippe Mathieu-Daudé, 2024/06/04
- [PULL 09/32] util/hexdump: Remove b parameter from qemu_hexdump_line, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 10/32] util/hexdump: Remove ascii parameter from qemu_hexdump_line, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 11/32] MAINTAINERS: drop usb maintainership, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 12/32] system/runstate: Remove unused 'qemu/plugin.h' header, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 13/32] accel/tcg: Move common declarations to 'internal-common.h', Philippe Mathieu-Daudé, 2024/06/04
- [PULL 14/32] accel/kvm: Fix two lines with hard-coded tabs, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 15/32] hw/core: expand on the alignment of CPUState, Philippe Mathieu-Daudé, 2024/06/04
- [PULL 16/32] cpu: move Qemu[Thread|Cond] setup into common code, Philippe Mathieu-Daudé, 2024/06/04