qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 2/2] i386: Add notify VM exit support


From: Xiaoyao Li
Subject: Re: [PATCH v6 2/2] i386: Add notify VM exit support
Date: Mon, 19 Sep 2022 14:11:24 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.13.0

On 9/19/2022 1:46 PM, Chenyi Qiang wrote:
Not sure some warning would be also useful here, but I really don't know
the whole context so I can't tell whether there can easily be false
positives to pollute qemu log.


The false positive case is not easy to happen unless some potential issues in silicon. But in case of it, to avoid polluting qemu log, how about:

diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index ae7fb2c495..8f97133cbf 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -5213,6 +5213,7 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
          break;
      case KVM_EXIT_NOTIFY:
          ret = 0;
+        warn_report_once("KVM: notify window was exceeded in guest");
          if (run->notify.flags & KVM_NOTIFY_CONTEXT_INVALID) {
              warn_report("KVM: invalid context due to notify vmexit");
              if (has_triple_fault_event) {

how about this

    case KVM_EXIT_NOTIFY:
        bool ctx_invalid = run->notify.flags & KVM_NOTIFY_CONTEXT_INVALID;
        ret = 0;
        warn_report_once("KVM: Encounter notify exit with %svalid context",
                         ctx_invalid ? "in" : "");

        if (ctx_invalid) {
            ...
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]