On Wed, Mar 09, 2022 at 04:21:16PM +0000, Alexandru Elisei wrote: > The 32 bit tests do not have relocation support and rely on the build > system to set the text base address to 0x4001_0000, which is the memory > location where the test is placed by qemu. However, kvmtool loads a payload > at a different address, 0x8000_8000, when loading a test with --kernel. > When using --firmware, the default is 0x8000_0000, but that can be changed > with the --firmware-address comand line option. > > When 32 bit tests are configured to run under kvmtool, set the text base > address to 0x8000_8000. > > Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx> > --- > arm/Makefile.arm | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arm/Makefile.arm b/arm/Makefile.arm > index 3a4cc6b26234..01fd4c7bb6e2 100644 > --- a/arm/Makefile.arm > +++ b/arm/Makefile.arm > @@ -14,7 +14,13 @@ CFLAGS += $(machine) > CFLAGS += -mcpu=$(PROCESSOR) > CFLAGS += -mno-unaligned-access > > +ifeq ($(TARGET),qemu) > arch_LDFLAGS = -Ttext=40010000 > +else ifeq ($(TARGET),kvmtool) > +arch_LDFLAGS = -Ttext=80008000 > +else > +$(error Unknown target $(TARGET)) > +endif > > define arch_elf_check = > endef > -- > 2.35.1 > Applied to arm/queue, https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue Thanks, drew