All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Ricardo Koller <ricarkol@google.com>
Cc: kvm@vger.kernel.org, andrew.jones@linux.dev, maz@kernel.org,
	bgardon@google.com, pbonzini@redhat.com,
	axelrasmussen@google.com, kvmarm@lists.cs.columbia.edu,
	dmatlack@google.com
Subject: Re: [PATCH v6 01/13] KVM: selftests: Add a userfaultfd library
Date: Sat, 17 Sep 2022 22:14:31 +0000	[thread overview]
Message-ID: <YyZGx3qMvG71c1y/@google.com> (raw)
In-Reply-To: <20220906180930.230218-2-ricarkol@google.com>

Hi Ricardo,

On Tue, Sep 06, 2022 at 06:09:18PM +0000, Ricardo Koller wrote:
> Move the generic userfaultfd code out of demand_paging_test.c into a
> common library, userfaultfd_util. This library consists of a setup and a
> stop function. The setup function starts a thread for handling page
> faults using the handler callback function. This setup returns a
> uffd_desc object which is then used in the stop function (to wait and
> destroy the threads).
> 
> Reviewed-by: Ben Gardon <bgardon@google.com>
> Signed-off-by: Ricardo Koller <ricarkol@google.com>
> ---

[...]

> diff --git a/tools/testing/selftests/kvm/include/userfaultfd_util.h b/tools/testing/selftests/kvm/include/userfaultfd_util.h
> new file mode 100644
> index 000000000000..a1a386c083b0
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/include/userfaultfd_util.h
> @@ -0,0 +1,46 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * KVM userfaultfd util
> + * Adapted from demand_paging_test.c

nit: Don't reference demand_paging_test.c, as it won't make sense unless
the reader also looks at this diff.

> + *
> + * Copyright (C) 2018, Red Hat, Inc.
> + * Copyright (C) 2019-2022 Google LLC
> + */

[...]

> diff --git a/tools/testing/selftests/kvm/lib/userfaultfd_util.c b/tools/testing/selftests/kvm/lib/userfaultfd_util.c
> new file mode 100644
> index 000000000000..4395032ccbe4
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/lib/userfaultfd_util.c
> @@ -0,0 +1,187 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * KVM userfaultfd util
> + * Adapted from demand_paging_test.c
> + *
> + * Copyright (C) 2018, Red Hat, Inc.
> + * Copyright (C) 2019, Google, Inc.
> + * Copyright (C) 2022, Google, Inc.

nit: use the same copyrights as the header file.

With that:

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oliver.upton@linux.dev>
To: Ricardo Koller <ricarkol@google.com>
Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
	andrew.jones@linux.dev, pbonzini@redhat.com, maz@kernel.org,
	seanjc@google.com, alexandru.elisei@arm.com,
	eric.auger@redhat.com, reijiw@google.com, rananta@google.com,
	bgardon@google.com, dmatlack@google.com,
	axelrasmussen@google.com
Subject: Re: [PATCH v6 01/13] KVM: selftests: Add a userfaultfd library
Date: Sat, 17 Sep 2022 22:14:31 +0000	[thread overview]
Message-ID: <YyZGx3qMvG71c1y/@google.com> (raw)
In-Reply-To: <20220906180930.230218-2-ricarkol@google.com>

Hi Ricardo,

On Tue, Sep 06, 2022 at 06:09:18PM +0000, Ricardo Koller wrote:
> Move the generic userfaultfd code out of demand_paging_test.c into a
> common library, userfaultfd_util. This library consists of a setup and a
> stop function. The setup function starts a thread for handling page
> faults using the handler callback function. This setup returns a
> uffd_desc object which is then used in the stop function (to wait and
> destroy the threads).
> 
> Reviewed-by: Ben Gardon <bgardon@google.com>
> Signed-off-by: Ricardo Koller <ricarkol@google.com>
> ---

[...]

> diff --git a/tools/testing/selftests/kvm/include/userfaultfd_util.h b/tools/testing/selftests/kvm/include/userfaultfd_util.h
> new file mode 100644
> index 000000000000..a1a386c083b0
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/include/userfaultfd_util.h
> @@ -0,0 +1,46 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * KVM userfaultfd util
> + * Adapted from demand_paging_test.c

nit: Don't reference demand_paging_test.c, as it won't make sense unless
the reader also looks at this diff.

