All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points
@ 2024-11-06  9:40 ` Andrew Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jones @ 2024-11-06  9:40 UTC (permalink / raw)
  To: kvm-riscv

From: James Raphael Tiovalen <jamestiotio@gmail.com>

The HSM tests will need to test HSM start and resumption from HSM
suspend. Prepare for these tests, as well other tests, such as the
SUSP resume tests, by providing an assembly file for SBI tests.

Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
 riscv/Makefile    |  3 ++-
 riscv/sbi-asm.S   | 12 ++++++++++++
 riscv/sbi-tests.h |  6 ++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 riscv/sbi-asm.S
 create mode 100644 riscv/sbi-tests.h

diff --git a/riscv/Makefile b/riscv/Makefile
index 22fd273acac3..734441f94dad 100644
--- a/riscv/Makefile
+++ b/riscv/Makefile
@@ -43,6 +43,7 @@ cflatobjs += lib/riscv/timer.o
 ifeq ($(ARCH),riscv32)
 cflatobjs += lib/ldiv32.o
 endif
+cflatobjs += riscv/sbi-asm.o
 
 ########################################
 
@@ -82,7 +83,7 @@ CFLAGS += -mcmodel=medany
 CFLAGS += -std=gnu99
 CFLAGS += -ffreestanding
 CFLAGS += -O2
-CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib
+CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib -I $(SRCDIR)/riscv
 
 asm-offsets = lib/riscv/asm-offsets.h
 include $(SRCDIR)/scripts/asm-offsets.mak
diff --git a/riscv/sbi-asm.S b/riscv/sbi-asm.S
new file mode 100644
index 000000000000..fbf97cab39c8
--- /dev/null
+++ b/riscv/sbi-asm.S
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Helper assembly code routines for RISC-V SBI extension tests.
+ *
+ * Copyright (C) 2024, James Raphael Tiovalen <jamestiotio@gmail.com>
+ */
+#define __ASSEMBLY__
+
+#include "sbi-tests.h"
+
+.section .text
+
diff --git a/riscv/sbi-tests.h b/riscv/sbi-tests.h
new file mode 100644
index 000000000000..c28046f7cfbd
--- /dev/null
+++ b/riscv/sbi-tests.h
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _RISCV_SBI_TESTS_H_
+#define _RISCV_SBI_TESTS_H_
+
+
+#endif /* _RISCV_SBI_TESTS_H_ */
-- 
2.47.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points
@ 2024-11-06  9:40 ` Andrew Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jones @ 2024-11-06  9:40 UTC (permalink / raw)
  To: kvm, kvm-riscv; +Cc: atishp, jamestiotio

From: James Raphael Tiovalen <jamestiotio@gmail.com>

The HSM tests will need to test HSM start and resumption from HSM
suspend. Prepare for these tests, as well other tests, such as the
SUSP resume tests, by providing an assembly file for SBI tests.

Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
 riscv/Makefile    |  3 ++-
 riscv/sbi-asm.S   | 12 ++++++++++++
 riscv/sbi-tests.h |  6 ++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 riscv/sbi-asm.S
 create mode 100644 riscv/sbi-tests.h

diff --git a/riscv/Makefile b/riscv/Makefile
index 22fd273acac3..734441f94dad 100644
--- a/riscv/Makefile
+++ b/riscv/Makefile
@@ -43,6 +43,7 @@ cflatobjs += lib/riscv/timer.o
 ifeq ($(ARCH),riscv32)
 cflatobjs += lib/ldiv32.o
 endif
+cflatobjs += riscv/sbi-asm.o
 
 ########################################
 
@@ -82,7 +83,7 @@ CFLAGS += -mcmodel=medany
 CFLAGS += -std=gnu99
 CFLAGS += -ffreestanding
 CFLAGS += -O2
-CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib
+CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib -I $(SRCDIR)/riscv
 
 asm-offsets = lib/riscv/asm-offsets.h
 include $(SRCDIR)/scripts/asm-offsets.mak
diff --git a/riscv/sbi-asm.S b/riscv/sbi-asm.S
new file mode 100644
index 000000000000..fbf97cab39c8
--- /dev/null
+++ b/riscv/sbi-asm.S
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Helper assembly code routines for RISC-V SBI extension tests.
+ *
+ * Copyright (C) 2024, James Raphael Tiovalen <jamestiotio@gmail.com>
+ */
+#define __ASSEMBLY__
+
+#include "sbi-tests.h"
+
+.section .text
+
diff --git a/riscv/sbi-tests.h b/riscv/sbi-tests.h
new file mode 100644
index 000000000000..c28046f7cfbd
--- /dev/null
+++ b/riscv/sbi-tests.h
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _RISCV_SBI_TESTS_H_
+#define _RISCV_SBI_TESTS_H_
+
+
+#endif /* _RISCV_SBI_TESTS_H_ */
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points
  2024-11-06  9:40 ` Andrew Jones
@ 2024-11-11 15:06   ` Andrew Jones
  -1 siblings, 0 replies; 4+ messages in thread
From: Andrew Jones @ 2024-11-11 15:06 UTC (permalink / raw)
  To: kvm-riscv

