diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-04-12 00:33:46 -0700 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-06-04 10:02:39 +0200 |
commit | a93b4061b0e2ff914be9476d74ca6a4f9a8926a1 (patch) | |
tree | be6ea6e50bd881e5ece443a6a1359b4788c5f494 | |
parent | 2ad9d04492434b9143f52535cfd12aaae1cfd667 (diff) | |
download | qemu-a93b4061b0e2ff914be9476d74ca6a4f9a8926a1.zip qemu-a93b4061b0e2ff914be9476d74ca6a4f9a8926a1.tar.gz qemu-a93b4061b0e2ff914be9476d74ca6a4f9a8926a1.tar.bz2 |
target/i386/kvm: Improve KVM_EXIT_NOTIFY warnings
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>
-rw-r--r-- | target/i386/kvm/kvm.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 6c864e4..82ebdda 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; |