diff mbox series

[06/24] kconfig: split CONFIG_SPARSE_MEM from fuzzing

Message ID 20211007130829.632254-1-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series configure->meson queue for 6.2 | expand

Commit Message

Paolo Bonzini Oct. 7, 2021, 1:08 p.m. UTC
Pass CONFIG_FUZZ via host_kconfig, and use it to select the
sparse-mem device.

Cc: Alexander Oleinik <alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Kconfig.host       | 4 ++++
 hw/mem/Kconfig     | 3 +++
 hw/mem/meson.build | 2 +-
 meson.build        | 1 +
 4 files changed, 9 insertions(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Oct. 7, 2021, 1:48 p.m. UTC | #1
On 10/7/21 15:08, Paolo Bonzini wrote:
> Pass CONFIG_FUZZ via host_kconfig, and use it to select the
> sparse-mem device.
> 
> Cc: Alexander Oleinik <alxndr@bu.edu>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Kconfig.host       | 4 ++++
>  hw/mem/Kconfig     | 3 +++
>  hw/mem/meson.build | 2 +-
>  meson.build        | 1 +
>  4 files changed, 9 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Marc-André Lureau Oct. 7, 2021, 8:42 p.m. UTC | #2
On Thu, Oct 7, 2021 at 5:20 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> Pass CONFIG_FUZZ via host_kconfig, and use it to select the
> sparse-mem device.
>
> Cc: Alexander Oleinik <alxndr@bu.edu>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>



> ---
>  Kconfig.host       | 4 ++++
>  hw/mem/Kconfig     | 3 +++
>  hw/mem/meson.build | 2 +-
>  meson.build        | 1 +
>  4 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/Kconfig.host b/Kconfig.host
> index 24255ef441..60b9c07b5e 100644
> --- a/Kconfig.host
> +++ b/Kconfig.host
> @@ -41,3 +41,7 @@ config PVRDMA
>  config MULTIPROCESS_ALLOWED
>      bool
>      imply MULTIPROCESS
> +
> +config FUZZ
> +    bool
> +    select SPARSE_MEM
> diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
> index 8b19fdc49f..03dbb3c7df 100644
> --- a/hw/mem/Kconfig
> +++ b/hw/mem/Kconfig
> @@ -8,3 +8,6 @@ config MEM_DEVICE
>  config NVDIMM
>      bool
>      select MEM_DEVICE
> +
> +config SPARSE_MEM
> +    bool
> diff --git a/hw/mem/meson.build b/hw/mem/meson.build
> index 3c8fdef9f9..82f86d117e 100644
> --- a/hw/mem/meson.build
> +++ b/hw/mem/meson.build
> @@ -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'))
> diff --git a/meson.build b/meson.build
> index 0e9733a833..f03bfff7a1 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1602,6 +1602,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'] : []) + \
> --
> 2.31.1
>
>
>
>
Alexander Bulekov Oct. 8, 2021, 3:08 a.m. UTC | #3
On 211007 1508, Paolo Bonzini wrote:
> Pass CONFIG_FUZZ via host_kconfig, and use it to select the
> sparse-mem device.
> 
> Cc: Alexander Oleinik <alxndr@bu.edu>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Tested-by: Alexander Bulekov <alxndr@bu.edu>

Thank you
diff mbox series

Patch

diff --git a/Kconfig.host b/Kconfig.host
index 24255ef441..60b9c07b5e 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -41,3 +41,7 @@  config PVRDMA
 config MULTIPROCESS_ALLOWED
     bool
     imply MULTIPROCESS
+
+config FUZZ
+    bool
+    select SPARSE_MEM
diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
index 8b19fdc49f..03dbb3c7df 100644
--- a/hw/mem/Kconfig
+++ b/hw/mem/Kconfig
@@ -8,3 +8,6 @@  config MEM_DEVICE
 config NVDIMM
     bool
     select MEM_DEVICE
+
+config SPARSE_MEM
+    bool
diff --git a/hw/mem/meson.build b/hw/mem/meson.build
index 3c8fdef9f9..82f86d117e 100644
--- a/hw/mem/meson.build
+++ b/hw/mem/meson.build
@@ -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'))
diff --git a/meson.build b/meson.build
index 0e9733a833..f03bfff7a1 100644
--- a/meson.build
+++ b/meson.build
@@ -1602,6 +1602,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'] : []) + \