From: Gavin Shan <gshan@redhat.com>
To: Marc Zyngier <maz@kernel.org>,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Cc: will@kernel.org, catalin.marinas@arm.com, andrew.jones@linux.dev,
shan.gavin@gmail.com, bgardon@google.com, dmatlack@google.com,
pbonzini@redhat.com, zhenyzha@redhat.com, shuah@kernel.org
Subject: Re: [PATCH v2 0/6] KVM: Fix dirty-ring ordering on weakly ordered architectures
Date: Tue, 27 Sep 2022 10:58:07 +1000 [thread overview]
Message-ID: <30b5f5e0-1b27-e218-c01f-ca3177d14998@redhat.com> (raw)
In-Reply-To: <20220926145120.27974-1-maz@kernel.org>
On 9/27/22 12:51 AM, Marc Zyngier wrote:
> [Same distribution list as Gavin's dirty-ring on arm64 series]
>
> This is an update on the initial series posted as [0].
>
> As Gavin started posting patches enabling the dirty-ring infrastructure
> on arm64 [1], it quickly became apparent that the API was never intended
> to work on relaxed memory ordering architectures (owing to its x86
> origins).
>
> This series tries to retrofit some ordering into the existing API by:
>
> - relying on acquire/release semantics which are the default on x86,
> but need to be explicit on arm64
>
> - adding a new capability that indicate which flavor is supported, either
> with explicit ordering (arm64) or both implicit and explicit (x86),
> as suggested by Paolo at KVM Forum
>
> - documenting the requirements for this new capability on weakly ordered
> architectures
>
> - updating the selftests to do the right thing
>
> Ideally, this series should be a prefix of Gavin's, plus a small change
> to his series:
>
> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
> index 0309b2d0f2da..7785379c5048 100644
> --- a/arch/arm64/kvm/Kconfig
> +++ b/arch/arm64/kvm/Kconfig
> @@ -32,7 +32,7 @@ menuconfig KVM
> select KVM_VFIO
> select HAVE_KVM_EVENTFD
> select HAVE_KVM_IRQFD
> - select HAVE_KVM_DIRTY_RING
> + select HAVE_KVM_DIRTY_RING_ACQ_REL
> select HAVE_KVM_MSI
> select HAVE_KVM_IRQCHIP
> select HAVE_KVM_IRQ_ROUTING
>
> This has been very lightly tested on an arm64 box with Gavin's v3 [2] series.
>
> * From v1:
> - Repainted the config symbols and new capability so that their
> naming is more acceptable and causes less churn
> - Fixed a couple of blunders as pointed out by Peter and Paolo
> - Updated the documentation
>
> [0] https://lore.kernel.org/r/20220922170133.2617189-1-maz@kernel.org
> [1] https://lore.kernel.org/lkml/YyiV%2Fl7O23aw5aaO@xz-m1.local/T/
> [2] https://lore.kernel.org/r/20220922003214.276736-1-gshan@redhat.com
>
> Marc Zyngier (6):
> KVM: Use acquire/release semantics when accessing dirty ring GFN state
> KVM: Add KVM_CAP_DIRTY_LOG_RING_ACQ_REL capability and config option
> KVM: x86: Select CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL
> KVM: Document weakly ordered architecture requirements for dirty ring
> KVM: selftests: dirty-log: Upgrade flag accesses to acquire/release
> semantics
> KVM: selftests: dirty-log: Use KVM_CAP_DIRTY_LOG_RING_ACQ_REL if
> available
>
> Documentation/virt/kvm/api.rst | 17 +++++++++++++++--
> arch/x86/kvm/Kconfig | 3 ++-
> include/uapi/linux/kvm.h | 1 +
> tools/testing/selftests/kvm/dirty_log_test.c | 8 +++++---
> tools/testing/selftests/kvm/lib/kvm_util.c | 5 ++++-
> virt/kvm/Kconfig | 14 ++++++++++++++
> virt/kvm/dirty_ring.c | 4 ++--
> virt/kvm/kvm_main.c | 9 ++++++++-
> 8 files changed, 51 insertions(+), 10 deletions(-)
>
This series looks good to me.
Reviewed-by: Gavin Shan <gshan@redhat.com>
Thanks,
Gavin
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2022-09-27 0:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 14:51 [PATCH v2 0/6] KVM: Fix dirty-ring ordering on weakly ordered architectures Marc Zyngier
2022-09-26 14:51 ` [PATCH v2 1/6] KVM: Use acquire/release semantics when accessing dirty ring GFN state Marc Zyngier
2022-09-26 14:51 ` [PATCH v2 2/6] KVM: Add KVM_CAP_DIRTY_LOG_RING_ACQ_REL capability and config option Marc Zyngier
2022-09-26 14:51 ` [PATCH v2 3/6] KVM: x86: Select CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL Marc Zyngier
2022-09-26 14:51 ` [PATCH v2 4/6] KVM: Document weakly ordered architecture requirements for dirty ring Marc Zyngier
2022-09-26 14:51 ` [PATCH v2 5/6] KVM: selftests: dirty-log: Upgrade flag accesses to acquire/release semantics Marc Zyngier
2022-09-26 14:51 ` [PATCH v2 6/6] KVM: selftests: dirty-log: Use KVM_CAP_DIRTY_LOG_RING_ACQ_REL if available Marc Zyngier
2022-09-27 0:58 ` Gavin Shan [this message]
2022-09-27 15:54 ` [PATCH v2 0/6] KVM: Fix dirty-ring ordering on weakly ordered architectures Peter Xu
2022-09-29 9:58 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30b5f5e0-1b27-e218-c01f-ca3177d14998@redhat.com \
--to=gshan@redhat.com \
--cc=andrew.jones@linux.dev \
--cc=bgardon@google.com \
--cc=catalin.marinas@arm.com \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=maz@kernel.org \
--cc=pbonzini@redhat.com \
--cc=shan.gavin@gmail.com \
--cc=shuah@kernel.org \
--cc=will@kernel.org \
--cc=zhenyzha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).