diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-06-28 09:20:49 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-06-28 09:20:49 +0100 |
commit | facac0af87ef3e533d3690d76acaeaaa41e1631c (patch) | |
tree | 5239fbcadbd5b1a1c695869b10707deb15770777 /xen/arch/x86/platform_hypercall.c | |
parent | bf6501a62e80ec1cf756290d4c3ec4991455f64e (diff) | |
download | xen-facac0af87ef3e533d3690d76acaeaaa41e1631c.tar.gz xen-facac0af87ef3e533d3690d76acaeaaa41e1631c.tar.bz2 xen-facac0af87ef3e533d3690d76acaeaaa41e1631c.zip |
x86-64: EFI runtime code
This allows Dom0 access to all suitable EFI runtime services. The
actual calls into EFI are done in "physical" mode, as entering virtual
mode has been determined to be incompatible with kexec (EFI's
SetVirtualAddressMap() can be called only once, and hence the
secondary kernel can't establish its mappings). ("Physical" mode here
being quoted because this is a mode with paging enabled [otherwise
64-bit mode wouldn't work] but all mappings being 1:1.)
Open issue (not preventing this from being committed imo):
Page (and perhaps other) faults occuring while calling runtime
functions in the context of a hypercall don't get handled correctly
(they don't even seem to reach do_page_fault()). I'm intending to
investigate this further.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/platform_hypercall.c')
-rw-r--r-- | xen/arch/x86/platform_hypercall.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index aede176cbd..f6bcb59bec 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -305,6 +305,17 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op) } break; + case XENPF_efi_runtime_call: + ret = xsm_efi_runtime_call(); + if ( ret ) + break; + + ret = efi_runtime_call(&op->u.efi_runtime_call); + if ( ret == 0 && + copy_field_to_guest(u_xenpf_op, op, u.efi_runtime_call) ) + ret = -EFAULT; + break; + case XENPF_enter_acpi_sleep: ret = xsm_acpi_sleep(); if ( ret ) |