Skip to content

Commit

Permalink
kconfig: split CONFIG_SPARSE_MEM from fuzzing
Browse files Browse the repository at this point in the history
Pass CONFIG_FUZZ via host_kconfig, and use it to select the
sparse-mem device.

Cc: Alexander Oleinik <[email protected]>
Reviewed-by: Alexander Bulekov <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Alexander Bulekov <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed Oct 14, 2021
1 parent ca50e52 commit 65ce87d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Kconfig.host
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ config PVRDMA
config MULTIPROCESS_ALLOWED
bool
imply MULTIPROCESS

config FUZZ
bool
select SPARSE_MEM
3 changes: 3 additions & 0 deletions hw/mem/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ config MEM_DEVICE
config NVDIMM
bool
select MEM_DEVICE

config SPARSE_MEM
bool
2 changes: 1 addition & 1 deletion hw/mem/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))

softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss)

softmmu_ss.add(when: 'CONFIG_FUZZ', if_true: files('sparse-mem.c'))
softmmu_ss.add(when: 'CONFIG_SPARSE_MEM', if_true: files('sparse-mem.c'))
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,7 @@ endif

have_ivshmem = config_host_data.get('CONFIG_EVENTFD')
host_kconfig = \
('CONFIG_FUZZ' in config_host ? ['CONFIG_FUZZ=y'] : []) + \
('CONFIG_TPM' in config_host ? ['CONFIG_TPM=y'] : []) + \
('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
Expand Down

0 comments on commit 65ce87d

Please sign in to comment.