File tree Expand file tree Collapse file tree 5 files changed +55
-0
lines changed Expand file tree Collapse file tree 5 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -835,6 +835,16 @@ config JAILHOUSE_GUEST
835
835
cell. You can leave this option disabled if you only want to start
836
836
Jailhouse and run Linux afterwards in the root cell.
837
837
838
+ config ACRN_GUEST
839
+ bool "ACRN Guest support"
840
+ depends on X86_64
841
+ help
842
+ This option allows to run Linux as guest in the ACRN hypervisor. ACRN is
843
+ a flexible, lightweight reference open-source hypervisor, built with
844
+ real-time and safety-criticality in mind. It is built for embedded
845
+ IOT with small footprint and real-time features. More details can be
846
+ found in https://projectacrn.org/.
847
+
838
848
endif #HYPERVISOR_GUEST
839
849
840
850
source "arch/x86/Kconfig.cpu"
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ enum x86_hypervisor_type {
29
29
X86_HYPER_XEN_HVM ,
30
30
X86_HYPER_KVM ,
31
31
X86_HYPER_JAILHOUSE ,
32
+ X86_HYPER_ACRN ,
32
33
};
33
34
34
35
#ifdef CONFIG_HYPERVISOR_GUEST
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
47
47
obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
48
48
49
49
obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o
50
+ obj-$(CONFIG_ACRN_GUEST) += acrn.o
50
51
51
52
ifdef CONFIG_X86_FEATURE_NAMES
52
53
quiet_cmd_mkcapflags = MKCAP $@
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0
2
+ /*
3
+ * ACRN detection support
4
+ *
5
+ * Copyright (C) 2019 Intel Corporation. All rights reserved.
6
+ *
7
+ * Jason Chen CJ <[email protected] >
8
+
9
+ *
10
+ */
11
+
12
+ #include <asm/hypervisor.h>
13
+
14
+ static uint32_t __init acrn_detect (void )
15
+ {
16
+ return hypervisor_cpuid_base ("ACRNACRNACRN\0\0" , 0 );
17
+ }
18
+
19
+ static void __init acrn_init_platform (void )
20
+ {
21
+ }
22
+
23
+ static bool acrn_x2apic_available (void )
24
+ {
25
+ /*
26
+ * x2apic is not supported for now. Future enablement will have to check
27
+ * X86_FEATURE_X2APIC to determine whether x2apic is supported in the
28
+ * guest.
29
+ */
30
+ return false;
31
+ }
32
+
33
+ const __initconst struct hypervisor_x86 x86_hyper_acrn = {
34
+ .name = "ACRN" ,
35
+ .detect = acrn_detect ,
36
+ .type = X86_HYPER_ACRN ,
37
+ .init .init_platform = acrn_init_platform ,
38
+ .init .x2apic_available = acrn_x2apic_available ,
39
+ };
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ extern const struct hypervisor_x86 x86_hyper_xen_pv;
32
32
extern const struct hypervisor_x86 x86_hyper_xen_hvm ;
33
33
extern const struct hypervisor_x86 x86_hyper_kvm ;
34
34
extern const struct hypervisor_x86 x86_hyper_jailhouse ;
35
+ extern const struct hypervisor_x86 x86_hyper_acrn ;
35
36
36
37
static const __initconst struct hypervisor_x86 * const hypervisors [] =
37
38
{
@@ -49,6 +50,9 @@ static const __initconst struct hypervisor_x86 * const hypervisors[] =
49
50
#ifdef CONFIG_JAILHOUSE_GUEST
50
51
& x86_hyper_jailhouse ,
51
52
#endif
53
+ #ifdef CONFIG_ACRN_GUEST
54
+ & x86_hyper_acrn ,
55
+ #endif
52
56
};
53
57
54
58
enum x86_hypervisor_type x86_hyper_type ;
You can’t perform that action at this time.
0 commit comments