qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] d912e7: roms: Rename the EFIROM variable to a


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d912e7: roms: Rename the EFIROM variable to avoid clashing...
Date: Tue, 09 Apr 2019 10:25:10 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d912e795e029b6ff76e8b57c7d0254b791907559
      
https://github.com/qemu/qemu/commit/d912e795e029b6ff76e8b57c7d0254b791907559
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-04-09 (Tue, 09 Apr 2019)

  Changed paths:
    M roms/Makefile

  Log Message:
  -----------
  roms: Rename the EFIROM variable to avoid clashing with iPXE

The iPXE's 'veryclean' recipe removes $(EFIROM) even if the EFIROM
macro originates from elsewhere:

  $ git checkout f590a812c21~
  $ make -C roms clean EFIROM=$(type -P EfiRom)
  make: Entering directory '/source/qemu/roms'
  [...]
  make -C ipxe/src veryclean
  make[1]: Entering directory '/source/qemu/roms/ipxe/src'
  rm -f bin{,-*}/*.* bin{,-*}/.certificate.* bin{,-*}/.certificates.* 
bin{,-*}/.private_key.* bin{,-*}/errors bin{,-*}/NIC ./util/zbin 
./util/elf2efi32 ./util/elf2efi64 /usr/bin/EfiRom ./util/efifatbin 
./util/iccfix ./util/einfo TAGS bin{,-*}/symtab
  rm: cannot remove '/usr/bin/EfiRom': Permission denied
  make[1]: *** [Makefile.housekeeping:1564: clean] Error 1
  make[1]: Leaving directory '/source/qemu/roms/ipxe/src'
  make: *** [Makefile:152: clean] Error 2
  make: Leaving directory '/source/qemu/roms'

Before f590a812c21 this variable could be overridden or unset,
and the 'veryclean' Makefile rule would not complain.

Commit f590a812c21 enforces this variable to the Intel EfiRom
tool provided by the EDK2 project.

To avoid the name clash and make the difference between the
projects obvious, rename the variable used by the EDK2 project
as EDK2_EFIROM.

Fixes: f590a812c21074e82228de3e1dfb57b75fc02b62
Reported-by: Olaf Hering <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 1cab464136b424380dc9a0691147ccf909d5df31
      
https://github.com/qemu/qemu/commit/1cab464136b424380dc9a0691147ccf909d5df31
  Author: Philippe Mathieu-Daudé <address@hidden>
  Date:   2019-04-09 (Tue, 09 Apr 2019)

  Changed paths:
    M roms/Makefile

  Log Message:
  -----------
  roms: Allow passing configure options to the EDK2 build tools

Since commit f590a812c210 we build the EDK2 EfiRom utility
unconditionally.

Some distributions require to use extra compiler/linker flags,
i.e. SUSE which enforces the PIE protection (see [*]).

EDK2 build tools already provide a set of variables for that,
use them to allow the caller to easily inject compiler/linker
options..

Now build scripts can pass extra options, example:

  $ make -C roms \
      EDK2_BASETOOLS_OPTFLAGS='-fPIE' \
      efirom

[*] https://lists.opensuse.org/opensuse-factory/2017-06/msg00403.html

Reported-by: Olaf Hering <address@hidden>
Suggested-by: Laszlo Ersek <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 77b17570900fdfff32c5abb8d92fb527e4a0737a
      
https://github.com/qemu/qemu/commit/77b17570900fdfff32c5abb8d92fb527e4a0737a
  Author: Peter Maydell <address@hidden>
  Date:   2019-04-09 (Tue, 09 Apr 2019)

  Changed paths:
    M include/qemu/bswap.h

  Log Message:
  -----------
  include/qemu/bswap.h: Use __builtin_memcpy() in accessor functions

In the accessor functions ld*_he_p() and st*_he_p() we use memcpy()
to perform a load or store to a pointer which might not be aligned
for the size of the type. We rely on the compiler to optimize this
memcpy() into an efficient load or store instruction where possible.
This is required for good performance, but at the moment it is also
required for correct operation, because some users of these functions
require that the access is atomic if the pointer is aligned, which
will only be the case if the compiler has optimized out the memcpy().
(The particular example where we discovered this is the virtio
vring_avail_idx() which calls virtio_lduw_phys_cached() which
eventually ends up calling lduw_he_p().)

Unfortunately some compile environments, such as the fortify-source
setup used in Alpine Linux, define memcpy() to a wrapper function
in a way that inhibits this compiler optimization.

The correct long-term fix here is to add a set of functions for
doing atomic accesses into AddressSpaces (and to other relevant
families of accessor functions like the virtio_*_phys_cached()
ones), and make sure that callsites which want atomic behaviour
use the correct functions.

In the meantime, switch to using __builtin_memcpy() in the
bswap.h accessor functions. This will make us robust against things
like this fortify library in the short term. In the longer term
it will mean that we don't end up with these functions being really
badly-performing even if the semantics of the out-of-line memcpy()
are correct.

Reported-by: Fernando Casas Schössow <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ae909496e9d33f8c074f1063597298ba1d183133
      
https://github.com/qemu/qemu/commit/ae909496e9d33f8c074f1063597298ba1d183133
  Author: Thomas Huth <address@hidden>
  Date:   2019-04-09 (Tue, 09 Apr 2019)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  hw/i386/pc: Fix crash when hot-plugging nvdimm on older machine types

QEMU currently crashes when you try to hot-plug an "nvdimm" device
on older machine types:

$ qemu-system-x86_64 -monitor stdio -M pc-1.1
QEMU 3.1.92 monitor - type 'help' for more information
(qemu) device_add nvdimm,id=nvdimmn1
qemu-system-x86_64: /home/thuth/devel/qemu/util/error.c:57: error_setv:
 Assertion `*errp == ((void *)0)' failed.
Aborted (core dumped)

The call to hotplug_handler_pre_plug() in pc_memory_pre_plug() has been
added recently before the check whether nvdimm is enabled. It should
be done after the check. And while we're at it, also check the errp
after the hotplug_handler_pre_plug(), otherwise errors are silently
ignored here.

Fixes: 9040e6dfa8c3fed87695a3de555d2c775727bb51
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3e20c81ed87cb15cd04f929b075e244e0758641a
      
https://github.com/qemu/qemu/commit/3e20c81ed87cb15cd04f929b075e244e0758641a
  Author: Markus Armbruster <address@hidden>
  Date:   2019-04-09 (Tue, 09 Apr 2019)

  Changed paths:
    M tests/Makefile.include

  Log Message:
  -----------
  tests: Make check-block a phony target

Fixes: b93b63f574c "test makefile overhaul"

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4b9a21c3442530908b2863b924e7c5ea7496cc57
      
https://github.com/qemu/qemu/commit/4b9a21c3442530908b2863b924e7c5ea7496cc57
  Author: Peter Maydell <address@hidden>
  Date:   2019-04-09 (Tue, 09 Apr 2019)

  Changed paths:
    M hw/i386/pc.c
    M include/qemu/bswap.h
    M roms/Makefile
    M tests/Makefile.include

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* fixes for Alpine and SuSE
* fix crash when hot-plugging nvdimm on older machine types

# gpg: Signature made Tue 09 Apr 2019 17:34:27 BST
# gpg:                using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>" [full]
# gpg:                 aka "Paolo Bonzini <address@hidden>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  tests: Make check-block a phony target
  hw/i386/pc: Fix crash when hot-plugging nvdimm on older machine types
  include/qemu/bswap.h: Use __builtin_memcpy() in accessor functions
  roms: Allow passing configure options to the EDK2 build tools
  roms: Rename the EFIROM variable to avoid clashing with iPXE

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/8cb2ca3d7479...4b9a21c34425



reply via email to

[Prev in Thread] Current Thread [Next in Thread]