| .. | .. |
|---|
| 26 | 26 | #include <asm/processor.h> |
|---|
| 27 | 27 | #include <asm/hypervisor.h> |
|---|
| 28 | 28 | |
|---|
| 29 | | -extern const struct hypervisor_x86 x86_hyper_vmware; |
|---|
| 30 | | -extern const struct hypervisor_x86 x86_hyper_ms_hyperv; |
|---|
| 31 | | -extern const struct hypervisor_x86 x86_hyper_xen_pv; |
|---|
| 32 | | -extern const struct hypervisor_x86 x86_hyper_xen_hvm; |
|---|
| 33 | | -extern const struct hypervisor_x86 x86_hyper_kvm; |
|---|
| 34 | | -extern const struct hypervisor_x86 x86_hyper_jailhouse; |
|---|
| 35 | | - |
|---|
| 36 | 29 | static const __initconst struct hypervisor_x86 * const hypervisors[] = |
|---|
| 37 | 30 | { |
|---|
| 38 | 31 | #ifdef CONFIG_XEN_PV |
|---|
| .. | .. |
|---|
| 49 | 42 | #ifdef CONFIG_JAILHOUSE_GUEST |
|---|
| 50 | 43 | &x86_hyper_jailhouse, |
|---|
| 51 | 44 | #endif |
|---|
| 45 | +#ifdef CONFIG_ACRN_GUEST |
|---|
| 46 | + &x86_hyper_acrn, |
|---|
| 47 | +#endif |
|---|
| 52 | 48 | }; |
|---|
| 53 | 49 | |
|---|
| 54 | 50 | enum x86_hypervisor_type x86_hyper_type; |
|---|
| 55 | 51 | EXPORT_SYMBOL(x86_hyper_type); |
|---|
| 52 | + |
|---|
| 53 | +bool __initdata nopv; |
|---|
| 54 | +static __init int parse_nopv(char *arg) |
|---|
| 55 | +{ |
|---|
| 56 | + nopv = true; |
|---|
| 57 | + return 0; |
|---|
| 58 | +} |
|---|
| 59 | +early_param("nopv", parse_nopv); |
|---|
| 56 | 60 | |
|---|
| 57 | 61 | static inline const struct hypervisor_x86 * __init |
|---|
| 58 | 62 | detect_hypervisor_vendor(void) |
|---|
| .. | .. |
|---|
| 61 | 65 | uint32_t pri, max_pri = 0; |
|---|
| 62 | 66 | |
|---|
| 63 | 67 | for (p = hypervisors; p < hypervisors + ARRAY_SIZE(hypervisors); p++) { |
|---|
| 68 | + if (unlikely(nopv) && !(*p)->ignore_nopv) |
|---|
| 69 | + continue; |
|---|
| 70 | + |
|---|
| 64 | 71 | pri = (*p)->detect(); |
|---|
| 65 | 72 | if (pri > max_pri) { |
|---|
| 66 | 73 | max_pri = pri; |
|---|