From: Sean Christopherson <seanjc@google.com>
To: Mark Brown <broonie@kernel.org>
Cc: Thomas Huth <thuth@redhat.com>,
kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Paolo Bonzini <pbonzini@redhat.com>,
Andrew Jones <ajones@ventanamicro.com>,
Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
Aishwarya TCV <aishwarya.tcv@arm.com>
Subject: Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API
Date: Wed, 28 Feb 2024 11:29:16 -0800 [thread overview]
Message-ID: <Zd-JjBNCpFG5iDul@google.com> (raw)
In-Reply-To: <501ac94d-11ab-4765-a25d-75013c021be6@sirena.org.uk>
On Wed, Feb 28, 2024, Mark Brown wrote:
> On Thu, Feb 08, 2024 at 09:48:39PM +0100, Thomas Huth wrote:
> > From: Sean Christopherson <seanjc@google.com>
> >
> > Extract the code to set a vCPU's entry point out of vm_arch_vcpu_add() and
> > into a new API, vcpu_arch_set_entry_point(). Providing a separate API
> > will allow creating a KVM selftests hardness that can handle tests that
> > use different entry points for sub-tests, whereas *requiring* the entry
> > point to be specified at vCPU creation makes it difficult to create a
> > generic harness, e.g. the boilerplate setup/teardown can't easily create
> > and destroy the VM and vCPUs.
>
> With today's -next I'm seeing most of the KVM selftests failing on an
> arm64 defconfig with:
>
> # ==== Test Assertion Failure ====
> # include/kvm_util_base.h:677: !ret
> # pid=735 tid=735 errno=9 - Bad file descriptor
> # 1 0x0000000000410937: vcpu_set_reg at kvm_util_base.h:677 (discriminator 4)
> # 2 (inlined by) vcpu_arch_set_entry_point at processor.c:370 (discriminator 4)
> # 3 0x0000000000407bab: vm_vcpu_add at kvm_util_base.h:981
> # 4 (inlined by) __vm_create_with_vcpus at kvm_util.c:419
> # 5 (inlined by) __vm_create_shape_with_one_vcpu at kvm_util.c:432
> # 6 0x000000000040187b: __vm_create_with_one_vcpu at kvm_util_base.h:892
> # 7 (inlined by) vm_create_with_one_vcpu at kvm_util_base.h:899
> # 8 (inlined by) main at aarch32_id_regs.c:158
> # 9 0x0000007fbcbe6dc3: ?? ??:0
> # 10 0x0000007fbcbe6e97: ?? ??:0
> # 11 0x0000000000401f2f: _start at ??:?
> # KVM_SET_ONE_REG failed, rc: -1 errno: 9 (Bad file descriptor)
>
> and a bisect pointed to this commit which does look plausibly relevant.
>
> Note that while this was bisected with plain arm64 defconfig and the KVM
> selftests fragment was not enabled, but enabling the KVM fragment gave
> the same result as would be expected based on the options enabled by the
> fragment. We're also seeing an alternative failure pattern where the
> tests segfault when run in a different environment, I'm also tracking
> that down but I suspect these are the same issue.
Gah, my bad, I should have at least tested on ARM since I have easy access to
such hardware. If I can't figure out what's going wrong in the next few hours,
I'll drop this series and we can try again for 6.10.
Sorry :-/
> A full log from a sample failing run can be seen here.
>
> https://lava.sirena.org.uk/scheduler/job/645026#L1581
>
> Bisect log:
>
> git bisect start
> # good: [75d8cf735082728a5dfb7e46926ee184851cc519] Merge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc
> git bisect good 75d8cf735082728a5dfb7e46926ee184851cc519
> # bad: [20af1ca418d2c0b11bc2a1fe8c0c88f67bcc2a7e] Add linux-next specific files for 20240228
> git bisect bad 20af1ca418d2c0b11bc2a1fe8c0c88f67bcc2a7e
> # good: [1322f1801e59dddce10591d602d246c1bf49990c] Merge branch 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
> git bisect good 1322f1801e59dddce10591d602d246c1bf49990c
> # good: [f996a1cab1c3547a0bd2edf0daa7a71eddec9b58] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git
> git bisect good f996a1cab1c3547a0bd2edf0daa7a71eddec9b58
> # bad: [22e19d7b30a88dc9e7b315935f44fb2a6c6bf7bf] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git
> git bisect bad 22e19d7b30a88dc9e7b315935f44fb2a6c6bf7bf
> # good: [f9ad77051d5d45000848e87650a382995adf7e50] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
> git bisect good f9ad77051d5d45000848e87650a382995adf7e50
> # bad: [6e9a1d8a249374b0c8ff9472f30f160c98881519] Merge branch 'next' of https://github.com/kvm-x86/linux.git
> git bisect bad 6e9a1d8a249374b0c8ff9472f30f160c98881519
> # bad: [f3ac6b5aec49c3f8ced623802ee9efa6484263eb] Merge branch 'xen'
> git bisect bad f3ac6b5aec49c3f8ced623802ee9efa6484263eb
> # good: [938ccbf4327f38cec365986136e349486ddbb005] Merge branch 'pmu'
> git bisect good 938ccbf4327f38cec365986136e349486ddbb005
> # bad: [f3750b0c7f6e48b0adfb9bd2419de4a3c604ca68] KVM: selftests: Add a basic SEV-ES smoke test
> git bisect bad f3750b0c7f6e48b0adfb9bd2419de4a3c604ca68
> # bad: [992178c7219caa0bcdaa5c0ce59615b12da21662] KVM: selftests: Add a macro to define a test with one vcpu
> git bisect bad 992178c7219caa0bcdaa5c0ce59615b12da21662
> # good: [71cd774ad2f98d4c78bc868e7e55397810be3540] KVM: s390: move s390-specific structs to uapi/asm/kvm.h
> git bisect good 71cd774ad2f98d4c78bc868e7e55397810be3540
> # good: [db7d6fbc10447090bab8691a907a7c383ec66f58] KVM: remove unnecessary #ifdef
> git bisect good db7d6fbc10447090bab8691a907a7c383ec66f58
> # good: [221d65449453846bbf6801d0ecf7dfdf4f413ad9] KVM: selftests: x86: sync_regs_test: Get regs structure before modifying it
> git bisect good 221d65449453846bbf6801d0ecf7dfdf4f413ad9
> # bad: [8ef192609f14272b7bd6fc3a553ebe02d1133cd0] KVM: selftests: Move setting a vCPU's entry point to a dedicated API
> git bisect bad 8ef192609f14272b7bd6fc3a553ebe02d1133cd0
> # first bad commit: [8ef192609f14272b7bd6fc3a553ebe02d1133cd0] KVM: selftests: Move setting a vCPU's entry point to a dedicated API
next prev parent reply other threads:[~2024-02-28 19:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 20:48 [PATCH v3 0/8] Use TAP in some more x86 KVM selftests Thomas Huth
2024-02-08 20:48 ` [PATCH v3 1/8] KVM: selftests: x86: sync_regs_test: Use vcpu_run() where appropriate Thomas Huth
2024-02-08 20:48 ` [PATCH v3 2/8] KVM: selftests: x86: sync_regs_test: Get regs structure before modifying it Thomas Huth
2024-02-08 20:48 ` [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API Thomas Huth
2024-02-28 19:04 ` Mark Brown
2024-02-28 19:29 ` Sean Christopherson [this message]
2024-02-28 21:19 ` Sean Christopherson
2024-02-28 21:29 ` Oliver Upton
2024-02-28 21:34 ` Oliver Upton
2024-02-28 21:34 ` Sean Christopherson
2024-02-28 23:00 ` Raghavendra Rao Ananta
2024-02-29 6:34 ` Oliver Upton
2024-02-28 21:38 ` Mark Brown
2024-02-29 13:12 ` Mark Brown
2024-02-08 20:48 ` [PATCH v3 4/8] KVM: selftests: Add a macro to define a test with one vcpu Thomas Huth
2024-02-08 20:48 ` [PATCH v3 5/8] KVM: selftests: x86: Use TAP interface in the sync_regs test Thomas Huth
2024-02-08 20:48 ` [PATCH v3 6/8] KVM: selftests: x86: Use TAP interface in the fix_hypercall test Thomas Huth
2024-02-08 20:48 ` [PATCH v3 7/8] KVM: selftests: x86: Use TAP interface in the vmx_pmu_caps test Thomas Huth
2024-02-08 20:48 ` [PATCH v3 8/8] KVM: selftests: x86: Use TAP interface in the userspace_msr_exit test Thomas Huth
2024-02-27 2:21 ` [PATCH v3 0/8] Use TAP in some more x86 KVM selftests Sean Christopherson
2024-02-28 21:32 ` Sean Christopherson
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=Zd-JjBNCpFG5iDul@google.com \
--to=seanjc@google.com \
--cc=aishwarya.tcv@arm.com \
--cc=ajones@ventanamicro.com \
--cc=broonie@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=thuth@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