Re: [RFC PATCH v3 05/19] x86: KVMGT: use kvm_page_track_write_tracking_enable

Sean Christopherson
2022-05-19T16:38:40Z

On Wed, Apr 27, 2022, Maxim Levitsky wrote:
> @@ -1948,6 +1949,10 @@ static int kvmgt_guest_init(struct mdev_device *mdev)
> if (__kvmgt_vgpu_exist(vgpu, kvm))
> return -EEXIST;
>
> + ret = kvm_page_track_write_tracking_enable(kvm);
> + if (ret)
> + return ret;

If for some reason my idea to enable tracking during kvm_page_track_register_notifier()
doesn't pan out, it's probably worth adding a comment saying that enabling write
tracking can't be undone.

> +
> info = vzalloc(sizeof(struct kvmgt_guest_info));
> if (!info)
> return -ENOMEM;
> --
> 2.26.3
>