mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/platform: introduce hypercall to get initial video console settings
This is required so PVH dom0 can get the initial video console state as handled by Xen. PV dom0 will get this as part of the start_info, but it doesn't seem necessary to place such information in the HVM start info. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
f5d0279839
commit
4dd160583c
3 files changed
+18
-1
No files matched your search
@@ -839,6 +839,17 @@ ret_t do_platform_op(
|
||||
}
|
||||
break;
|
||||
|
||||
case XENPF_get_dom0_console:
|
||||
if ( !fill_console_start_info(&op->u.dom0_console) )
|
||||
{
|
||||
ret = -ENODEV;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( copy_field_to_guest(u_xenpf_op, op, u.dom0_console) )
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -ENOSYS;
|
||||
break;
|
||||
|
||||
@@ -205,7 +205,7 @@ static void cf_check vga_text_puts(const char *s, size_t nr)
|
||||
}
|
||||
}
|
||||
|
||||
int __init fill_console_start_info(struct dom0_vga_console_info *ci)
|
||||
int fill_console_start_info(struct dom0_vga_console_info *ci)
|
||||
{
|
||||
memcpy(ci, &vga_console_info, sizeof(*ci));
|
||||
return 1;
|
||||
|
||||
@@ -605,6 +605,11 @@ struct xenpf_symdata {
|
||||
typedef struct xenpf_symdata xenpf_symdata_t;
|
||||
DEFINE_XEN_GUEST_HANDLE(xenpf_symdata_t);
|
||||
|
||||
/* Fetch the video console information and mode setup by Xen. */
|
||||
#define XENPF_get_dom0_console 64
|
||||
typedef struct dom0_vga_console_info xenpf_dom0_console_t;
|
||||
DEFINE_XEN_GUEST_HANDLE(xenpf_dom0_console_t);
|
||||
|
||||
/*
|
||||
* ` enum neg_errnoval
|
||||
* ` HYPERVISOR_platform_op(const struct xen_platform_op*);
|
||||
@@ -635,6 +640,7 @@ struct xen_platform_op {
|
||||
xenpf_core_parking_t core_parking;
|
||||
xenpf_resource_op_t resource_op;
|
||||
xenpf_symdata_t symdata;
|
||||
xenpf_dom0_console_t dom0_console;
|
||||
uint8_t pad[128];
|
||||
} u;
|
||||
};
|
||||
|
||||