Re: [PATCH 12/29] KVM: share dirty ring for same vCPU id on different planes

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

 



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@xxxxxxxxxx>
> ---
>  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;




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux