[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH 16/16] HACK: Add sev_console hypercall
Introduce a basic console hypercall for debugging needs under SEV when PV console is not usable at this point. This is later on used by the earlyprintk of the experimental SEV Linux branch. Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx> --- xen/common/coco.c | 6 ++++++ xen/include/hypercall-defs.c | 2 ++ xen/include/public/xen.h | 1 + 3 files changed, 9 insertions(+) diff --git a/xen/common/coco.c b/xen/common/coco.c index d9bd17628d..23c0da6281 100644 --- a/xen/common/coco.c +++ b/xen/common/coco.c @@ -131,4 +131,10 @@ long do_coco_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) } } +long do_sev_console_op(unsigned long c) +{ + printk("%c", (unsigned char)c); + return 0; +} + __initcall(coco_init); \ No newline at end of file diff --git a/xen/include/hypercall-defs.c b/xen/include/hypercall-defs.c index 6c01a9e395..19f40f0b38 100644 --- a/xen/include/hypercall-defs.c +++ b/xen/include/hypercall-defs.c @@ -210,6 +210,7 @@ hypfs_op(unsigned int cmd, const char *arg1, unsigned long arg2, void *arg3, uns xenpmu_op(unsigned int op, xen_pmu_params_t *arg) #endif coco_op(unsigned int cmd, void *arg) +sev_console_op(unsigned long c) #ifdef CONFIG_PV caller: pv64 @@ -297,5 +298,6 @@ mca do do - - - paging_domctl_cont do do do do - #endif coco_op do do do do do +sev_console_op do do do do - #endif /* !CPPCHECK */ diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index e656d6f617..04fc891353 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -119,6 +119,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t); #define __HYPERVISOR_dm_op 41 #define __HYPERVISOR_hypfs_op 42 #define __HYPERVISOR_coco_op 43 +#define __HYPERVISOR_sev_console_op 45 /* Architecture-specific hypercall definitions. */ #define __HYPERVISOR_arch_0 48 -- 2.49.0 Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |