Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-25 Thread Gavin Shan
Hi Marc, On 9/25/22 4:57 AM, Marc Zyngier wrote: On Sat, 24 Sep 2022 14:22:32 +0100, Peter Xu wrote: On Sat, Sep 24, 2022 at 12:26:53PM +0100, Marc Zyngier wrote: On Sat, 24 Sep 2022 09:51:39 +0100, Marc Zyngier wrote: I'm happy to bikeshed, but please spell it out for me. If we follow

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-24 Thread Marc Zyngier
On Sat, 24 Sep 2022 14:22:32 +0100, Peter Xu wrote: > > On Sat, Sep 24, 2022 at 12:26:53PM +0100, Marc Zyngier wrote: > > On Sat, 24 Sep 2022 09:51:39 +0100, > > Marc Zyngier wrote: > > > > > > I'm happy to bikeshed, but please spell it out for me. If we follow > > > the current scheme, we

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-24 Thread Peter Xu
On Sat, Sep 24, 2022 at 12:26:53PM +0100, Marc Zyngier wrote: > On Sat, 24 Sep 2022 09:51:39 +0100, > Marc Zyngier wrote: > > > > On Fri, 23 Sep 2022 19:26:18 +0100, > > Peter Xu wrote: > > > > > > On Fri, Sep 23, 2022 at 03:28:34PM +0100, Marc Zyngier wrote: > > > > On Thu, 22 Sep 2022

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-24 Thread Marc Zyngier
On Sat, 24 Sep 2022 09:51:39 +0100, Marc Zyngier wrote: > > On Fri, 23 Sep 2022 19:26:18 +0100, > Peter Xu wrote: > > > > On Fri, Sep 23, 2022 at 03:28:34PM +0100, Marc Zyngier wrote: > > > On Thu, 22 Sep 2022 22:48:19 +0100, > > > Peter Xu wrote: > > > > > > > > On Thu, Sep 22, 2022 at

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-24 Thread Marc Zyngier
On Fri, 23 Sep 2022 19:26:18 +0100, Peter Xu wrote: > > On Fri, Sep 23, 2022 at 03:28:34PM +0100, Marc Zyngier wrote: > > On Thu, 22 Sep 2022 22:48:19 +0100, > > Peter Xu wrote: > > > > > > On Thu, Sep 22, 2022 at 06:01:29PM +0100, Marc Zyngier wrote: > > > > In order to differenciate between

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-23 Thread Peter Xu
On Fri, Sep 23, 2022 at 11:23:24PM +0200, Paolo Bonzini wrote: > Il ven 23 set 2022, 20:26 Peter Xu ha scritto: > > > > > Someone will show up with an old userspace which probes for the sole > > > existing capability, and things start failing subtly. It is quite > > > likely that the userspace

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-23 Thread Paolo Bonzini
Il ven 23 set 2022, 20:26 Peter Xu ha scritto: > > > Someone will show up with an old userspace which probes for the sole > > existing capability, and things start failing subtly. It is quite > > likely that the userspace code is built for all architectures, > > I didn't quite follow here. Since

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-23 Thread Peter Xu
On Fri, Sep 23, 2022 at 03:28:34PM +0100, Marc Zyngier wrote: > On Thu, 22 Sep 2022 22:48:19 +0100, > Peter Xu wrote: > > > > On Thu, Sep 22, 2022 at 06:01:29PM +0100, Marc Zyngier wrote: > > > In order to differenciate between architectures that require no extra > > > synchronisation when

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-23 Thread Marc Zyngier
On Thu, 22 Sep 2022 22:48:19 +0100, Peter Xu wrote: > > On Thu, Sep 22, 2022 at 06:01:29PM +0100, Marc Zyngier wrote: > > In order to differenciate between architectures that require no extra > > synchronisation when accessing the dirty ring and those who do, > > add a new capability

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-22 Thread Gavin Shan
Hi Peter and Marc, On 9/23/22 7:48 AM, Peter Xu wrote: On Thu, Sep 22, 2022 at 06:01:29PM +0100, Marc Zyngier wrote: In order to differenciate between architectures that require no extra synchronisation when accessing the dirty ring and those who do, add a new capability

Re: [PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 06:01:29PM +0100, Marc Zyngier wrote: > In order to differenciate between architectures that require no extra > synchronisation when accessing the dirty ring and those who do, > add a new capability (KVM_CAP_DIRTY_LOG_RING_ORDERED) that identify > the latter sort. TSO

[PATCH 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ORDERED capability and config option

2022-09-22 Thread Marc Zyngier
In order to differenciate between architectures that require no extra synchronisation when accessing the dirty ring and those who do, add a new capability (KVM_CAP_DIRTY_LOG_RING_ORDERED) that identify the latter sort. TSO architectures can obviously advertise both, while relaxed architectures