RISC-V has less complicated headers, so update ubsan.c to pull in everything
it needs. Provide dump_execution_state(), and update the printk() message to
make it more obvious that it's an outstanding task.
As with commit
8ef2ac727e21 ("automation: enable UBSAN for debug tests"),
enable UBSAN in RISC-V testing too.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
CONTAINER: debian:12-riscv64
KBUILD_DEFCONFIG: tiny64_defconfig
HYPERVISOR_ONLY: y
+ EXTRA_XEN_CONFIG: |
+ CONFIG_UBSAN=y
+ CONFIG_UBSAN_FATAL=y
# Arm32 cross-build
select GENERIC_BUG_FRAME
select HAS_DEVICE_TREE
select HAS_PMAP
+ select HAS_UBSAN
select HAS_VMAP
config RISCV_64
asm volatile ( "sfence.vma" ::: "memory" );
}
+#define dump_execution_state() run_in_exception_handler(show_execution_state)
+
#endif /* __ASSEMBLY__ */
#endif /* ASM__RISCV__PROCESSOR_H */
void show_execution_state(const struct cpu_user_regs *regs)
{
- printk("implement show_execution_state(regs)\n");
+ printk("TODO: Implement show_execution_state(regs)\n");
}
void arch_hypercall_tasklet_result(struct vcpu *v, long res)
*
*/
-#include <xen/spinlock.h>
+#include <xen/bitops.h>
+#include <xen/kernel.h>
+#include <xen/lib.h>
#include <xen/percpu.h>
+#include <xen/spinlock.h>
#define __noreturn noreturn
#define pr_err(...) printk(XENLOG_ERR __VA_ARGS__)