Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

target-efi: Invalid EFI_ARCH on Debian 9.9 #3

Open
alexandru-elisei opened this issue Oct 30, 2020 · 0 comments
Open

target-efi: Invalid EFI_ARCH on Debian 9.9 #3

alexandru-elisei opened this issue Oct 30, 2020 · 0 comments

Comments

@alexandru-elisei
Copy link

If I try to build kvm-unit-tests with --target-efi on Debian 9.9 I get the following error:

gcc -mstrict-align -std=gnu99 -ffreestanding -O2 -I /home/alex/kvm-unit-tests/lib -I /home/alex/kvm-unit-tests/lib/libfdt -I lib -g -MMD -MF lib/.efi.d -fno-strict-aliasing -fno-common -Wall -Wwrite-strings -Wempty-body -Wuninitialized -Wignored-qualifiers -Werror -fomit-frame-pointer -fno-stack-protector -Wno-frame-address -Wclobbered -Wunused-but-set-parameter -DTARGET_EFI -DEFI_DEBUG -I /usr/include/efi -I /usr/include/efi/aa64 -fpic -fshort-wchar -fno-stack-check -fno-merge-all-constants -Wno-error=missing-prototypes -Wno-error=strict-prototypes -Wno-error=pragmas -Wmissing-parameter-type -Wold-style-declaration -Woverride-init -Wmissing-prototypes -Wstrict-prototypes -c -o lib/efi.o lib/efi.c
In file included from lib/efi.c:14:0:
/usr/include/efi/efi.h:41:21: fatal error: efibind.h: No such file or directory
#include "efibind.h"
^
compilation terminated.
: recipe for target 'lib/efi.o' failed
make: *** [lib/efi.o] Error 1

This is fixed by setting EFI_ARCH=aarch64 in Makefile.

System configuration:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.9 (stretch)
Release: 9.9
Codename: stretch

$ dpkg-query --status gnu-efi
Package: gnu-efi
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 522
Maintainer: Julian Andres Klode [email protected]
Architecture: arm64
Version: 3.0.9-1
Description: Library for developing EFI applications
GNU toolchain for building applications that can run in the environment
presented by Intel's EFI (Extensible Firmware Interface). EFI is a firmware
specification for the "BIOS" on ia64(IPF), IA-32(x86) and x86_64 systems.
Homepage: http://sourceforge.net/projects/gnu-efi/

$ dpkg-query -L gnu-efi
/.
/usr
/usr/include
/usr/include/efi
/usr/include/efi/aarch64
/usr/include/efi/aarch64/efibind.h
/usr/include/efi/aarch64/efilibplat.h
/usr/include/efi/aarch64/efisetjmp_arch.h
/usr/include/efi/efi.h
/usr/include/efi/efi_nii.h
/usr/include/efi/efi_pxe.h
/usr/include/efi/efiapi.h
/usr/include/efi/eficompiler.h
/usr/include/efi/eficon.h
/usr/include/efi/efidebug.h
/usr/include/efi/efidef.h
/usr/include/efi/efidevp.h
/usr/include/efi/efierr.h
/usr/include/efi/efifs.h
/usr/include/efi/efigpt.h
/usr/include/efi/efiip.h
/usr/include/efi/efilib.h
/usr/include/efi/efilink.h
/usr/include/efi/efinet.h
/usr/include/efi/efipart.h
/usr/include/efi/efipciio.h
/usr/include/efi/efipoint.h
/usr/include/efi/efiprot.h
/usr/include/efi/efipxebc.h
/usr/include/efi/efirtlib.h
/usr/include/efi/efiser.h
/usr/include/efi/efisetjmp.h
/usr/include/efi/efishellintf.h
/usr/include/efi/efishellparm.h
/usr/include/efi/efistdarg.h
/usr/include/efi/efitcp.h
/usr/include/efi/efiudp.h
/usr/include/efi/efiui.h
/usr/include/efi/libsmbios.h
/usr/include/efi/pci22.h
/usr/include/efi/protocol
/usr/include/efi/protocol/adapterdebug.h
/usr/include/efi/protocol/eficonsplit.h
/usr/include/efi/protocol/efidbg.h
/usr/include/efi/protocol/efivar.h
/usr/include/efi/protocol/intload.h
/usr/include/efi/protocol/legacyboot.h
/usr/include/efi/protocol/piflash64.h
/usr/include/efi/protocol/vgaclass.h
/usr/include/efi/romload.h
/usr/lib
/usr/lib/crt0-efi-aarch64.o
/usr/lib/elf_aarch64_efi.lds
/usr/lib/libefi.a
/usr/lib/libgnuefi.a
/usr/share
/usr/share/doc
/usr/share/doc/gnu-efi
/usr/share/doc/gnu-efi/TODO.Debian
/usr/share/doc/gnu-efi/changelog.Debian.gz
/usr/share/doc/gnu-efi/changelog.gz
/usr/share/doc/gnu-efi/copyright

davidhildenbrand pushed a commit to davidhildenbrand/kvm-unit-tests that referenced this issue Dec 1, 2021
Add three variants of the #PF interception access test to handle TLB
invalidations by relying on VPID rules.  Intercept the access test's
INVLPG and perform invalidation by:

  1. Implicity flush on VM-Enter by disabling VPID
  2. Explicitly perform INVVPID on the target address
  3. Implicitly "flush" by moving to a new VPID

Case rhdrjones#3 exposes a bug where KVM fails to update unsync SPTEs when using
shadow paging and L1 changes the VPID it uses for L2, i.e. vmcs12->vpid.

Signed-off-by: Sean Christopherson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant