From: Sean Christopherson <seanjc@google.com>
To: Ricardo Koller <ricarkol@google.com>
Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev,
kvmarm@lists.cs.columbia.edu, andrew.jones@linux.dev,
pbonzini@redhat.com, maz@kernel.org, alexandru.elisei@arm.com,
eric.auger@redhat.com, oupton@google.com, reijiw@google.com,
rananta@google.com, bgardon@google.com, dmatlack@google.com,
axelrasmussen@google.com
Subject: Re: [PATCH v9 11/14] KVM: selftests: aarch64: Add userfaultfd tests into page_fault_test
Date: Fri, 14 Oct 2022 21:27:06 +0000 [thread overview]
Message-ID: <Y0nUKhuCJHUaQukj@google.com> (raw)
In-Reply-To: <20221011010628.1734342-12-ricarkol@google.com>
On Tue, Oct 11, 2022, Ricardo Koller wrote:
> /* Returns true to continue the test, and false if it should be skipped. */
> +static int uffd_generic_handler(int uffd_mode, int uffd,
> + struct uffd_msg *msg, struct uffd_args *args,
> + bool expect_write)
Align.
static int uffd_generic_handler(int uffd_mode, int uffd,
struct uffd_msg *msg, struct uffd_args *args,
bool expect_write)
> +static void setup_uffd(struct kvm_vm *vm, struct test_params *p,
> + struct uffd_desc **pt_uffd, struct uffd_desc **data_uffd)
static void setup_uffd(struct kvm_vm *vm, struct test_params *p,
struct uffd_desc **pt_uffd, struct uffd_desc **data_uffd)
> +{
> + struct test_desc *test = p->test_desc;
> +
> + setup_uffd_args(vm_get_mem_region(vm, MEM_REGION_PT), &pt_args);
> + setup_uffd_args(vm_get_mem_region(vm, MEM_REGION_TEST_DATA), &data_args);
> +
> + *pt_uffd = NULL;
> + if (test->uffd_pt_handler)
> + *pt_uffd = uffd_setup_demand_paging(
> + UFFDIO_REGISTER_MODE_MISSING, 0,
> + pt_args.hva, pt_args.paging_size,
> + test->uffd_pt_handler);
> +
> + *data_uffd = NULL;
> + if (test->uffd_data_handler)
> + *data_uffd = uffd_setup_demand_paging(
> + UFFDIO_REGISTER_MODE_MISSING, 0,
> + data_args.hva, data_args.paging_size,
> + test->uffd_data_handler);
> +}
> +
> +static void free_uffd(struct test_desc *test, struct uffd_desc *pt_uffd,
> + struct uffd_desc *data_uffd)
static void free_uffd(struct test_desc *test, struct uffd_desc *pt_uffd,
struct uffd_desc *data_uffd)
> +static void reset_event_counts(void)
> +{
> + memset(&events, 0, sizeof(events));
> +}
> +
> /*
> * This function either succeeds, skips the test (after setting test->skip), or
> * fails with a TEST_FAIL that aborts all tests.
> */
> static void vcpu_run_loop(struct kvm_vm *vm, struct kvm_vcpu *vcpu,
> - struct test_desc *test)
> + struct test_desc *test)
Spurious change, and it introduces bad alignment.
static void vcpu_run_loop(struct kvm_vm *vm, struct kvm_vcpu *vcpu,
struct test_desc *test)
> {
> struct ucall uc;
>
> @@ -453,6 +575,7 @@ static void run_test(enum vm_guest_mode mode, void *arg)
> struct test_desc *test = p->test_desc;
> struct kvm_vm *vm;
> struct kvm_vcpu *vcpu;
> + struct uffd_desc *pt_uffd, *data_uffd;
>
> print_test_banner(mode, p);
>
next prev parent reply other threads:[~2022-10-14 21:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 1:06 [PATCH v9 00/14] KVM: selftests: Add aarch64/page_fault_test Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 01/14] KVM: selftests: Add a userfaultfd library Ricardo Koller
2022-10-14 21:15 ` Sean Christopherson
2022-10-11 1:06 ` [PATCH v9 02/14] KVM: selftests: aarch64: Add virt_get_pte_hva() library function Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 03/14] KVM: selftests: Add missing close and munmap in __vm_mem_region_delete() Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 04/14] KVM: selftests: aarch64: Construct DEFAULT_MAIR_EL1 using sysreg.h macros Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 05/14] tools: Copy bitfield.h from the kernel sources Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 06/14] KVM: selftests: Stash backing_src_type in struct userspace_mem_region Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 07/14] KVM: selftests: Add vm->memslots[] and enum kvm_mem_region_type Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 08/14] KVM: selftests: Fix alignment in virt_arch_pgd_alloc() and vm_vaddr_alloc() Ricardo Koller
2022-10-13 14:09 ` Andrew Jones
2022-10-11 1:06 ` [PATCH v9 09/14] KVM: selftests: Use the right memslot for code, page-tables, and data allocations Ricardo Koller
2022-10-13 14:14 ` Andrew Jones
2022-10-11 1:06 ` [PATCH v9 10/14] KVM: selftests: aarch64: Add aarch64/page_fault_test Ricardo Koller
2022-10-14 21:23 ` Sean Christopherson
2022-10-11 1:06 ` [PATCH v9 11/14] KVM: selftests: aarch64: Add userfaultfd tests into page_fault_test Ricardo Koller
2022-10-14 21:27 ` Sean Christopherson [this message]
2022-10-11 1:06 ` [PATCH v9 12/14] KVM: selftests: aarch64: Add dirty logging " Ricardo Koller
2022-10-14 21:28 ` Sean Christopherson
2022-10-11 1:06 ` [PATCH v9 13/14] KVM: selftests: aarch64: Add readonly memslot " Ricardo Koller
2022-10-11 1:06 ` [PATCH v9 14/14] KVM: selftests: aarch64: Add mix of " Ricardo Koller
2022-10-14 21:30 ` [PATCH v9 00/14] KVM: selftests: Add aarch64/page_fault_test Sean Christopherson
2022-10-14 21:37 ` 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=Y0nUKhuCJHUaQukj@google.com \
--to=seanjc@google.com \
--cc=alexandru.elisei@arm.com \
--cc=andrew.jones@linux.dev \
--cc=axelrasmussen@google.com \
--cc=bgardon@google.com \
--cc=dmatlack@google.com \
--cc=eric.auger@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=rananta@google.com \
--cc=reijiw@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox