|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v2] kvm: reuse per-vcpu stats fd to avoid vcpu interruption |
Date: | Sun, 18 Jun 2023 23:39:42 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 |
On 6/18/23 01:00, Philippe Mathieu-Daudé wrote:
case STATS_TARGET_VCPU: add_stats_entry(result, STATS_PROVIDER_KVM, - current_cpu->parent_obj.canonical_path, + cpu->parent_obj.canonical_path,Can we get a NULL deref here ...stats_list); break; default:static void query_stats_cb(StatsResultList **result, StatsTarget target, @@ -4180,7 +4180,7 @@ static void query_stats_cb(StatsResultList **result, StatsTarget target,error_setg_errno(errp, errno, "KVM stats: ioctl failed"); return; } - query_stats(result, target, names, stats_fd, errp); + query_stats(result, target, names, stats_fd, NULL, errp);... from here?
No, target is STATS_TARGET_VM here.In the kernel, KVM_GET_STATS_FD could also be improved because it does not need to take vcpu->mutex. However that would not be enough; it would require QEMU changes anyway to remove run_on_cpu. So I'm queuing the patch, thanks!
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |