From: Ricardo Koller <ricarkol@google.com>
To: Zenghui Yu <yuzenghui@huawei.com>
Cc: kvm@vger.kernel.org, maz@kernel.org,
Sean Christopherson <seanjc@google.com>,
pbonzini@redhat.com, vkuznets@redhat.com,
kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v4 5/6] KVM: selftests: Add exception handling support for aarch64
Date: Fri, 2 Jul 2021 11:56:52 -0700 [thread overview]
Message-ID: <YN9hdFROSeMSTA2S@google.com> (raw)
In-Reply-To: <b1f581ec-56f4-24a2-7850-182128cdc4ac@huawei.com>
On Fri, Jul 02, 2021 at 02:46:57PM +0800, Zenghui Yu wrote:
> [+Sean]
>
> On 2021/6/11 9:10, Ricardo Koller wrote:
> > Add the infrastructure needed to enable exception handling in aarch64
> > selftests. The exception handling defaults to an unhandled-exception
> > handler which aborts the test, just like x86. These handlers can be
> > overridden by calling vm_install_exception_handler(vector) or
> > vm_install_sync_handler(vector, ec). The unhandled exception reporting
> > from the guest is done using the ucall type introduced in a previous
> > commit, UCALL_UNHANDLED.
> >
> > The exception handling code is inspired on kvm-unit-tests.
> >
> > Signed-off-by: Ricardo Koller <ricarkol@google.com>
> > ---
> > tools/testing/selftests/kvm/Makefile | 2 +-
> > .../selftests/kvm/include/aarch64/processor.h | 63 +++++++++
> > .../selftests/kvm/lib/aarch64/handlers.S | 126 ++++++++++++++++++
> > .../selftests/kvm/lib/aarch64/processor.c | 97 ++++++++++++++
> > 4 files changed, 287 insertions(+), 1 deletion(-)
> > create mode 100644 tools/testing/selftests/kvm/lib/aarch64/handlers.S
>
> [...]
>
> > +void vm_init_descriptor_tables(struct kvm_vm *vm)
> > +{
> > + vm->handlers = vm_vaddr_alloc(vm, sizeof(struct handlers),
> > + vm->page_size, 0, 0);
>
> This raced with commit a75a895e6457 ("KVM: selftests: Unconditionally
> use memslot 0 for vaddr allocations") which dropped memslot parameters
> from vm_vaddr_alloc().
Will send a fix to use vm_vaddr_alloc() without the memslot parameters.
>
> We can remove the related comments on top of vm_vaddr_alloc() as well.
Can do this as well, will send a separate patch removing this. Unless
somebody was about to.
>
> Zenghui
Thanks,
Ricardo
_______________________________________________
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: Ricardo Koller <ricarkol@google.com>
To: Zenghui Yu <yuzenghui@huawei.com>
Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
pbonzini@redhat.com, maz@kernel.org, drjones@redhat.com,
alexandru.elisei@arm.com, eric.auger@redhat.com,
vkuznets@redhat.com, Sean Christopherson <seanjc@google.com>
Subject: Re: [PATCH v4 5/6] KVM: selftests: Add exception handling support for aarch64
Date: Fri, 2 Jul 2021 11:56:52 -0700 [thread overview]
Message-ID: <YN9hdFROSeMSTA2S@google.com> (raw)
In-Reply-To: <b1f581ec-56f4-24a2-7850-182128cdc4ac@huawei.com>
On Fri, Jul 02, 2021 at 02:46:57PM +0800, Zenghui Yu wrote:
> [+Sean]
>
> On 2021/6/11 9:10, Ricardo Koller wrote:
> > Add the infrastructure needed to enable exception handling in aarch64
> > selftests. The exception handling defaults to an unhandled-exception
> > handler which aborts the test, just like x86. These handlers can be
> > overridden by calling vm_install_exception_handler(vector) or
> > vm_install_sync_handler(vector, ec). The unhandled exception reporting
> > from the guest is done using the ucall type introduced in a previous
> > commit, UCALL_UNHANDLED.
> >
> > The exception handling code is inspired on kvm-unit-tests.
> >
> > Signed-off-by: Ricardo Koller <ricarkol@google.com>
> > ---
> > tools/testing/selftests/kvm/Makefile | 2 +-
> > .../selftests/kvm/include/aarch64/processor.h | 63 +++++++++
> > .../selftests/kvm/lib/aarch64/handlers.S | 126 ++++++++++++++++++
> > .../selftests/kvm/lib/aarch64/processor.c | 97 ++++++++++++++
> > 4 files changed, 287 insertions(+), 1 deletion(-)
> > create mode 100644 tools/testing/selftests/kvm/lib/aarch64/handlers.S
>
> [...]
>
> > +void vm_init_descriptor_tables(struct kvm_vm *vm)
> > +{
> > + vm->handlers = vm_vaddr_alloc(vm, sizeof(struct handlers),
> > + vm->page_size, 0, 0);
>
> This raced with commit a75a895e6457 ("KVM: selftests: Unconditionally
> use memslot 0 for vaddr allocations") which dropped memslot parameters
> from vm_vaddr_alloc().
Will send a fix to use vm_vaddr_alloc() without the memslot parameters.
>
> We can remove the related comments on top of vm_vaddr_alloc() as well.
Can do this as well, will send a separate patch removing this. Unless
somebody was about to.
>
> Zenghui
Thanks,
Ricardo
next prev parent reply other threads:[~2021-07-02 18:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 1:10 [PATCH v4 0/6] KVM: selftests: arm64 exception handling and debug test Ricardo Koller
2021-06-11 1:10 ` Ricardo Koller
2021-06-11 1:10 ` [PATCH v4 1/6] KVM: selftests: Rename vm_handle_exception Ricardo Koller
2021-06-11 1:10 ` Ricardo Koller
2021-06-11 1:10 ` [PATCH v4 2/6] KVM: selftests: Complete x86_64/sync_regs_test ucall Ricardo Koller
2021-06-11 1:10 ` Ricardo Koller
2021-06-11 1:10 ` [PATCH v4 3/6] KVM: selftests: Introduce UCALL_UNHANDLED for unhandled vector reporting Ricardo Koller
2021-06-11 1:10 ` Ricardo Koller
2021-07-29 18:15 ` Sean Christopherson
2021-07-29 18:15 ` Sean Christopherson
2021-07-30 1:10 ` Ricardo Koller
2021-07-30 1:10 ` Ricardo Koller
2021-07-30 16:24 ` Sean Christopherson
2021-07-30 16:24 ` Sean Christopherson
2021-06-11 1:10 ` [PATCH v4 4/6] KVM: selftests: Move GUEST_ASSERT_EQ to utils header Ricardo Koller
2021-06-11 1:10 ` Ricardo Koller
2021-06-11 1:10 ` [PATCH v4 5/6] KVM: selftests: Add exception handling support for aarch64 Ricardo Koller
2021-06-11 1:10 ` Ricardo Koller
2021-07-02 6:46 ` Zenghui Yu
2021-07-02 6:46 ` Zenghui Yu
2021-07-02 18:56 ` Ricardo Koller [this message]
2021-07-02 18:56 ` Ricardo Koller
2021-06-11 1:10 ` [PATCH v4 6/6] KVM: selftests: Add aarch64/debug-exceptions test Ricardo Koller
2021-06-11 1:10 ` Ricardo Koller
2021-06-11 12:55 ` [PATCH v4 0/6] KVM: selftests: arm64 exception handling and debug test Marc Zyngier
2021-06-11 12:55 ` Marc Zyngier
2021-06-14 7:40 ` Andrew Jones
2021-06-14 7:40 ` Andrew Jones
2021-06-14 8:08 ` Marc Zyngier
2021-06-14 8:08 ` 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=YN9hdFROSeMSTA2S@google.com \
--to=ricarkol@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=maz@kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=yuzenghui@huawei.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.