audk/ArmVirtPkg
Ard Biesheuvel 7dd7b89058 ArmVirtPkg/ArmVirtQemu: always build XIP code with strict alignment
The optimization that enabled entry with MMU and caches enabled at EL1
removed the strict alignment requirement for XIP code (roughly, any code
that might execute with the MMU and caches off, which means SEC and PEI
phase modules but also *all* BASE libraries), on the basis that QEMU can
only run guest payloads at EL2 in TCG emulation, which used to ignore
alignment violations, and execution at EL1 would always occur with the
MMU enabled.

This assumption no longer holds: not only does QEMU now enforce strict
alignment for memory accesses with device semantics, there are also
cases where this code might execute at EL2 under virtualization (i.e.,
under NV2 nested virtualization) where the strict alignment is required
too.

The latter case could be optimized too, by enabling VHE and pretending
execution is occurring at EL1, which would allow the existing logic for
entry with the MMU enabled to be reused. However, this would leave
non-VHE CPUs behind.

So in summary, strict alignment needs to be enforced for any code that
may execute with the MMU off, so drop the override that sets the XIP
flags to the empty string.

Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-04-22 13:05:21 +00:00
..
CloudHvAcpiPlatformDxe ArmVirtPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
CloudHvPlatformHasAcpiDtDxe ArmVirtPkg: can't find gUefiOvmfPkgTokenSpaceGuid 2023-03-28 16:27:06 +00:00
Include ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg 2024-02-06 23:51:47 +08:00
KvmtoolCfgMgrDxe ArmVirtPkg: Fix KVM Guest Firmware 2022-08-02 17:07:08 +00:00
KvmtoolPlatformDxe ArmVirtPkg: Dispatch variable service if variable emulation is enabled 2023-05-29 15:14:00 +00:00
Library ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg 2024-02-06 23:51:47 +08:00
MemoryInitPei ArmVirtPkg/ArmVirtQemu: use first 128 MiB as permanent PEI memory 2022-10-26 17:28:39 +00:00
PlatformCI CloudHv: Add CI for CloudHv on AArch64 2023-12-14 14:38:15 +00:00
PrePi ArmVirtPkg: auto-generate SEC ProcessLibraryConstructorList() decl 2024-03-08 09:09:22 +00:00
XenAcpiPlatformDxe ArmVirtPkg/XenAcpiPlatformDxe: Install FACS table from DT 2024-02-25 18:52:27 +00:00
XenPlatformHasAcpiDtDxe ArmVirtPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
XenioFdtDxe ArmVirtPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
ArmVirt.dsc.inc ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg 2024-02-06 23:51:47 +08:00
ArmVirtCloudHv.dsc ArmVirtPkg: Enable CpuMmio2Dxe 2024-02-06 23:51:47 +08:00
ArmVirtCloudHv.fdf ArmVirtPkg: Enable CpuMmio2Dxe 2024-02-06 23:51:47 +08:00
ArmVirtKvmTool.dsc ArmVirtPkg: Enable CpuMmio2Dxe 2024-02-06 23:51:47 +08:00
ArmVirtKvmTool.fdf ArmVirtPkg: Enable CpuMmio2Dxe 2024-02-06 23:51:47 +08:00
ArmVirtPkg.ci.yaml ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg 2024-02-06 23:51:47 +08:00
ArmVirtPkg.dec ArmVirtPkg: Move two PCD variables into OvmfPkg 2024-02-06 23:51:47 +08:00
ArmVirtQemu.dsc ArmVirtPkg/ArmVirtQemu: always build XIP code with strict alignment 2024-04-22 13:05:21 +00:00
ArmVirtQemu.fdf ArmVirtPkg/ArmVirtQemu: omit PCD PEIM unless TPM support is enabled 2022-10-26 17:28:39 +00:00
ArmVirtQemuFvMain.fdf.inc ArmVirtPkg: Enable CpuMmio2Dxe 2024-02-06 23:51:47 +08:00
ArmVirtQemuKernel.dsc ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg 2024-02-06 23:51:47 +08:00
ArmVirtQemuKernel.fdf ArmVirtPkg: add FDF rule for self-relocating PrePi 2020-06-12 22:17:46 +00:00
ArmVirtRules.fdf.inc ArmVirtPkg: add FDF rule for self-relocating PrePi 2020-06-12 22:17:46 +00:00
ArmVirtXen.dsc ArmVirtPkg: Move PCD of FDT base address and FDT padding to OvmfPkg 2024-02-06 23:51:47 +08:00
ArmVirtXen.fdf ArmVirtPkg: Add varpolicy shell command 2023-10-31 14:40:50 +00:00
VarStore.fdf.inc ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00