On Wed, Nov 06, 2024 at 10:40:16AM +0100, Andrew Jones wrote:
> From: James Raphael Tiovalen <jamestiotio@gmail.com>
> 
> The HSM tests will need to test HSM start and resumption from HSM
> suspend. Prepare for these tests, as well other tests, such as the
> SUSP resume tests, by providing an assembly file for SBI tests.
> 
> Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com>
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
>  riscv/Makefile    |  3 ++-
>  riscv/sbi-asm.S   | 12 ++++++++++++
>  riscv/sbi-tests.h |  6 ++++++
>  3 files changed, 20 insertions(+), 1 deletion(-)
>  create mode 100644 riscv/sbi-asm.S
>  create mode 100644 riscv/sbi-tests.h
> 
> diff --git a/riscv/Makefile b/riscv/Makefile
> index 22fd273acac3..734441f94dad 100644
> --- a/riscv/Makefile
> +++ b/riscv/Makefile
> @@ -43,6 +43,7 @@ cflatobjs += lib/riscv/timer.o
>  ifeq ($(ARCH),riscv32)
>  cflatobjs += lib/ldiv32.o
>  endif
> +cflatobjs += riscv/sbi-asm.o
>  
>  ########################################
>  
> @@ -82,7 +83,7 @@ CFLAGS += -mcmodel=medany
>  CFLAGS += -std=gnu99
>  CFLAGS += -ffreestanding
>  CFLAGS += -O2
> -CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib
> +CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib -I $(SRCDIR)/riscv
>  
>  asm-offsets = lib/riscv/asm-offsets.h
>  include $(SRCDIR)/scripts/asm-offsets.mak
> diff --git a/riscv/sbi-asm.S b/riscv/sbi-asm.S
> new file mode 100644
> index 000000000000..fbf97cab39c8
> --- /dev/null
> +++ b/riscv/sbi-asm.S
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Helper assembly code routines for RISC-V SBI extension tests.
> + *
> + * Copyright (C) 2024, James Raphael Tiovalen <jamestiotio@gmail.com>
> + */
> +#define __ASSEMBLY__
> +
> +#include "sbi-tests.h"
> +
> +.section .text
> +
> diff --git a/riscv/sbi-tests.h b/riscv/sbi-tests.h
> new file mode 100644
> index 000000000000..c28046f7cfbd
> --- /dev/null
> +++ b/riscv/sbi-tests.h
> @@ -0,0 +1,6 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef _RISCV_SBI_TESTS_H_
> +#define _RISCV_SBI_TESTS_H_
> +
> +
> +#endif /* _RISCV_SBI_TESTS_H_ */
> -- 
> 2.47.0
>

Merged through riscv/sbi.

Thanks,
drew


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points
@ 2024-11-11 15:06   ` Andrew Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jones @ 2024-11-11 15:06 UTC (permalink / raw)
  To: kvm, kvm-riscv; +Cc: atishp, jamestiotio

On Wed, Nov 06, 2024 at 10:40:16AM +0100, Andrew Jones wrote:
> From: James Raphael Tiovalen <jamestiotio@gmail.com>
> 
> The HSM tests will need to test HSM start and resumption from HSM
> suspend. Prepare for these tests, as well other tests, such as the
> SUSP resume tests, by providing an assembly file for SBI tests.
> 
> Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com>
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
>  riscv/Makefile    |  3 ++-
>  riscv/sbi-asm.S   | 12 ++++++++++++
>  riscv/sbi-tests.h |  6 ++++++
>  3 files changed, 20 insertions(+), 1 deletion(-)
>  create mode 100644 riscv/sbi-asm.S
>  create mode 100644 riscv/sbi-tests.h
> 
> diff --git a/riscv/Makefile b/riscv/Makefile
> index 22fd273acac3..734441f94dad 100644
> --- a/riscv/Makefile
> +++ b/riscv/Makefile
> @@ -43,6 +43,7 @@ cflatobjs += lib/riscv/timer.o
>  ifeq ($(ARCH),riscv32)
>  cflatobjs += lib/ldiv32.o
>  endif
> +cflatobjs += riscv/sbi-asm.o
>  
>  ########################################
>  
> @@ -82,7 +83,7 @@ CFLAGS += -mcmodel=medany
>  CFLAGS += -std=gnu99
>  CFLAGS += -ffreestanding
>  CFLAGS += -O2
> -CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib
> +CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib -I $(SRCDIR)/riscv
>  
>  asm-offsets = lib/riscv/asm-offsets.h
>  include $(SRCDIR)/scripts/asm-offsets.mak
> diff --git a/riscv/sbi-asm.S b/riscv/sbi-asm.S
> new file mode 100644
> index 000000000000..fbf97cab39c8
> --- /dev/null
> +++ b/riscv/sbi-asm.S
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Helper assembly code routines for RISC-V SBI extension tests.
> + *
> + * Copyright (C) 2024, James Raphael Tiovalen <jamestiotio@gmail.com>
> + */
> +#define __ASSEMBLY__
> +
> +#include "sbi-tests.h"
> +
> +.section .text
> +
> diff --git a/riscv/sbi-tests.h b/riscv/sbi-tests.h
> new file mode 100644
> index 000000000000..c28046f7cfbd
> --- /dev/null
> +++ b/riscv/sbi-tests.h
> @@ -0,0 +1,6 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef _RISCV_SBI_TESTS_H_
> +#define _RISCV_SBI_TESTS_H_
> +
> +
> +#endif /* _RISCV_SBI_TESTS_H_ */
> -- 
> 2.47.0
>

Merged through riscv/sbi.

Thanks,
drew

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-11 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06  9:40 [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points Andrew Jones
2024-11-06  9:40 ` Andrew Jones
2024-11-11 15:06 ` Andrew Jones
2024-11-11 15:06   ` Andrew Jones

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.