Skip to content

Commit a93b406

Browse files
rth7680philmd
authored andcommitted
target/i386/kvm: Improve KVM_EXIT_NOTIFY warnings
Signed-off-by: Richard Henderson <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Message-ID: <[email protected]> [PMD: Fixed typo reported by Peter Maydell] Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent 2ad9d04 commit a93b406

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

target/i386/kvm/kvm.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5329,7 +5329,6 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
53295329
uint64_t code;
53305330
int ret;
53315331
bool ctx_invalid;
5332-
char str[256];
53335332
KVMState *state;
53345333

53355334
switch (run->exit_reason) {
@@ -5389,15 +5388,15 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
53895388
case KVM_EXIT_NOTIFY:
53905389
ctx_invalid = !!(run->notify.flags & KVM_NOTIFY_CONTEXT_INVALID);
53915390
state = KVM_STATE(current_accel());
5392-
sprintf(str, "Encounter a notify exit with %svalid context in"
5393-
" guest. There can be possible misbehaves in guest."
5394-
" Please have a look.", ctx_invalid ? "in" : "");
53955391
if (ctx_invalid ||
53965392
state->notify_vmexit == NOTIFY_VMEXIT_OPTION_INTERNAL_ERROR) {
5397-
warn_report("KVM internal error: %s", str);
5393+
warn_report("KVM internal error: Encountered a notify exit "
5394+
"with invalid context in guest.");
53985395
ret = -1;
53995396
} else {
5400-
warn_report_once("KVM: %s", str);
5397+
warn_report_once("KVM: Encountered a notify exit with valid "
5398+
"context in guest. "
5399+
"The guest could be misbehaving.");
54015400
ret = 0;
54025401
}
54035402
break;

0 commit comments

Comments
 (0)