Skip to content

Commit aa4dcdf

Browse files
committed
modules: add and migrate to the Xen module
Currently, the MIT-licensed Xen public headers were incorporated under the `include/zephyr/xen/public`. However, the recent policy is to not include sources other than Apache-2 in the main tree, so we will externalize them. File differences: The repository contains the RELEASE-4.17.0 file, which is close to the version before the migration, but there are some differences in `arch-arm.h`, due to the following two commits. These are considered to need to be incorporated, so they have been changed from the pre-migration version. - arm64: Change type of hsr, cpsr, spsr_el1 to uint64_t xen-project/xen@918b8842 - xen/arm: set CPSR Z bit when creating aarch32 guests xen-project/xen@0e03ff97 Also, in the pre-migration version, ``` DEFINE_XEN_GUEST_HANDLE(uint8_t); ``` was added. But this can be handled by the line ``` __DEFINE_XEN_GUEST_HANDLE(uint8, uint8_t); ``` So the differences related to this are not applied and left the code from `RELEASE-4.17.0`. Also, visibility was controlled with `CONFIG_XEN_DOM0`, but this is not necessarily required, so it has been omitted. Configuration behavior change: The behavior of CONFIG_XEN_INTERFACE_VERSION has been changed so that if 0 is set, the LATEST version defined in the header will be used. The default value has also been changed to 0. Accordingly, we have updated the path and reviewed the location of the config items. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent 9770fcc commit aa4dcdf

29 files changed

+48
-2548
lines changed

MAINTAINERS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,6 +2379,7 @@ Xen Platform:
23792379
- soc/xen/
23802380
- boards/xen/
23812381
- dts/bindings/xen/
2382+
- modules/xen/
23822383
labels:
23832384
- "area: Xen Platform"
23842385

arch/arm64/core/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ config ARMV8_A
216216
so that it can support some features included in the AArch64 state.
217217
It supports the T32 and A32 instruction sets.
218218

219-
rsource "xen/Kconfig"
220-
221219
endif # CPU_CORTEX_A
222220

223221
if CPU_AARCH64_CORTEX_R

arch/arm64/core/xen/enlighten.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <zephyr/arch/arm64/hypercall.h>
88
#include <zephyr/xen/events.h>
99
#include <zephyr/xen/generic.h>
10-
#include <zephyr/xen/public/xen.h>
11-
#include <zephyr/xen/public/memory.h>
10+
#include <xen/public/xen.h>
11+
#include <xen/public/memory.h>
1212

1313
#include <zephyr/device.h>
1414
#include <zephyr/init.h>

arch/arm64/core/xen/hypercall.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
#include <zephyr/toolchain.h>
77
#include <zephyr/linker/sections.h>
8-
#include <zephyr/xen/public/arch-arm.h>
9-
#include <zephyr/xen/public/xen.h>
8+
#include <xen/public/arch-arm.h>
9+
#include <xen/public/xen.h>
1010

1111
#define HYPERCALL(hypercall) \
1212
GTEXT(HYPERVISOR_##hypercall); \

drivers/serial/uart_hvc_xen.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include <zephyr/xen/events.h>
1010
#include <zephyr/xen/generic.h>
1111
#include <zephyr/xen/hvm.h>
12-
#include <zephyr/xen/public/io/console.h>
13-
#include <zephyr/xen/public/sched.h>
14-
#include <zephyr/xen/public/xen.h>
12+
#include <xen/public/io/console.h>
13+
#include <xen/public/sched.h>
14+
#include <xen/public/xen.h>
1515

1616
#include <zephyr/device.h>
1717
#include <zephyr/init.h>

drivers/serial/uart_hvc_xen_consoleio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
#include <zephyr/arch/arm64/hypercall.h>
13-
#include <zephyr/xen/public/xen.h>
13+
#include <xen/public/xen.h>
1414

1515
#include <zephyr/device.h>
1616
#include <zephyr/drivers/uart.h>

drivers/xen/dom0/domctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <zephyr/arch/arm64/hypercall.h>
88
#include <zephyr/xen/dom0/domctl.h>
99
#include <zephyr/xen/generic.h>
10-
#include <zephyr/xen/public/domctl.h>
11-
#include <zephyr/xen/public/xen.h>
10+
#include <xen/public/domctl.h>
11+
#include <xen/public/xen.h>
1212

1313
#include <zephyr/init.h>
1414
#include <zephyr/kernel.h>

drivers/xen/events.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77

88
#include <zephyr/arch/arm64/hypercall.h>
9-
#include <zephyr/xen/public/xen.h>
10-
#include <zephyr/xen/public/event_channel.h>
9+
#include <xen/public/xen.h>
10+
#include <xen/public/event_channel.h>
1111
#include <zephyr/xen/events.h>
1212
#include <zephyr/sys/barrier.h>
1313

drivers/xen/gnttab.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#include <zephyr/arch/arm64/hypercall.h>
2121
#include <zephyr/xen/generic.h>
2222
#include <zephyr/xen/gnttab.h>
23-
#include <zephyr/xen/public/grant_table.h>
24-
#include <zephyr/xen/public/memory.h>
25-
#include <zephyr/xen/public/xen.h>
23+
#include <xen/public/grant_table.h>
24+
#include <xen/public/memory.h>
25+
#include <xen/public/xen.h>
2626
#include <zephyr/sys/barrier.h>
2727

2828
#include <zephyr/init.h>

drivers/xen/hvm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#include <zephyr/arch/arm64/hypercall.h>
88
#include <zephyr/xen/hvm.h>
9-
#include <zephyr/xen/public/hvm/hvm_op.h>
10-
#include <zephyr/xen/public/hvm/params.h>
9+
#include <xen/public/hvm/hvm_op.h>
10+
#include <xen/public/hvm/params.h>
1111

1212
#include <zephyr/kernel.h>
1313

0 commit comments

Comments
 (0)