mbox series

[for-6.1,0/4] Poison more CONFIG switches

Message ID 20210414112004.943383-1-thuth@redhat.com (mailing list archive)
Headers show
Series Poison more CONFIG switches | expand

Message

Thomas Huth April 14, 2021, 11:20 a.m. UTC
Using target-specific CONFIG_xxx switches in common code via "#ifdef"s
is wrong, since these macros are only defined for target-specific code.
We already poison many switches in common code to avoid the bugs with
dead code here, but these problems still keep creeping in ...
This series now improves the situation by poisoning more symbols,
especially by generating these from the target-specific config headers
automatically.

Thomas Huth (4):
  include/sysemu: Poison all accelerator CONFIG switches in common code
  migration: Move populate_vfio_info() into a separate file
  qapi/qom.json: Do not use CONFIG_VIRTIO_CRYPTO in common code
  configure: Poison all current target-specific #defines

 Makefile              |  2 +-
 configure             |  5 +++++
 include/exec/poison.h |  6 ++++++
 include/sysemu/hax.h  |  4 ++++
 include/sysemu/hvf.h  |  4 ++++
 include/sysemu/whpx.h |  4 ++++
 migration/meson.build |  3 ++-
 migration/migration.c | 15 ---------------
 migration/migration.h |  2 ++
 migration/target.c    | 25 +++++++++++++++++++++++++
 qapi/qom.json         |  4 ++--
 11 files changed, 55 insertions(+), 19 deletions(-)
 create mode 100644 migration/target.c