From: Sean Christopherson <seanjc@google.com>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc Zyngier" <maz@kernel.org>,
"Oliver Upton" <oliver.upton@linux.dev>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Janosch Frank" <frankja@linux.ibm.com>,
"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Aaron Lewis" <aaronlewis@google.com>
Subject: Re: [PATCH v4 09/34] KVM: selftests: Add a selftest for guest prints and formatted asserts
Date: Mon, 31 Jul 2023 10:19:47 -0700 [thread overview]
Message-ID: <ZMftM3qz/VqalbPg@google.com> (raw)
In-Reply-To: <ZMfpgu8bHH0jA8Si@google.com>
On Mon, Jul 31, 2023, Sean Christopherson wrote:
> On Mon, Jul 31, 2023, Andrew Jones wrote:
> > diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/selftests/kvm/include/ucall_common.h
> > index 4cf69fa8bfba..4adf526dc378 100644
> > --- a/tools/testing/selftests/kvm/include/ucall_common.h
> > +++ b/tools/testing/selftests/kvm/include/ucall_common.h
> > @@ -6,8 +6,19 @@
> > */
> > #ifndef SELFTEST_KVM_UCALL_COMMON_H
> > #define SELFTEST_KVM_UCALL_COMMON_H
> > +#include <linux/kvm.h>
> > #include "test_util.h"
> >
> > +#if defined(__aarch64__)
> > +#define UCALL_EXIT_REASON KVM_EXIT_MMIO
> > +#elif defined(__x86_64__)
> > +#define UCALL_EXIT_REASON KVM_EXIT_IO
> > +#elif defined(__s390x__)
> > +#define UCALL_EXIT_REASON KVM_EXIT_S390_SIEIC
> > +#elif defined(__riscv)
> > +#define UCALL_EXIT_REASON KVM_EXIT_RISCV_SBI
> > +#endif
> > +
> > /* Common ucalls */
> > enum {
> > UCALL_NONE,
> >
> > and then compiled the test for riscv and it passed. I also ran all other
> > riscv tests successfully.
>
> Can I have your SoB for the ucall_common.h patch? I'll write a changelog and fold
> in a separate prep patch for that change.
On second thought, I take that back. I think it makes more sense to add a ucall.h
for each arch and #define the exit type there. All then move all of the
ucall_arch_do_ucall() implementations to ucall.h (except maybe x86 while it has
the horrific save/restore GPRs hack...). That way the #define is colocated with
the code that generates the exit reason.
WARNING: multiple messages have this Message-ID (diff)
From: Sean Christopherson <seanjc@google.com>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc Zyngier" <maz@kernel.org>,
"Oliver Upton" <oliver.upton@linux.dev>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Janosch Frank" <frankja@linux.ibm.com>,
"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Aaron Lewis" <aaronlewis@google.com>
Subject: Re: [PATCH v4 09/34] KVM: selftests: Add a selftest for guest prints and formatted asserts
Date: Mon, 31 Jul 2023 10:19:47 -0700 [thread overview]
Message-ID: <ZMftM3qz/VqalbPg@google.com> (raw)
In-Reply-To: <ZMfpgu8bHH0jA8Si@google.com>
On Mon, Jul 31, 2023, Sean Christopherson wrote:
> On Mon, Jul 31, 2023, Andrew Jones wrote:
> > diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/selftests/kvm/include/ucall_common.h
> > index 4cf69fa8bfba..4adf526dc378 100644
> > --- a/tools/testing/selftests/kvm/include/ucall_common.h
> > +++ b/tools/testing/selftests/kvm/include/ucall_common.h
> > @@ -6,8 +6,19 @@
> > */
> > #ifndef SELFTEST_KVM_UCALL_COMMON_H
> > #define SELFTEST_KVM_UCALL_COMMON_H
> > +#include <linux/kvm.h>
> > #include "test_util.h"
> >
> > +#if defined(__aarch64__)
> > +#define UCALL_EXIT_REASON KVM_EXIT_MMIO
> > +#elif defined(__x86_64__)
> > +#define UCALL_EXIT_REASON KVM_EXIT_IO
> > +#elif defined(__s390x__)
> > +#define UCALL_EXIT_REASON KVM_EXIT_S390_SIEIC
> > +#elif defined(__riscv)
> > +#define UCALL_EXIT_REASON KVM_EXIT_RISCV_SBI
> > +#endif
> > +
> > /* Common ucalls */
> > enum {
> > UCALL_NONE,
> >
> > and then compiled the test for riscv and it passed. I also ran all other
> > riscv tests successfully.
>
> Can I have your SoB for the ucall_common.h patch? I'll write a changelog and fold
> in a separate prep patch for that change.
On second thought, I take that back. I think it makes more sense to add a ucall.h
for each arch and #define the exit type there. All then move all of the
ucall_arch_do_ucall() implementations to ucall.h (except maybe x86 while it has
the horrific save/restore GPRs hack...). That way the #define is colocated with
the code that generates the exit reason.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-07-31 17:19 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-29 0:36 [PATCH v4 00/34] KVM: selftests: Guest printf and asserts overhaul Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 01/34] KVM: selftests: Rename the ASSERT_EQ macro Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 02/34] KVM: selftests: Make TEST_ASSERT_EQ() output look like normal TEST_ASSERT() Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 03/34] KVM: selftests: Add a shameful hack to preserve/clobber GPRs across ucall Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 04/34] KVM: selftests: Add strnlen() to the string overrides Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 05/34] KVM: selftests: Add guest_snprintf() to KVM selftests Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 06/34] KVM: selftests: Add additional pages to the guest to accommodate ucall Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 07/34] KVM: selftests: Add string formatting options to ucall Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 08/34] KVM: selftests: Add formatted guest assert support in ucall framework Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 09/34] KVM: selftests: Add a selftest for guest prints and formatted asserts Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-31 16:32 ` Andrew Jones
2023-07-31 16:32 ` Andrew Jones
2023-07-31 17:04 ` Sean Christopherson
2023-07-31 17:04 ` Sean Christopherson
2023-07-31 17:19 ` Sean Christopherson [this message]
2023-07-31 17:19 ` Sean Christopherson
2023-07-31 18:22 ` Andrew Jones
2023-07-31 18:22 ` Andrew Jones
2023-07-29 0:36 ` [PATCH v4 10/34] KVM: selftests: Convert aarch_timer to printf style GUEST_ASSERT Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 11/34] KVM: selftests: Convert debug-exceptions " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 12/34] KVM: selftests: Convert ARM's hypercalls test " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 13/34] KVM: selftests: Convert ARM's page fault " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 14/34] KVM: selftests: Convert ARM's vGIC IRQ " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 15/34] KVM: selftests: Convert the memslot performance test to printf guest asserts Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 16/34] KVM: selftests: Convert s390's memop test to printf style GUEST_ASSERT Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 17/34] KVM: selftests: Convert s390's tprot " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 18/34] KVM: selftests: Convert set_memory_region_test to printf-based GUEST_ASSERT Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 19/34] KVM: selftests: Convert steal_time test to printf style GUEST_ASSERT Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 20/34] KVM: selftests: Convert x86's CPUID " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 21/34] KVM: selftests: Convert the Hyper-V extended hypercalls test to printf asserts Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 22/34] KVM: selftests: Convert the Hyper-V feature test to printf style GUEST_ASSERT Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 23/34] KVM: selftests: Convert x86's KVM paravirt " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 24/34] KVM: selftests: Convert the MONITOR/MWAIT test to use printf guest asserts Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 25/34] KVM: selftests: Convert x86's nested exceptions test to " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 26/34] KVM: selftests: Convert x86's set BSP ID test to printf style " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 27/34] KVM: selftests: Convert the nSVM software interrupt test to printf " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 28/34] KVM: selftests: Convert x86's TSC MSRs test to use " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 29/34] KVM: selftests: Convert the x86 userspace I/O test to printf guest assert Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 30/34] KVM: selftests: Convert VMX's PMU capabilities test to printf guest asserts Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 31/34] KVM: selftests: Convert x86's XCR0 test to use printf-based " Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 32/34] KVM: selftests: Rip out old, param-based guest assert macros Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 33/34] KVM: selftests: Print out guest RIP on unhandled exception Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-07-29 0:36 ` [PATCH v4 34/34] KVM: selftests: Use GUEST_FAIL() in ARM's arch timer helpers Sean Christopherson
2023-07-29 0:36 ` Sean Christopherson
2023-08-02 22:01 ` [PATCH v4 00/34] KVM: selftests: Guest printf and asserts overhaul Sean Christopherson
2023-08-02 22:01 ` 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=ZMftM3qz/VqalbPg@google.com \
--to=seanjc@google.com \
--cc=aaronlewis@google.com \
--cc=ajones@ventanamicro.com \
--cc=borntraeger@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--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 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.