Re: [PATCH v5 09/10] KVM: Disable manual dirty log when dirty ring enabled

2021-03-22 Thread Peter Xu
On Mon, Mar 22, 2021 at 02:55:44PM +0100, Paolo Bonzini wrote: > On 22/03/21 10:17, Keqian Zhu wrote: > > Hi Peter, > > > > On 2021/3/11 4:33, Peter Xu wrote: > > > KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is for KVM_CLEAR_DIRTY_LOG, which is > > > only > > > useful for KVM_GET_DIRTY_LOG. Skip enabling

Re: [PATCH v5 09/10] KVM: Disable manual dirty log when dirty ring enabled

2021-03-22 Thread Paolo Bonzini
On 22/03/21 10:17, Keqian Zhu wrote: Hi Peter, On 2021/3/11 4:33, Peter Xu wrote: KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is for KVM_CLEAR_DIRTY_LOG, which is only useful for KVM_GET_DIRTY_LOG. Skip enabling it for kvm dirty ring. More importantly, KVM_DIRTY_LOG_INITIALLY_SET will not wr-protect al

Re: [PATCH v5 09/10] KVM: Disable manual dirty log when dirty ring enabled

2021-03-22 Thread Keqian Zhu
Hi Peter, On 2021/3/11 4:33, Peter Xu wrote: > KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is for KVM_CLEAR_DIRTY_LOG, which is only > useful for KVM_GET_DIRTY_LOG. Skip enabling it for kvm dirty ring. > > More importantly, KVM_DIRTY_LOG_INITIALLY_SET will not wr-protect all the > pages > initially, whic

[PATCH v5 09/10] KVM: Disable manual dirty log when dirty ring enabled

2021-03-10 Thread Peter Xu
KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is for KVM_CLEAR_DIRTY_LOG, which is only useful for KVM_GET_DIRTY_LOG. Skip enabling it for kvm dirty ring. More importantly, KVM_DIRTY_LOG_INITIALLY_SET will not wr-protect all the pages initially, which is against how kvm dirty ring is used - there's no way fo