[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c65c129c-a4c7-c621-8446-521f985d0550@amd.com>
Date: Mon, 21 Apr 2025 16:51:46 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: roy.hopkins@...e.com, seanjc@...gle.com, ashish.kalra@....com,
michael.roth@....com, jroedel@...e.de, nsaenz@...zon.com, anelkz@...zon.de,
James.Bottomley@...senPartnership.com
Subject: Re: [PATCH 12/29] KVM: share dirty ring for same vCPU id on different
planes
On 4/1/25 11:10, Paolo Bonzini wrote:
> The dirty page ring is read by mmap()-ing the vCPU file descriptor,
> which is only possible for plane 0. This is not a problem because it
> is only filled by KVM_RUN which takes the plane-0 vCPU mutex, and it is
> therefore possible to share it for vCPUs that have the same id but are
> on different planes. (TODO: double check).
>
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
> ---
> include/linux/kvm_host.h | 6 ++++--
> virt/kvm/dirty_ring.c | 5 +++--
> virt/kvm/kvm_main.c | 10 +++++-----
> 3 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index d2e0c0e8ff17..b511aed2de8e 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -394,9 +394,11 @@ struct kvm_vcpu {
> bool scheduled_out;
> struct kvm_vcpu_arch arch;
> struct kvm_vcpu_stat *stat;
> - struct kvm_vcpu_stat __stat;
> char stats_id[KVM_STATS_NAME_SIZE];
> - struct kvm_dirty_ring dirty_ring;
> + struct kvm_dirty_ring *dirty_ring;
Looks like the setting of dirty_ring is missing in the patch.
Thanks,
Tom
> +
> + struct kvm_vcpu_stat __stat;
Powered by blists - more mailing lists