diff options
| author | Oleksandr Andrushchenko <[email protected]> | 2020-08-06 12:42:48 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2020-08-14 15:18:30 -0400 |
| commit | 486544161fa97accff12c2fc585ffe218b8dfc52 (patch) | |
| tree | df95622b7bfc2602efce52193ab81971991fdc8c /include | |
| parent | 770a8eef3e27a5dc16e286cafa1a58e9201c9721 (diff) | |
xen: Port Xen hypervisor related code from mini-os
Port hypervisor related code from Mini-OS. This is referencing the code
of Mini-OS from [1] by Huang Shijie and Volodymyr Babchuk which is for
ARM64.
Update essential arch code to support required bit operations, memory
barriers etc.
Copyright for the bits ported belong to at least the following authors,
please see related files for details:
Copyright (c) 2002-2003, K A Fraser
Copyright (c) 2005, Grzegorz Milos, [email protected],Intel Research Cambridge
Copyright (c) 2014, Karim Allah Ahmed <[email protected]>
[1] - https://github.com/zyzii/mini-os.git
Signed-off-by: Oleksandr Andrushchenko <[email protected]>
Signed-off-by: Anastasiia Lukianenko <[email protected]>
[trini: Drop wmb() from musb-net/linux-compat.h now]
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/xen.h | 15 | ||||
| -rw-r--r-- | include/xen/hvm.h | 27 |
2 files changed, 42 insertions, 0 deletions
diff --git a/include/xen.h b/include/xen.h new file mode 100644 index 00000000000..abc3546dd2b --- /dev/null +++ b/include/xen.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * (C) 2020, EPAM Systems Inc. + */ +#ifndef __XEN_H__ +#define __XEN_H__ + +/** + * xen_init() - Xen initialization + * + * Map Xen memory pages. + */ +void xen_init(void); + +#endif /* __XEN_H__ */ diff --git a/include/xen/hvm.h b/include/xen/hvm.h new file mode 100644 index 00000000000..f02c0798a6f --- /dev/null +++ b/include/xen/hvm.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * Simple wrappers around HVM functions + * + * Copyright (c) 2002-2003, K A Fraser + * Copyright (c) 2005, Grzegorz Milos, [email protected],Intel Research Cambridge + * Copyright (c) 2020, EPAM Systems Inc. + */ +#ifndef XEN_HVM_H__ +#define XEN_HVM_H__ + +#include <asm/xen/hypercall.h> +#include <xen/interface/hvm/params.h> +#include <xen/interface/xen.h> + +extern struct shared_info *HYPERVISOR_shared_info; + +int hvm_get_parameter(int idx, uint64_t *value); +int hvm_get_parameter_maintain_dcache(int idx, uint64_t *value); + +struct shared_info *map_shared_info(void *p); +void do_hypervisor_callback(struct pt_regs *regs); +void mask_evtchn(uint32_t port); +void unmask_evtchn(uint32_t port); +void clear_evtchn(uint32_t port); + +#endif /* XEN_HVM_H__ */ |
