On Sun, Apr 7, 2024 at 12:45 PM Anup Patel wrote:
>
> On Sun, Apr 7, 2024 at 8:11 AM Haibo Xu wrote:
> >
> > On Tue, Apr 2, 2024 at 10:12 PM Andrew Jones
> > wrote:
> > >
> > > On Mon, Apr 01, 2024 at 04:20:18PM +0800, Haibo Xu wrote:
> >
On Tue, Apr 2, 2024 at 10:12 PM Andrew Jones wrote:
>
> On Mon, Apr 01, 2024 at 04:20:18PM +0800, Haibo Xu wrote:
> > This is the first patch to enable the base extension selftest
> > for the SBI implementation in KVM. Test for other extensions
> > will be added later.
This is the first patch to enable the base extension selftest
for the SBI implementation in KVM. Test for other extensions
will be added later.
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/Makefile | 1 +
.../selftests/kvm/include/riscv/processor.h | 8 +-
tools/testing
On Mon, Feb 26, 2024 at 1:20 PM Anup Patel wrote:
>
> On Wed, Feb 21, 2024 at 2:07 PM Atish Patra wrote:
> >
> > On 2/20/24 18:13, Haibo Xu wrote:
> > > On Wed, Feb 21, 2024 at 7:03 AM Atish Patra wrote:
> > >>
> > >> On Mon, Jan 22, 20
On Wed, Feb 21, 2024 at 4:37 PM Atish Patra wrote:
>
> On 2/20/24 18:13, Haibo Xu wrote:
> > On Wed, Feb 21, 2024 at 7:03 AM Atish Patra wrote:
> >>
> >> On Mon, Jan 22, 2024 at 1:48 AM Haibo Xu wrote:
> >>>
> >>> Move vcpu_has_ext to th
On Wed, Feb 21, 2024 at 7:03 AM Atish Patra wrote:
>
> On Mon, Jan 22, 2024 at 1:48 AM Haibo Xu wrote:
> >
> > Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext
> > so that other test cases can use it for vCPU extension check.
> >
> > S
On Mon, Feb 12, 2024 at 8:24 PM Anup Patel wrote:
>
> On Mon, Jan 22, 2024 at 3:15 PM Haibo Xu wrote:
> >
> > The RISC-V arch_timer selftests is used to validate Sstc timer
> > functionality in a guest, which sets up periodic timer interrupts
> > and check the b
On Tue, Feb 6, 2024 at 12:24 AM Marc Zyngier wrote:
>
> On Mon, 05 Feb 2024 13:10:26 +0000,
> Haibo Xu wrote:
> >
> > Hi Marc,
> >
> > Could you help review the first 3 patches in this series?
>
> For these 3 patches:
>
> Reviewed-by: Marc
Hi Marc,
Could you help review the first 3 patches in this series?
Thanks,
Haibo
On Mon, Jan 22, 2024 at 5:45 PM Haibo Xu wrote:
>
> The RISC-V arch_timer selftests is used to validate Sstc timer
> functionality in a guest, which sets up periodic timer interrupts
> and che
On Mon, Jan 22, 2024 at 8:21 PM Andrew Jones wrote:
>
> On Mon, Jan 22, 2024 at 05:58:32PM +0800, Haibo Xu wrote:
> > Change signed type to unsigned in test_args struct which
> > only make sense for unsigned value.
> >
> > Suggested-by: Andrew Jone
Add a KVM selftests to validate the Sstc timer functionality.
The test was ported from arm64 arch timer test.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/Makefile | 1 +
.../selftests/kvm/aarch64/arch_timer.c| 12 +-
tools/testing
Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext
so that other test cases can use it for vCPU extension check.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/include/riscv/processor.h | 2 ++
tools/testing/selftests/kvm/lib/riscv
Add guest_get_vcpuid() helper to simplify accessing to per-cpu
private data. The sscratch CSR was used to store the vcpu id.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/include/aarch64/processor.h | 4
tools/testing/selftests/kvm/include
Add the infrastructure for guest exception handling in riscv selftests.
Customized handlers can be enabled by vm_install_exception_handler(vector)
or vm_install_interrupt_handler().
The code is inspired from that of x86/arm64.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/include/riscv/processor.h | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/kvm/include/riscv/processor.h
b/tools/testing/selftests/kvm/include/riscv
Borrow the cpu_relax() definitions from kernel's
arch/riscv/include/asm/vdso/processor.h to tools/ for riscv.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/arch/riscv/include/asm/vdso/processor.h | 32 +++
1 file changed, 32 insertions(+)
create mode 100644 tools
Borrow the csr definitions and operations from kernel's
arch/riscv/include/asm/csr.h to tools/ for riscv.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/arch/riscv/include/asm/csr.h | 541 +
1 file changed, 541 insertions(+)
create mode 100644 tools
Since only 64bit KVM selftests were supported on all architectures,
add the CONFIG_64BIT definition in kvm/Makefile to ensure only 64bit
definitions were available in the corresponding included files.
Suggested-by: Andrew Jones
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools
Split the arch-neutral test code out of aarch64/arch_timer.c
and put them into a common arch_timer.c. This is a preparation
to share timer test codes in riscv.
Suggested-by: Andrew Jones
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/Makefile | 3
in an virtual environment.
To alleviate this issue, just expose the timeout value as user
configurable and print some hint message to increase the value
when hitting the failure..
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
.../selftests/kvm/aarch64/arch_timer.c| 32
Change signed type to unsigned in test_args struct which
only make sense for unsigned value.
Suggested-by: Andrew Jones
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/aarch64/arch_timer.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/testing
From: Paolo Bonzini
The introduction of $(SPLIT_TESTS) also introduced a warning when
building selftests on architectures that include get-reg-lists:
make: Entering directory '/root/kvm/tools/testing/selftests/kvm'
Makefile:272: warning: overriding recipe for target
machine.
---
Changed since v4:
* Rebased to Linux 6.7-rc8
* Added new patch(2/12) to clean up the data type in struct test_args
* Re-ordered patch(11/11) in v4 to patch(3/12)
* Changed the timer_err_margin_us type from int to uint32_t
Haibo Xu (11):
KVM: arm64: selftests: Data type cleanup
On Wed, Dec 20, 2023 at 9:58 PM Marc Zyngier wrote:
>
> On Wed, 20 Dec 2023 13:51:24 +0000,
> Haibo Xu wrote:
> >
> > On Wed, Dec 20, 2023 at 5:00 PM Marc Zyngier wrote:
> > >
> > > On 2023-12-20 06:50, Haibo Xu wrote:
> > > >
On Wed, Dec 20, 2023 at 5:00 PM Marc Zyngier wrote:
>
> On 2023-12-20 06:50, Haibo Xu wrote:
> > On Wed, Dec 20, 2023 at 2:22 AM Marc Zyngier wrote:
> >>
> >> On Tue, 12 Dec 2023 09:31:20 +,
> >> Haibo Xu wrote:
> >> > > @@ -216,6
On Wed, Dec 20, 2023 at 2:22 AM Marc Zyngier wrote:
>
> On Tue, 12 Dec 2023 09:31:20 +0000,
> Haibo Xu wrote:
> > > @@ -216,6 +221,9 @@ static bool parse_args(int argc, char *argv[])
> > case 'm':
> > test_args.migration_fr
On Wed, Dec 13, 2023 at 10:08 PM Andrew Jones wrote:
>
> On Tue, Dec 12, 2023 at 05:31:17PM +0800, Haibo Xu wrote:
> > Add guest_get_vcpuid() helper to simplify accessing to per-cpu
> > private data. The sscratch CSR was used to store the vcpu id.
> >
> > Signed-
in an virtual environment.
To alleviate this issue, just expose the timeout value as user
configurable and print some hint message to increase the value
when hitting the failure..
Signed-off-by: Haibo Xu
---
.../selftests/kvm/aarch64/arch_timer.c| 8 +--
tools/testing/selftests/kvm
Add a KVM selftests to validate the Sstc timer functionality.
The test was ported from arm64 arch timer test.
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/Makefile | 1 +
.../selftests/kvm/aarch64/arch_timer.c| 12 +-
tools/testing/selftests/kvm/arch_timer.c
Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext
so that other test cases can use it for vCPU extension check.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/include/riscv/processor.h | 2 ++
tools/testing/selftests/kvm/lib/riscv
Add guest_get_vcpuid() helper to simplify accessing to per-cpu
private data. The sscratch CSR was used to store the vcpu id.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/include/aarch64/processor.h | 4
tools/testing/selftests/kvm/include
Add the infrastructure for guest exception handling in riscv selftests.
Customized handlers can be enabled by vm_install_exception_handler(vector)
or vm_install_interrupt_handler().
The code is inspired from that of x86/arm64.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/include/riscv/processor.h | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/kvm/include/riscv/processor.h
b/tools/testing/selftests/kvm/include/riscv
Borrow the cpu_relax() definitions from kernel's
arch/riscv/include/asm/vdso/processor.h to tools/ for riscv.
Signed-off-by: Haibo Xu
---
tools/arch/riscv/include/asm/vdso/processor.h | 32 +++
1 file changed, 32 insertions(+)
create mode 100644 tools/arch/riscv/include/asm
Borrow the csr definitions and operations from kernel's
arch/riscv/include/asm/csr.h to tools/ for riscv.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/arch/riscv/include/asm/csr.h | 521 +
1 file changed, 521 insertions(+)
create mode 100644 tools
Since only 64bit KVM selftests were supported on all architectures,
add the CONFIG_64BIT definition in kvm/Makefile to ensure only 64bit
definitions were available in the corresponding included files.
Suggested-by: Andrew Jones
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/Makefile
Split the arch-neutral test code out of aarch64/arch_timer.c
and put them into a common arch_timer.c. This is a preparation
to share timer test codes in riscv.
Suggested-by: Andrew Jones
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/Makefile | 3
From: Paolo Bonzini
From: Paolo Bonzini
The introduction of $(SPLIT_TESTS) also introduced a warning when
building selftests on architectures that include get-reg-lists:
make: Entering directory '/root/kvm/tools/testing/selftests/kvm'
Makefile:272: warning: overriding recipe for
Haibo Xu (10):
KVM: arm64: selftests: Split arch_timer test code
KVM: selftests: Add CONFIG_64BIT definition for the build
tools: riscv: Add header file csr.h
tools: riscv: Add header file vdso/processor.h
KVM: riscv: selftests: Switch to use macro from csr.h
KVM: riscv: selftests: Add
On Mon, Dec 4, 2023 at 7:32 PM Andrew Jones wrote:
>
> On Mon, Dec 04, 2023 at 10:42:24AM +0800, Haibo Xu wrote:
> > On Fri, Sep 15, 2023 at 2:21 PM Haibo Xu wrote:
> > >
> > > On Thu, Sep 14, 2023 at 5:52 PM Andrew Jones
> > > wrote:
> > > &g
On Fri, Sep 15, 2023 at 2:21 PM Haibo Xu wrote:
>
> On Thu, Sep 14, 2023 at 5:52 PM Andrew Jones wrote:
> >
> > On Thu, Sep 14, 2023 at 09:37:03AM +0800, Haibo Xu wrote:
> > > Add a KVM selftests to validate the Sstc timer functionality.
> > > The test w
On Wed, Nov 22, 2023 at 4:13 PM Andrew Jones wrote:
>
> On Sun, Oct 08, 2023 at 10:58:57AM +0800, Haibo Xu wrote:
> > On Tue, Oct 3, 2023 at 6:28 PM Andrew Jones wrote:
> > >
> > > On Thu, Sep 14, 2023 at 09:36:56AM +0800, Haibo Xu wrote:
> > > > A
On Thu, Sep 14, 2023 at 6:15 PM Andrew Jones wrote:
>
> On Thu, Sep 14, 2023 at 10:52:15AM +0100, Conor Dooley wrote:
> > On Thu, Sep 14, 2023 at 11:36:01AM +0200, Andrew Jones wrote:
> > > > +static inline void cpu_relax(void)
> > > > +{
> > > > +#ifdef __riscv_zihintpause
> > > > + asm
On Thu, Sep 14, 2023 at 5:52 PM Andrew Jones wrote:
>
> On Thu, Sep 14, 2023 at 09:37:03AM +0800, Haibo Xu wrote:
> > Add a KVM selftests to validate the Sstc timer functionality.
> > The test was ported from arm64 arch timer test.
>
> I just tried this test out. Runnin
On Thu, Sep 14, 2023 at 5:05 PM Andrew Jones wrote:
>
> On Thu, Sep 14, 2023 at 09:37:02AM +0800, Haibo Xu wrote:
> > Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext
> > so that other test cases can use it for vCPU extension check.
> >
>
On Thu, Sep 14, 2023 at 4:52 PM Andrew Jones wrote:
>
> On Thu, Sep 14, 2023 at 09:36:59AM +0800, Haibo Xu wrote:
> > Signed-off-by: Haibo Xu
> > ---
> > tools/testing/selftests/kvm/include/riscv/processor.h | 8 +---
> > 1 file changed, 1 insertion(+), 7 d
On Thu, Sep 14, 2023 at 4:14 PM Andrew Jones wrote:
>
> On Thu, Sep 14, 2023 at 09:36:58AM +0800, Haibo Xu wrote:
> > Borrow the csr definitions and operations from kernel's
> > arch/riscv/include/asm/csr.h to tools/ for riscv. Since
> > only 64bit was supported for R
Add a KVM selftests to validate the Sstc timer functionality.
The test was ported from arm64 arch timer test.
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/Makefile | 1 +
.../selftests/kvm/aarch64/arch_timer.c| 12 +-
tools/testing/selftests/kvm/arch_timer.c
Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext
so that other test cases can use it for vCPU extension check.
Signed-off-by: Haibo Xu
---
.../selftests/kvm/include/riscv/processor.h | 2 ++
.../testing/selftests/kvm/lib/riscv/processor.c | 9 +
tools/testing
Add guest_get_vcpuid() helper to simplify accessing to per-cpu
private data. The sscratch CSR was used to store the vcpu id.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/include/aarch64/processor.h | 4
tools/testing/selftests/kvm/include
Add the infrastructure for guest exception handling in riscv selftests.
Customized handlers can be enabled by vm_install_exception_handler(vector)
or vm_install_interrupt_handler().
The code is inspired from that of x86/arm64.
Signed-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/include/riscv/processor.h | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/tools/testing/selftests/kvm/include/riscv/processor.h
b/tools/testing/selftests/kvm/include/riscv/processor.h
index 5b62a3d2aa9b
-off-by: Haibo Xu
Reviewed-by: Andrew Jones
---
tools/arch/riscv/include/asm/csr.h | 521 +++
tools/testing/selftests/kvm/Makefile | 3 +
2 files changed, 524 insertions(+)
create mode 100644 tools/arch/riscv/include/asm/csr.h
diff --git a/tools/arch/riscv/include
Split the arch-neutral test code out of aarch64/arch_timer.c
and put them into a common arch_timer.c. This is a preparation
to share timer test codes in riscv.
Suggested-by: Andrew Jones
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/Makefile | 3 +-
.../selftests/kvm
A separate makefile rule was used for split targets which was added
in patch(KVM: arm64: selftests: Split get-reg-list test code). This
could be avoided by minor changes to the recipes of current rule.
Signed-off-by: Haibo Xu
---
tools/testing/selftests/kvm/Makefile | 6 ++
1 file changed
, vm_install_exception_handler() prototype were also moved to
the common header since they are commonly used across the architectures.
The patch is a preparation to share the guest exception handling codes
in riscv.
Suggested-by: Andrew Jones
Suggested-by: Sean Christopherson
Signed-off-by: Haibo Xu
Reviewed
/arch_timer.c by setting some
aarch64 specific variable to 0 on risc-v
Haibo Xu (9):
KVM: selftests: Unify the codes for guest exception handling
KVM: selftests: Unify the makefile rule for split targets
KVM: arm64: selftests: Split arch_timer test code
tools: riscv: Add header file csr.h
57 matches
Mail list logo