Compare commits

...

2 Commits

Author SHA1 Message Date
Chris Guikema
d55b102034 zynqmp: add dts overlay for hypervisor mode
The pcie node was creating untyped objects with improper addresses.

Change-Id: I0d4483a904ec00a8cbb9a99d93fe084afb4ffdda
2020-07-16 15:41:48 +10:00
Chris Guikema
d7bb435446 Add config option allowing guests to make SMC calls
Set the option for the zynqmp, whose Linux build uses SMC calls
liberally.

Change-Id: I2d4323e923211e1f8b6513874f59396b27908e3d
2020-07-16 15:41:48 +10:00
4 changed files with 34 additions and 2 deletions

View File

@@ -25,7 +25,14 @@
/* Allow native tasks to run at EL0, but restrict access */
#define HCR_NATIVE ( HCR_COMMON | HCR_TGE | HCR_TVM | HCR_TTLB | HCR_DC \
| HCR_TAC | HCR_SWIO | HCR_TSC | HCR_IMO | HCR_FMO | HCR_AMO)
#ifdef CONFIG_ALLOW_SMC_CALLS
/* This should only be a temporary fix. Guests should be able to call into EL3. These
* SMC calls should be virtualized in the VMM */
#define HCR_VCPU ( HCR_COMMON )
#else
#define HCR_VCPU ( HCR_COMMON | HCR_TSC)
#endif
#define SCTLR_EL1_UCI BIT(26) /* Enable EL0 access to DC CVAU, DC CIVAC, DC CVAC,
and IC IVAU in AArch64 state */
@@ -661,5 +668,3 @@ static inline bool_t armv_handleVCPUFault(word_t hsr)
}
#endif /* End of CONFIG_ARM_HYPERVISOR_SUPPORT */

View File

@@ -165,6 +165,12 @@ config_option(
DEFAULT_DISABLED OFF
)
config_option(
KernelAllowSMCCalls ALLOW_SMC_CALLS "Allow virtualized guests to make SMC calls"
DEFAULT OFF
DEPENDS "KernelArmHypervisorSupport"
)
if(KernelAArch32FPUEnableContextSwitch OR KernelSel4ArchAarch64)
set(KernelHaveFPU ON)
endif()

View File

@@ -36,6 +36,11 @@ if(KernelPlatformZynqmp)
endif()
list(APPEND KernelDTSList "src/plat/zynqmp/overlay-zynqmp.dts")
if(KernelArmHypervisorSupport)
set(KernelAllowSMCCalls ON)
list(APPEND KernelDTSList "src/plat/zynqmp/overlay-zynqmp-hyp.dts")
endif()
declare_default_headers(
TIMER_FREQUENCY 100000000llu
MAX_IRQ 187

View File

@@ -0,0 +1,16 @@
/*
* Copyright 2019, DornerWorks
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(DORNERWORKS_GPL)
*/
/ {
amba {
/* bug: pcie node generates untyped objects too large for hypervisor mode */
/delete-node/ pcie@fd0e0000;
};
};