> + *
> + * Copyright (C) 2018, Red Hat, Inc.
> + * Copyright (C) 2019-2022 Google LLC
> + */

[...]

> diff --git a/tools/testing/selftests/kvm/lib/userfaultfd_util.c b/tools/testing/selftests/kvm/lib/userfaultfd_util.c
> new file mode 100644
> index 000000000000..4395032ccbe4
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/lib/userfaultfd_util.c
> @@ -0,0 +1,187 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * KVM userfaultfd util
> + * Adapted from demand_paging_test.c
> + *
> + * Copyright (C) 2018, Red Hat, Inc.
> + * Copyright (C) 2019, Google, Inc.
> + * Copyright (C) 2022, Google, Inc.

nit: use the same copyrights as the header file.

With that:

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>

  reply	other threads:[~2022-09-17 22:14 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 18:09 [PATCH v6 00/13] KVM: selftests: Add aarch64/page_fault_test Ricardo Koller
2022-09-06 18:09 ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 01/13] KVM: selftests: Add a userfaultfd library Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-17 22:14   ` Oliver Upton [this message]
2022-09-17 22:14     ` Oliver Upton
2022-09-06 18:09 ` [PATCH v6 02/13] KVM: selftests: aarch64: Add virt_get_pte_hva() library function Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-17 22:15   ` Oliver Upton
2022-09-17 22:15     ` Oliver Upton
2022-09-06 18:09 ` [PATCH v6 03/13] KVM: selftests: Add missing close and munmap in __vm_mem_region_delete() Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 04/13] KVM: selftests: aarch64: Construct DEFAULT_MAIR_EL1 using sysreg.h macros Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 05/13] tools: Copy bitfield.h from the kernel sources Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 06/13] KVM: selftests: Stash backing_src_type in struct userspace_mem_region Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-17 22:17   ` Oliver Upton
2022-09-17 22:17     ` Oliver Upton
2022-09-06 18:09 ` [PATCH v6 07/13] KVM: selftests: Change ____vm_create() to take struct kvm_vm_mem_params Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-19  6:42   ` Andrew Jones
2022-09-19  6:42     ` Andrew Jones
2022-09-19 16:28   ` Sean Christopherson
2022-09-19 16:28     ` Sean Christopherson
2022-09-19 19:21     ` Ricardo Koller
2022-09-19 19:21       ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 08/13] KVM: selftests: Use the right memslot for code, page-tables, and data allocations Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-19  6:42   ` Andrew Jones
2022-09-19  6:42     ` Andrew Jones
2022-09-06 18:09 ` [PATCH v6 09/13] KVM: selftests: aarch64: Add aarch64/page_fault_test Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-17 21:58   ` Oliver Upton
2022-09-17 21:58     ` Oliver Upton
2022-09-19 19:29     ` Ricardo Koller
2022-09-19 19:29       ` Ricardo Koller
2022-09-19 20:01       ` Sean Christopherson
2022-09-19 20:01         ` Sean Christopherson
2022-09-06 18:09 ` [PATCH v6 10/13] KVM: selftests: aarch64: Add userfaultfd tests into page_fault_test Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 11/13] KVM: selftests: aarch64: Add dirty logging " Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 12/13] KVM: selftests: aarch64: Add readonly memslot " Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-06 18:09 ` [PATCH v6 13/13] KVM: selftests: aarch64: Add mix of " Ricardo Koller
2022-09-06 18:09   ` Ricardo Koller
2022-09-19 10:38 ` [PATCH v6 00/13] KVM: selftests: Add aarch64/page_fault_test Marc Zyngier
2022-09-19 10:38   ` Marc Zyngier
2022-09-19 16:38   ` Sean Christopherson
2022-09-19 16:38     ` Sean Christopherson
2022-09-19 16:57     ` Marc Zyngier
2022-09-19 16:57       ` Marc Zyngier
2022-09-19 18:28       ` Ricardo Koller
2022-09-19 18:28         ` Ricardo Koller
2022-09-20  4:14 Ricardo Koller
2022-09-20  4:14 ` [PATCH v6 01/13] KVM: selftests: Add a userfaultfd library Ricardo Koller
2022-09-20  4:14   ` Ricardo Koller

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=YyZGx3qMvG71c1y/@google.com \
    --to=oliver.upton@linux.dev \
    --cc=andrew.jones@linux.dev \
    --cc=axelrasmussen@google.com \
    --cc=bgardon@google.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=ricarkol@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.