diff options
author | Sean Christopherson <seanjc@google.com> | 2025-01-10 16:29:55 -0800 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2025-02-12 09:00:55 -0800 |
commit | 9a91f6542435ad94cbb8e5b64ca3d4cc31d3c12a (patch) | |
tree | 4d8f5b422db9f3397fadad87585c97a964df99ca /tools/perf/scripts/python/task-analyzer.py | |
parent | 0a818b3541af09ddaf412d125dc7315fc448851e (diff) |
KVM: selftests: Post to sem_vcpu_stop if and only if vcpu_stop is true
When running dirty_log_test using the dirty ring, post to sem_vcpu_stop
only when the main thread has explicitly requested that the vCPU stop.
Synchronizing the vCPU and main thread whenever the dirty ring happens to
be full is unnecessary, as KVM's ABI is to actively prevent the vCPU from
running until the ring is no longer full. I.e. attempting to run the vCPU
will simply result in KVM_EXIT_DIRTY_RING_FULL without ever entering the
guest. And if KVM doesn't exit, e.g. let's the vCPU dirty more pages,
then that's a KVM bug worth finding.
Posting to sem_vcpu_stop on ring full also makes it difficult to get the
test logic right, e.g. it's easy to let the vCPU keep running when it
shouldn't, as a ring full can essentially happen at any given time.
Opportunistically rework the handling of dirty_ring_vcpu_ring_full to
leave it set for the remainder of the iteration in order to simplify the
surrounding logic.
Link: https://lore.kernel.org/r/20250111003004.1235645-12-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions